summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ip6tables.c2
-rw-r--r--iptables.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ip6tables.c b/ip6tables.c
index 138eed91..9e9a5290 100644
--- a/ip6tables.c
+++ b/ip6tables.c
@@ -840,7 +840,7 @@ parse_interface(const char *arg, char *vianame, unsigned char *mask)
" (%i)", arg, IFNAMSIZ-1);
strcpy(vianame, arg);
- if (vialen == 0)
+ if ((vialen == 0) || (vialen == 1 && vianame[0] == '+'))
memset(mask, 0, IFNAMSIZ);
else if (vianame[vialen - 1] == '+') {
memset(mask, 0xFF, vialen - 1);
diff --git a/iptables.c b/iptables.c
index ae6538c0..4b0fe6c1 100644
--- a/iptables.c
+++ b/iptables.c
@@ -780,7 +780,7 @@ parse_interface(const char *arg, char *vianame, unsigned char *mask)
" (%i)", arg, IFNAMSIZ-1);
strcpy(vianame, arg);
- if (vialen == 0)
+ if ((vialen == 0) || (vialen == 1 && vianame[0] == '+'))
memset(mask, 0, IFNAMSIZ);
else if (vianame[vialen - 1] == '+') {
memset(mask, 0xFF, vialen - 1);