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

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
...@@ -139,7 +139,7 @@ ebt_basic_match(const struct ebt_entry *e, const struct sk_buff *skb, ...@@ -139,7 +139,7 @@ ebt_basic_match(const struct ebt_entry *e, const struct sk_buff *skb,
ethproto = h->h_proto; ethproto = h->h_proto;
if (e->bitmask & EBT_802_3) { 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; return 1;
} else if (!(e->bitmask & EBT_NOPROTO) && } else if (!(e->bitmask & EBT_NOPROTO) &&
FWINV2(e->ethproto != ethproto, EBT_IPROTO)) FWINV2(e->ethproto != ethproto, EBT_IPROTO))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment