2
0
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:
Mehak Mahajan
2012-10-23 19:00:02 -07:00
parent a41754333f
commit a3d3ad0c04
2 changed files with 9 additions and 16 deletions

View File

@@ -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);
}
}
}