netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netfilter: nft_reject_inet: fix unintended fall-through in switch-statatement
@ 2014-02-12 21:13 Patrick McHardy
  2014-02-14 16:59 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick McHardy @ 2014-02-12 21:13 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel, davej

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

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

Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
 net/netfilter/nft_reject_inet.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/netfilter/nft_reject_inet.c b/net/netfilter/nft_reject_inet.c
index 8a310f2..b718a52 100644
--- a/net/netfilter/nft_reject_inet.c
+++ b/net/netfilter/nft_reject_inet.c
@@ -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);
 	}
 }
 
-- 
1.8.5.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] netfilter: nft_reject_inet: fix unintended fall-through in switch-statatement
  2014-02-12 21:13 [PATCH] netfilter: nft_reject_inet: fix unintended fall-through in switch-statatement Patrick McHardy
@ 2014-02-14 16:59 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2014-02-14 16:59 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: netfilter-devel, davej

On Wed, Feb 12, 2014 at 09:13:16PM +0000, Patrick McHardy wrote:
> netfilter: nft_reject_inet: fix unintended fall-through in switch-statement
> 
> For IPv4 packets, we call both IPv4 and IPv6 reject.

Applied, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-14 16:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-12 21:13 [PATCH] netfilter: nft_reject_inet: fix unintended fall-through in switch-statatement Patrick McHardy
2014-02-14 16:59 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).