DragonFly submit List (threaded) for 2008-05
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: in_ifinit() fix for SIOCSIFADDR
:After patch, in_ifinit() will remove ia from hash table if in_ifinit()
:fails, so for 2) and 3) there is no need to remove ia again
:
:For 1), ia was installed into hash table only if
:ia->ia_addr.sin_family == AF_INET. This forms the condition test
:before the XXX comment. IMHO, using sin_family to indicate, whether
:ia is in hash table or not, is not a good idea, that's why I added XXX
:comment. Once I parallelize ia hash table, I will add a flag to
:indicate whether ia is in hash table or not.
Ok, then I'm fine with it. After reading the first part of your
answer I was going to suggest having a flag. It's a good idea
even if the flag state is known, along with adding a few KKASSERT's
to catch coding mistakes.
:I mean following code segment in in_ifinit() (~839 in.c rev1.34):
: if ((error = rtinit(&ia->ia_ifa, RTM_ADD, flags)) != 0) {
: ia->ia_addr = oldaddr;
: return (error);
: }
:ia's address is restored to oldaddr, but ia itself is left in hash
:bucket indexed by newaddr's hash value.
:
:Best Regards,
:sephe
:
:--
:Live Free or Die
Ok. Yes, that should definitely be moved to the correct bucket.
-Matt
Matthew Dillon
<dillon@backplane.com>
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]