Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 27cf6a6e authored by Alexander Duyck's avatar Alexander Duyck Committed by David S. Miller
Browse files

ebtables: Use eth_proto_is_802_3



Replace "ntohs(proto) >= ETH_P_802_3_MIN" w/ eth_proto_is_802_3(proto).

Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2c7a88c2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -139,7 +139,7 @@ ebt_basic_match(const struct ebt_entry *e, const struct sk_buff *skb,
		ethproto = h->h_proto;

	if (e->bitmask & EBT_802_3) {
		if (FWINV2(ntohs(ethproto) >= ETH_P_802_3_MIN, EBT_IPROTO))
		if (FWINV2(eth_proto_is_802_3(ethproto), EBT_IPROTO))
			return 1;
	} else if (!(e->bitmask & EBT_NOPROTO) &&
	   FWINV2(e->ethproto != ethproto, EBT_IPROTO))