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>
This commit is contained in:
parent
e3e241b276
commit
316ed38880
|
@ -118,8 +118,10 @@ ip_set_get_ip_port(const struct sk_buff *skb, u8 pf, bool src, __be16 *port)
|
||||||
switch (pf) {
|
switch (pf) {
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
ret = ip_set_get_ip4_port(skb, src, port, &proto);
|
ret = ip_set_get_ip4_port(skb, src, port, &proto);
|
||||||
|
break;
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
ret = ip_set_get_ip6_port(skb, src, port, &proto);
|
ret = ip_set_get_ip6_port(skb, src, port, &proto);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue