]> git.ozlabs.org Git - ccan/commit
net: fix latent bug in _info example.
authorRusty Russell <rusty@rustcorp.com.au>
Sat, 29 Jan 2011 07:42:20 +0000 (18:12 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Sat, 29 Jan 2011 07:42:20 +0000 (18:12 +1030)
commit7274405006c44e8af664c5ac7aa8b1e523d9a7be
tree3f2a59ae9a5b1e9a47f40d1fd136f3e699fce29f
parent285338ec891a6a70987df07e568773ca88122454
net: fix latent bug in _info example.

Ben Hutchings points out that struct sockaddr isn't large enough to hold
a struct sockaddr_in6.  Our example works because we only access the family
field, but anyone extending it might be surprised; use a union instead.
ccan/net/_info