From 9b2cb18729052087a16145a1a86ea1cb9006fc4e Mon Sep 17 00:00:00 2001 From: IWASE Yusuke Date: Fri, 16 Dec 2016 13:03:31 +0900 Subject: [PATCH] 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 Signed-off-by: FUJITA Tomonori --- ryu/app/rest_router.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ryu/app/rest_router.py b/ryu/app/rest_router.py index 81a3be46..4ffcca7a 100644 --- a/ryu/app/rest_router.py +++ b/ryu/app/rest_router.py @@ -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].'