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.yusu...@gmail.com>
---
 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 81a3be4..4ffcca7 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].'
-- 
2.7.4


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to