diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2016-12-16 13:03:31 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-12-29 22:02:40 +0900 |
commit | 9b2cb18729052087a16145a1a86ea1cb9006fc4e (patch) | |
tree | b8de43af1ba11b7c09f082ce4a95f40ac3a1382c | |
parent | cad9c8a94031cc2297a725b24d1f0532092288aa (diff) |
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>
-rw-r--r-- | ryu/app/rest_router.py | 6 |
1 files 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].' |