summaryrefslogtreecommitdiff
path: root/edgemesh
diff options
context:
space:
mode:
authorsoolaugust <soolaugust@gmail.com>2019-08-17 22:15:59 +0800
committersoolaugust <soolaugust@gmail.com>2019-08-17 22:15:59 +0800
commitea694bd6e44da099812c3375cb8c1f88d412e7b3 (patch)
tree52000985166b0a0a3611fd5c8ef58eb4aaf558d4 /edgemesh
parentMerge pull request #1019 from kadisi/klog (diff)
downloadkubeedge-ea694bd6e44da099812c3375cb8c1f88d412e7b3.tar.gz
implement ipv6 valid logic and typo fix
Diffstat (limited to 'edgemesh')
-rw-r--r--edgemesh/tools/initContainer/script/edgemesh-iptables.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/edgemesh/tools/initContainer/script/edgemesh-iptables.sh b/edgemesh/tools/initContainer/script/edgemesh-iptables.sh
index 4bd9d51be..df8b7e9be 100644
--- a/edgemesh/tools/initContainer/script/edgemesh-iptables.sh
+++ b/edgemesh/tools/initContainer/script/edgemesh-iptables.sh
@@ -51,8 +51,12 @@ function isIPv4() {
}
function isIPv6() {
- # TODO
- false
+ local ipv6matchString="^([0-9a-fA-F]{0,4}:){1,7}[0-9a-fA-F]{0,4}$"
+ if [[ ${1} =~ ${ipv6matchString} ]]; then
+ true
+ else
+ false
+ fi
}
function hostNetMode() {