LGTM.
- Garrett
Shrikrishna Khare wrote:
Hi,
Just a couple of liner fix, would appreciate if someone can take a
quick look.
Bug description:
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6300049
Webrev:
http://cr.opensolaris.org/~shri.k/webrev_6300049/
The bug isn't really: "netperf -f dst" works fine for 16 bit prefix
but fails for 48 bit prefix.
"netstat -f dst" *may* fail for any IPv6 prefix containing byte value
>= 128 because:
- Function v6_addr_match:4311 compares *ucp (uint8_t value) with *aptr
(char value).
- uint8_t has range 0-255, so *ucp is fine, but
- for *aptr: C standard allows char to default to either signed (-128
to 127) or unsigned (0 to 255) while leaving that choice to the
compiler implementation/platform.
Thus, the platforms that defaults char to signed char would run into
this bug. Interpreting the value as unsigned 8 bit integer and then
comparing with *ucp makes the implementation platform independent. (I
have tested the fix, it works fine).
While this fix will resolve the bug, am not sure if we have more of
such bugs (as yet undetected) esp. since struct hostent stores the
address in char **h_addr_list.
Thanks,
Shri
_______________________________________________
networking-discuss mailing list
[email protected]
_______________________________________________
networking-discuss mailing list
[email protected]