From 955654c4fc34cf3ff4e64d3340c124b17605ae34 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 13 Dec 2023 21:14:58 +0100 Subject: libxtables: xtoptions: Treat NFPROTO_BRIDGE as IPv4 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. --- libxtables/xtoptions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libxtables/xtoptions.c b/libxtables/xtoptions.c index 7a0e44b3..f622f4c6 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; -- cgit v1.2.3