[arch-projects] [netctl] [RFC] Flush the interface configuration in ip_unset instead of bring_interface_down.

Jouke Witteveen j.witteveen at gmail.com
Mon May 13 17:58:33 EDT 2013


On Mon, May 13, 2013 at 8:27 PM, Thomas Bächler <thomas at archlinux.org> wrote:
> Am 13.05.2013 19:18, schrieb Jouke Witteveen:
>> On Thu, May 9, 2013 at 11:53 PM, Thomas Bächler <thomas at archlinux.org> wrote:
>>> Am 09.05.2013 23:29, schrieb Thomas Bächler:
>>>> When switching networks in auto.action, the addresses are not flushed. This
>>>> is especially problematic with stateless ipv6 autoconfigutation, as invalid
>>>> IPs may stay around until their (potentially very long) lifetime has expired.
>>>>
>>>> bring_interface_down is always called after ip_unset everywhere else, so
>>>> this change does not affect anything else.
>>>
>>> This may not be a good idea, since it probably flushes the link-local
>>> address. I must test more.
>>>
>>
>> I think a better way is to delete all static addresses in ip_unset.
>>
>> - Jouke
>
> You also need to delete all addresses assigned by SLAAC, because they
> will usually take very long to expire, thus my flush idea.
>
> We should probably do this:
>
> ip addr flush dev $IF scope host
> ip addr flush dev $IF scope site
> ip addr flush dev $IF scope global
>
> This will flush everything except for the link-local address.
>

But we know in advance of some cases where SLAAC is not used. It might
be easiest nevertheless to just put your three commands in ip_unset.

- Jouke


More information about the arch-projects mailing list