summaryrefslogtreecommitdiffstats
path: root/net/openvswitch/flow_netlink.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@redhat.com>2015-05-04 23:34:05 +0200
committerDavid S. Miller <davem@davemloft.net>2015-05-06 01:24:42 +0200
commit6713fc9b8fa33444aa000f0f31076f6a859ccb34 (patch)
tree3a33dfdf239f97921aefb32771c5688be1aa3de5 /net/openvswitch/flow_netlink.c
parentipv4/ip_tunnel_core: Use eth_proto_is_802_3 (diff)
downloadlinux-6713fc9b8fa33444aa000f0f31076f6a859ccb34.tar.xz
linux-6713fc9b8fa33444aa000f0f31076f6a859ccb34.zip
openvswitch: Use eth_proto_is_802_3
Replace "ntohs(proto) >= ETH_P_802_3_MIN" w/ eth_proto_is_802_3(proto). Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/flow_netlink.c')
-rw-r--r--net/openvswitch/flow_netlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
index c691b1a1eee0..624e41c4267f 100644
--- a/net/openvswitch/flow_netlink.c
+++ b/net/openvswitch/flow_netlink.c
@@ -816,7 +816,7 @@ static int ovs_key_from_nlattrs(struct sw_flow_match *match, u64 attrs,
if (is_mask) {
/* Always exact match EtherType. */
eth_type = htons(0xffff);
- } else if (ntohs(eth_type) < ETH_P_802_3_MIN) {
+ } else if (!eth_proto_is_802_3(eth_type)) {
OVS_NLERR(log, "EtherType %x is less than min %x",
ntohs(eth_type), ETH_P_802_3_MIN);
return -EINVAL;