[iptables PATCH 04/23] libxtables: xtoptions: Treat NFPROTO_BRIDGE as IPv4

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

 



When parsing for XTTYPE_HOST(MASK), the return value of afinfo_family()
is used to indicate the expected address family.

Make guided option parser expect IPv4 by default for ebtables as this is
the more common case. The exception is libebt_ip6, which will
temporarily adjust afinfo->family while parsing.

Signed-off-by: Phil Sutter <phil@xxxxxx>
---
 libxtables/xtoptions.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libxtables/xtoptions.c b/libxtables/xtoptions.c
index 9377e1641f28c..5b693a9b00e3f 100644
--- a/libxtables/xtoptions.c
+++ b/libxtables/xtoptions.c
@@ -71,6 +71,7 @@ static uint8_t afinfo_family(void)
 {
 	switch (afinfo->family) {
 	case NFPROTO_ARP:
+	case NFPROTO_BRIDGE:
 		return NFPROTO_IPV4;
 	default:
 		return afinfo->family;
-- 
2.43.0





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux