ebtables: Use eth_proto_is_802_3
[firefly-linux-kernel-4.4.55.git] / net / bridge / netfilter / ebtables.c
index 91180a7fc94376ea3ca7eecf274c03c3bc919590..5149d9e7111458cff19954b200a9ea3e807638d1 100644 (file)
@@ -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))