Jim Moore writes:
> I'm going through the feedback you provided in idm_so.c.  I've
> played with the code that skips loopback address while determining
> local interfaces and I see an entry named "lo0" that does not have
> the IFF_LOOPBACK flag set in the control structure.

Are you _sure_?  I don't see how that could happen if you're getting
the flags correctly.

> I was wondering if
> we could keep our same algorithm for now of matching the name "lo0"
> while filing an RFE to investigate this further. The current code was taken
> from the user mode target driver.

I don't think the current code is right, and at least for this review,
I don't believe it matters where the code came from.

Filtering out just lo0 doesn't make sense.  What will this code do if
it runs into "lo0:1" configured in a zone?  Is that one ok where "lo0"
outside of the zone with exactly the same address is somehow not ok?
What will it do if it runs into an interface with the address set to
all zeros and the IFF_UP flag is set (as happens with DHCP)?

Excluding by interface name is questionable at best when what you're
really trying to get is a list of addresses, and I doubt it really
does what's desired.  I suspect that if you're trying to filter out
'unusable' source addresses from the list, you'll need to check for at
least INADDR_ANY and INADDR_LOOPBACK, and may want to exclude all of
INADDR_LOOPBACKNET.

Better still, just lose that code.  I see no obvious reason to be
trying to skip over the loopback interface.

-- 
James Carlson, Solaris Networking              <[EMAIL PROTECTED]>
Sun Microsystems / 35 Network Drive        71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to