summaryrefslogtreecommitdiffstats
path: root/iptables.c
diff options
context:
space:
mode:
authorOzgur AKAN <akan@aiqa.com>2004-04-07 09:36:29 +0000
committerHarald Welte <laforge@gnumonks.org>2004-04-07 09:36:29 +0000
commit3610deb41015dcdbbe6b684fe7ae6e0f9e37eff4 (patch)
tree5476af2104ecfa6ad76f04ea7dfcfd69c4ca33e9 /iptables.c
parent0e3b3379abec1695a68871862b6c22b59de3c5a5 (diff)
fix case where somebody uses '-i +' as interface name (Ozgur AKAN)
Diffstat (limited to 'iptables.c')
-rw-r--r--iptables.c2
1 files changed, 1 insertions, 1 deletions
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);