Skip to content

Commit

Permalink
openvswitch: Process RARP packets with ethertype 0x8035 similar to AR…
Browse files Browse the repository at this point in the history
…P 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>
  • Loading branch information
Mehak Mahajan authored and Jesse Gross committed Nov 2, 2012
1 parent d04d382 commit c061853
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions net/openvswitch/flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,8 @@ int ovs_flow_extract(struct sk_buff *skb, u16 in_port, struct sw_flow_key *key,
}
}

} else if (key->eth.type == htons(ETH_P_ARP) && arphdr_ok(skb)) {
} else if ((key->eth.type == htons(ETH_P_ARP) ||
key->eth.type == htons(ETH_P_RARP)) && arphdr_ok(skb)) {
struct arp_eth_header *arp;

arp = (struct arp_eth_header *)skb_network_header(skb);
Expand Down Expand Up @@ -1086,7 +1087,8 @@ int ovs_flow_from_nlattrs(struct sw_flow_key *swkey, int *key_lenp,
if (err)
return err;
}
} else if (swkey->eth.type == htons(ETH_P_ARP)) {
} else if (swkey->eth.type == htons(ETH_P_ARP) ||
swkey->eth.type == htons(ETH_P_RARP)) {
const struct ovs_key_arp *arp_key;

if (!(attrs & (1 << OVS_KEY_ATTR_ARP)))
Expand Down Expand Up @@ -1222,7 +1224,8 @@ int ovs_flow_to_nlattrs(const struct sw_flow_key *swkey, struct sk_buff *skb)
ipv6_key->ipv6_tclass = swkey->ip.tos;
ipv6_key->ipv6_hlimit = swkey->ip.ttl;
ipv6_key->ipv6_frag = swkey->ip.frag;
} else if (swkey->eth.type == htons(ETH_P_ARP)) {
} else if (swkey->eth.type == htons(ETH_P_ARP) ||
swkey->eth.type == htons(ETH_P_RARP)) {
struct ovs_key_arp *arp_key;

nla = nla_reserve(skb, OVS_KEY_ATTR_ARP, sizeof(*arp_key));
Expand Down

0 comments on commit c061853

Please sign in to comment.