pyroute2 icon indicating copy to clipboard operation
pyroute2 copied to clipboard

ARP entry for device that change namespace is not cleared.

Open hetii opened this issue 7 years ago • 1 comments

When I put my existing interface to new namespace I notice that his ARP entry is not removed from host side.

So when new interface is up and have the same ip or if its a veth par terminated on host side to bridge it`s not possible to talk with it till old arp entry is deleted.

Because of that when we use code like below, ARP cache should be cleared for "my_existing_interface".

with IPDB() as ip:
    with ip.interfaces.get(my_existing_interface) as veth:
        veth.net_ns_fd = new_namespace

hetii avatar Apr 29 '18 08:04 hetii

Thanks! Will be fixed.

svinota avatar Apr 30 '18 09:04 svinota