Skip to contentSkip to conversation

netfilter: nft_reject_inet: fix unintended fall-through in switch-statatement

PATCH Applied Patrick McHardy 2 participants 2 messages Feb 12, 2014 – Feb 14, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netfilter: nft_reject_inet: fix unintended fall-through in switch-statatement

netfilter: nft_reject_inet: fix unintended fall-through in switch-statement

For IPv4 packets, we call both IPv4 and IPv6 reject.

---
 net/netfilter/nft_reject_inet.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/netfilter/nft_reject_inet.c +2 -2
index 8a310f2..b718a52 100644
@@ -21,9 +21,9 @@ static void nft_reject_inet_eval(const struct nft_expr *expr,
 {
 	switch (pkt->ops->pf) {
 	case NFPROTO_IPV4:
-		nft_reject_ipv4_eval(expr, data, pkt);
+		return nft_reject_ipv4_eval(expr, data, pkt);
 	case NFPROTO_IPV6:
-		nft_reject_ipv6_eval(expr, data, pkt);
+		return nft_reject_ipv6_eval(expr, data, pkt);
 	}
 }
 
Signature · 1 line
1.8.5.3
maintainer Applied
#1 lore raw
Quoted 3 lines · Patrick McHardy

netfilter: nft_reject_inet: fix unintended fall-through in switch-statement

For IPv4 packets, we call both IPv4 and IPv6 reject.

Applied, thanks!