summaryrefslogtreecommitdiffstats
path: root/net/openvswitch/flow_netlink.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@redhat.com>2015-05-04 14:34:05 -0700
committerDavid S. Miller <davem@davemloft.net>2015-05-05 19:24:42 -0400
commit6713fc9b8fa33444aa000f0f31076f6a859ccb34 (patch)
tree3a33dfdf239f97921aefb32771c5688be1aa3de5 /net/openvswitch/flow_netlink.c
parentd181ddca89cf8680db6c767ae38e3b66224d1657 (diff)
downloadlinux-6713fc9b8fa33444aa000f0f31076f6a859ccb34.tar.gz
linux-6713fc9b8fa33444aa000f0f31076f6a859ccb34.tar.bz2
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;