I think this patch will break more than it fixes. You need to do a lot
more testing to verify it doesnt. Actually you should probably fix whats
being invoked for the ifa messages when PF_UNSPEC is selected to check
that it only flushes v6 addresses when V6 is on and reject when it is
not compiled in.
cheers,
jamal
On Fri, 2004-12-03 at 12:43, Michal Ludvig wrote:
Hi,
running 'ip -6 addr flush dev eth0' on a kernel without IPv6 support
flushes *all* addresses from the interface, even those IPv4 ones,
because the unsupported protocol is substituted by PF_UNSPEC.
IMHO it should better return with an error EAFNOSUPPORT.
Attached patch fixes it. Please apply.
BTW Credits to Jan Kara [off-list ref] for discovering and analysing
this bug.
Michal Ludvig