aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/openvswitch/flow.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c
index 733cbf49ed1f..e6ce902e92e5 100644
--- a/net/openvswitch/flow.c
+++ b/net/openvswitch/flow.c
@@ -689,7 +689,8 @@ int ovs_flow_extract(struct sk_buff *skb, u16 in_port, struct sw_flow_key *key,
689 } 689 }
690 } 690 }
691 691
692 } else if (key->eth.type == htons(ETH_P_ARP) && arphdr_ok(skb)) { 692 } else if ((key->eth.type == htons(ETH_P_ARP) ||
693 key->eth.type == htons(ETH_P_RARP)) && arphdr_ok(skb)) {
693 struct arp_eth_header *arp; 694 struct arp_eth_header *arp;
694 695
695 arp = (struct arp_eth_header *)skb_network_header(skb); 696 arp = (struct arp_eth_header *)skb_network_header(skb);
@@ -1086,7 +1087,8 @@ int ovs_flow_from_nlattrs(struct sw_flow_key *swkey, int *key_lenp,
1086 if (err) 1087 if (err)
1087 return err; 1088 return err;
1088 } 1089 }
1089 } else if (swkey->eth.type == htons(ETH_P_ARP)) { 1090 } else if (swkey->eth.type == htons(ETH_P_ARP) ||
1091 swkey->eth.type == htons(ETH_P_RARP)) {
1090 const struct ovs_key_arp *arp_key; 1092 const struct ovs_key_arp *arp_key;
1091 1093
1092 if (!(attrs & (1 << OVS_KEY_ATTR_ARP))) 1094 if (!(attrs & (1 << OVS_KEY_ATTR_ARP)))
@@ -1222,7 +1224,8 @@ int ovs_flow_to_nlattrs(const struct sw_flow_key *swkey, struct sk_buff *skb)
1222 ipv6_key->ipv6_tclass = swkey->ip.tos; 1224 ipv6_key->ipv6_tclass = swkey->ip.tos;
1223 ipv6_key->ipv6_hlimit = swkey->ip.ttl; 1225 ipv6_key->ipv6_hlimit = swkey->ip.ttl;
1224 ipv6_key->ipv6_frag = swkey->ip.frag; 1226 ipv6_key->ipv6_frag = swkey->ip.frag;
1225 } else if (swkey->eth.type == htons(ETH_P_ARP)) { 1227 } else if (swkey->eth.type == htons(ETH_P_ARP) ||
1228 swkey->eth.type == htons(ETH_P_RARP)) {
1226 struct ovs_key_arp *arp_key; 1229 struct ovs_key_arp *arp_key;
1227 1230
1228 nla = nla_reserve(skb, OVS_KEY_ATTR_ARP, sizeof(*arp_key)); 1231 nla = nla_reserve(skb, OVS_KEY_ATTR_ARP, sizeof(*arp_key));