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

ipv4/ip_tunnel_core: 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 27cf6a6e
...@@ -98,7 +98,7 @@ int iptunnel_pull_header(struct sk_buff *skb, int hdr_len, __be16 inner_proto) ...@@ -98,7 +98,7 @@ int iptunnel_pull_header(struct sk_buff *skb, int hdr_len, __be16 inner_proto)
return -ENOMEM; return -ENOMEM;
eh = (struct ethhdr *)skb->data; eh = (struct ethhdr *)skb->data;
if (likely(ntohs(eh->h_proto) >= ETH_P_802_3_MIN)) if (likely(eth_proto_is_802_3(eh->h_proto)))
skb->protocol = eh->h_proto; skb->protocol = eh->h_proto;
else else
skb->protocol = htons(ETH_P_802_2); skb->protocol = htons(ETH_P_802_2);
......
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