Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

openvswitch: Process RARP packets with ethertype 0x8035 similar to ARP packets.

With this commit, OVS will match the data in the RARP packets having
ethertype 0x8035, in the same way as the data in the ARP packets.

Signed-off-by: Mehak Mahajan <mmahajan@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>

authored by

Mehak Mahajan and committed by
Jesse Gross
c0618533 d04d3829

+6 -3
+6 -3
net/openvswitch/flow.c
··· 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 694 struct arp_eth_header *arp; 694 695 695 696 arp = (struct arp_eth_header *)skb_network_header(skb); ··· 1087 1086 if (err) 1088 1087 return err; 1089 1088 } 1090 - } else if (swkey->eth.type == htons(ETH_P_ARP)) { 1089 + } else if (swkey->eth.type == htons(ETH_P_ARP) || 1090 + swkey->eth.type == htons(ETH_P_RARP)) { 1091 1091 const struct ovs_key_arp *arp_key; 1092 1092 1093 1093 if (!(attrs & (1 << OVS_KEY_ATTR_ARP))) ··· 1224 1222 ipv6_key->ipv6_tclass = swkey->ip.tos; 1225 1223 ipv6_key->ipv6_hlimit = swkey->ip.ttl; 1226 1224 ipv6_key->ipv6_frag = swkey->ip.frag; 1227 - } else if (swkey->eth.type == htons(ETH_P_ARP)) { 1225 + } else if (swkey->eth.type == htons(ETH_P_ARP) || 1226 + swkey->eth.type == htons(ETH_P_RARP)) { 1228 1227 struct ovs_key_arp *arp_key; 1229 1228 1230 1229 nla = nla_reserve(skb, OVS_KEY_ATTR_ARP, sizeof(*arp_key));