Commit 56bbcc53 authored by Patrick McHardy's avatar Patrick McHardy

[NETFILTER]: 'any' matching in ipt_helper

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarHarald Welte <laforge@netfilter.org>
Signed-off-by: default avatarDavid S. Miller <davem@redhat.com>
parent bf1ca4c5
...@@ -71,8 +71,11 @@ match(const struct sk_buff *skb, ...@@ -71,8 +71,11 @@ match(const struct sk_buff *skb,
DEBUGP("master's name = %s , info->name = %s\n", DEBUGP("master's name = %s , info->name = %s\n",
exp->expectant->helper->name, info->name); exp->expectant->helper->name, info->name);
ret ^= !strncmp(exp->expectant->helper->name, info->name, if (info->name[0] == '\0')
strlen(exp->expectant->helper->name)); ret ^= 1;
else
ret ^= !strncmp(exp->expectant->helper->name, info->name,
strlen(exp->expectant->helper->name));
out_unlock: out_unlock:
READ_UNLOCK(&ip_conntrack_lock); READ_UNLOCK(&ip_conntrack_lock);
return ret; return ret;
...@@ -92,10 +95,6 @@ static int check(const char *tablename, ...@@ -92,10 +95,6 @@ static int check(const char *tablename,
if (matchsize != IPT_ALIGN(sizeof(struct ipt_helper_info))) if (matchsize != IPT_ALIGN(sizeof(struct ipt_helper_info)))
return 0; return 0;
/* verify that we actually should match anything */
if ( strlen(info->name) == 0 )
return 0;
return 1; return 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment