mirror of
https://github.com/openvswitch/ovs
synced 2025-10-29 15:28:56 +00:00
Allow processing of RARP packets.
With this commit, the datapath will process the ARP header for RARP packets. It also fixes a bug whereby if the ARP opcode is something other than ARP request or reply, the key_len is not adjusted to include ARP info. Signed-off-by: Mehak Mahajan <mmahajan@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
This commit is contained in:
11
lib/flow.c
11
lib/flow.c
@@ -435,13 +435,10 @@ flow_extract(struct ofpbuf *packet, uint32_t skb_priority,
|
||||
flow->nw_proto = ntohs(arp->ar_op);
|
||||
}
|
||||
|
||||
if ((flow->nw_proto == ARP_OP_REQUEST)
|
||||
|| (flow->nw_proto == ARP_OP_REPLY)) {
|
||||
flow->nw_src = arp->ar_spa;
|
||||
flow->nw_dst = arp->ar_tpa;
|
||||
memcpy(flow->arp_sha, arp->ar_sha, ETH_ADDR_LEN);
|
||||
memcpy(flow->arp_tha, arp->ar_tha, ETH_ADDR_LEN);
|
||||
}
|
||||
flow->nw_src = arp->ar_spa;
|
||||
flow->nw_dst = arp->ar_tpa;
|
||||
memcpy(flow->arp_sha, arp->ar_sha, ETH_ADDR_LEN);
|
||||
memcpy(flow->arp_tha, arp->ar_tha, ETH_ADDR_LEN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user