diff options
author | Patrick McHardy <kaber@trash.net> | 2011-02-02 09:31:37 +0100 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2011-02-02 09:31:37 +0100 |
commit | 316ed388802533bcfd3dffb38d2ba29ac5428456 (patch) | |
tree | 408afd10131591f8759428d797513d5a68b3e7aa /net/netfilter | |
parent | e3e241b2769b27669d05f0a05083acd21b4faa2c (diff) |
netfilter: ipset: add missing break statemtns in ip_set_get_ip_port()
Don't fall through in the switch statement, otherwise IPv4 headers
are incorrectly parsed again as IPv6 and the return value will always
be 'false'.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/ipset/ip_set_getport.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/netfilter/ipset/ip_set_getport.c b/net/netfilter/ipset/ip_set_getport.c index 76737bba28e..4dd2785a5c7 100644 --- a/net/netfilter/ipset/ip_set_getport.c +++ b/net/netfilter/ipset/ip_set_getport.c @@ -118,8 +118,10 @@ ip_set_get_ip_port(const struct sk_buff *skb, u8 pf, bool src, __be16 *port) switch (pf) { case AF_INET: ret = ip_set_get_ip4_port(skb, src, port, &proto); + break; case AF_INET6: ret = ip_set_get_ip6_port(skb, src, port, &proto); + break; default: return false; } |