From 6ca8e28d3100b1860af5f36d7a0e59fc7b500c29 Mon Sep 17 00:00:00 2001 From: mathieu-rohon Date: Tue, 22 Apr 2014 11:44:35 +0200 Subject: [PATCH] ip-lib : use "ip neigh replace" instead of "ip neigh add" Closes bug #1311002 Change-Id: Ie50bc0bff32b7f97ac317ccc2521bbea52d59ca3 --- neutron/agent/linux/ip_lib.py | 2 +- neutron/tests/unit/test_linux_ip_lib.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/neutron/agent/linux/ip_lib.py b/neutron/agent/linux/ip_lib.py index c040362fd..40acb4c18 100644 --- a/neutron/agent/linux/ip_lib.py +++ b/neutron/agent/linux/ip_lib.py @@ -444,7 +444,7 @@ class IpNeighCommand(IpDeviceCommandBase): COMMAND = 'neigh' def add(self, ip_version, ip_address, mac_address): - self._as_root('add', + self._as_root('replace', ip_address, 'lladdr', mac_address, diff --git a/neutron/tests/unit/test_linux_ip_lib.py b/neutron/tests/unit/test_linux_ip_lib.py index 59fe4223c..f8f4d54a2 100644 --- a/neutron/tests/unit/test_linux_ip_lib.py +++ b/neutron/tests/unit/test_linux_ip_lib.py @@ -810,7 +810,7 @@ class TestIpNeighCommand(TestIPCmdBase): def test_add_entry(self): self.neigh_cmd.add(4, '192.168.45.100', 'cc:dd:ee:ff:ab:cd') - self._assert_sudo([4], ('add', '192.168.45.100', 'lladdr', + self._assert_sudo([4], ('replace', '192.168.45.100', 'lladdr', 'cc:dd:ee:ff:ab:cd', 'nud', 'permanent', 'dev', 'tap0'))