rest_router: Fix ARP THA in reply message

Currently, rest_router sends ARP reply messages composing own MAC
address in Target MAC Address, and both Sender/Target MAC address
are MAC address of rest_router.
So, with this reply messages, Wireshark will report "Duplicate IP
address detected".
This patch fixes this problem.

This problem was reported by China Shenzhen TICOMM Information
Technology Co. Ltd.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
IWASE Yusuke 2016-12-16 13:03:31 +09:00 committed by FUJITA Tomonori
parent cad9c8a940
commit 9b2cb18729

View File

@ -1010,14 +1010,14 @@ class VlanRouter(object):
else:
if header_list[ARP].opcode == arp.ARP_REQUEST:
# ARP request to router port -> send ARP reply
src_mac = header_list[ARP].src_mac
dst_mac = self.port_data[in_port].mac
src_mac = self.port_data[in_port].mac
dst_mac = header_list[ARP].src_mac
arp_target_mac = dst_mac
output = in_port
in_port = self.ofctl.dp.ofproto.OFPP_CONTROLLER
self.ofctl.send_arp(arp.ARP_REPLY, self.vlan_id,
dst_mac, src_mac, dst_ip, src_ip,
src_mac, dst_mac, dst_ip, src_ip,
arp_target_mac, in_port, output)
log_msg = 'Receive ARP request from [%s] to router port [%s].'