[PATCH] netfilter; Add some missing default cases to switch statements in nft_reject.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This fixes:

====================
net/netfilter/nft_reject.c: In function ʽnft_reject_dumpʼ:
net/netfilter/nft_reject.c:61:2: warning: enumeration value ʽNFT_REJECT_TCP_RSTʼ not handled in switch [-Wswitch]
  switch (priv->type) {
  ^
net/netfilter/nft_reject.c:61:2: warning: enumeration value ʽNFT_REJECT_ICMPX_UNREACHʼ not handled in switch [-Wswi\
tch]
net/netfilter/nft_reject_inet.c: In function ʽnft_reject_inet_dumpʼ:
net/netfilter/nft_reject_inet.c:105:2: warning: enumeration value ʽNFT_REJECT_TCP_RSTʼ not handled in switch [-Wswi\
tch]
  switch (priv->type) {
  ^
====================

Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
---

I just pushed this into the 'net' tree, just FYI...

 net/netfilter/nft_reject.c      | 2 ++
 net/netfilter/nft_reject_inet.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/net/netfilter/nft_reject.c b/net/netfilter/nft_reject.c
index 57d3e1a..0522fc9 100644
--- a/net/netfilter/nft_reject.c
+++ b/net/netfilter/nft_reject.c
@@ -63,6 +63,8 @@ int nft_reject_dump(struct sk_buff *skb, const struct nft_expr *expr)
 		if (nla_put_u8(skb, NFTA_REJECT_ICMP_CODE, priv->icmp_code))
 			goto nla_put_failure;
 		break;
+	default:
+		break;
 	}
 
 	return 0;
diff --git a/net/netfilter/nft_reject_inet.c b/net/netfilter/nft_reject_inet.c
index 62cabee..635dbba 100644
--- a/net/netfilter/nft_reject_inet.c
+++ b/net/netfilter/nft_reject_inet.c
@@ -108,6 +108,8 @@ static int nft_reject_inet_dump(struct sk_buff *skb,
 		if (nla_put_u8(skb, NFTA_REJECT_ICMP_CODE, priv->icmp_code))
 			goto nla_put_failure;
 		break;
+	default:
+		break;
 	}
 
 	return 0;
-- 
2.3.5

?τθΊ{.nΗ+?·???­?+%?Λ?±ιέΆ??w?Ί{.nΗ+?·§zΧβ?Χ«ύΧ―z_β?Ψ^n?rʽφ¦zΛ?λh?¨θ­Ϊ&£ϋΰzΏδzΉή?ϊ+?Κ+zf£ʼ·h??§~?­?Ϋi??ο?κ??κηz_θ?ζj:+v?¨ώ)ί£ψm





[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux