Re: [PATCH] [IPV4] Fix secondary IP addresses after promotion

From: Patrick McHardy
Date: Tue Nov 08 2005 - 09:12:17 EST


Thomas Graf wrote:
> * Thomas Graf <tgraf@xxxxxxx> 2005-11-05 14:46
>
>>Assuming this is a separate bug, I'm not sure if this is the right
>>way to fix it. I think it would be better to rewrite the preferred
>>source address of all related local routes and only perform a
>>remove-and-add on the secondary address being promoted.
>
>
> I tried it out and although it works it's not clean yet because
> changing fib_info also changes pref_src for the routes to be
> deleted which will lead to slightly incorrect notifications later
> on. I now think that explicitely deleting and re-adding them
> later on is better as well ;-)

Yes, fixing it correctly looks very hard. Just changing the routes
doesn't seem right to me, someone might have added it with exactly
this prefsrc and doesn't want it to change, its also not clear how
to notify on this. Taking care of correct ordering of the ifa_list
is also more complicated without just deleting and readding them.

I have a patch to do this, but it needs some debugging, for some
unknown reason it crashes sometimes if I remove addresses without
specifying the mask.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/