Le mardi 12 décembre 2006 22:16, vous avez écrit :
> > I don't reckon -1 could be the hop limit value.
>
> -1 means un-initialized.

Sure, -1 means "kernel default" for setsockopt(), but it is not 
specified for getsockopt().

> The following patch seems to work for me, but this code has behaved
> this way for a while, so don't know if it will break any existing
> apps.

Google Codesearch for "getsockopt IPV6_MULTICAST_HOPS" yields a bunch of 
apps that seem to assume a valid hop limit is returned, none of which 
detects -1. I believe applying your patch would fix much more apps than 
it is going to break. Hopefully those not handling -1 will somehow cast 
it to 255 if it is ever re-used, but I can also imagine some broken 
SDP-or-similar with "/-1" or "/4294967295" as a hop limit.

Thanks,

-- 
Rémi Denis-Courmont
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to