[ovs-dev] [PATCH 1/3] lib: Add ipv6 support for active and passive socket connections

Ben Pfaff blp at nicira.com
Wed Dec 18 18:02:44 UTC 2013


On Wed, Dec 18, 2013 at 10:45:12PM +0530, Arun Sharma wrote:
> On 18/12/13 4:57 AM, "Ben Pfaff" <blp at nicira.com> wrote:
> >GCC reports these errors:
> >
> >    ../lib/stream-tcp.c:74:51: error: using member 'sin6_addr' in
> >incomplete struct sockaddr_in6
> >    ../lib/stream-tcp.c:75:52: error: using member 'sin6_port' in
> >incomplete struct sockaddr_in6
> >    ../lib/stream-tcp.c:83:50: error: using member 'sin6_addr' in
> >incomplete struct sockaddr_in6
> >    ../lib/stream-tcp.c:84:51: error: using member 'sin6_port' in
> >incomplete struct sockaddr_in6
> >    ../lib/stream-tcp.c:171:38: error: using member 'sin6_addr' in
> >incomplete struct sockaddr_in6
> >    ../lib/stream-tcp.c:145:25: error: using member 'sin6_port' in
> >incomplete struct sockaddr_in6
> >    ../lib/stream-tcp.c:147:32: error: using member 'sin6_port' in
> >incomplete struct sockaddr_in6
> >    -> lib/vconn.o
> >    ../lib/socket-util.c:857:22: error: using member 'sin6_port' in
> >incomplete struct sockaddr_in6
> >    ../lib/socket-util.c:1160:27: error: using member 'sin6_addr' in
> >incomplete struct sockaddr_in6
> >    ../lib/stream-ssl.c:282:56: error: using member 'sin6_addr' in
> >incomplete struct sockaddr_in6
> >    ../lib/stream-ssl.c:283:57: error: using member 'sin6_port' in
> >incomplete struct sockaddr_in6
> >    ../lib/stream-ssl.c:291:54: error: using member 'sin6_addr' in
> >incomplete struct sockaddr_in6
> >    ../lib/stream-ssl.c:292:55: error: using member 'sin6_port' in
> >incomplete struct sockaddr_in6
> >    ../lib/stream-ssl.c:832:25: error: using member 'sin6_port' in
> >incomplete struct sockaddr_in6
> >    ../lib/stream-ssl.c:835:17: error: using member 'sin6_addr' in
> >incomplete struct sockaddr_in6
> >    ../lib/stream-ssl.c:889:38: error: using member 'sin6_addr' in
> >incomplete struct sockaddr_in6
> >    ../lib/stream-ssl.c:890:22: error: using member 'sin6_port' in
> >incomplete struct sockaddr_in6
> >    ../lib/stream-ssl.c:892:28: error: using member 'sin6_port' in
> >incomplete struct sockaddr_in6
> >    ../ofproto/ofproto-dpif-sflow.c:285:52: error: using member
> >'sin6_addr' in incomplete struct sockaddr_in6
> 
> 
>   [ARUN:18-Dec] - Which gcc version should I test to reproduce above
> errors?
>   So far i have tested on below versions but not able to reproduce the
> same.
>   gcc (Wheezy Debian 4.7.2-5), gcc (Ubuntu 12.10/Linaro 4.7.2-2ubuntu1),
> gcc (Ubuntu 12.04/Linaro 4.6.3-1ubuntu5).
>   Also tried with -Werror flag.

I'm using gcc version 4.7.2 (Debian 4.7.2-5).

It's possible that these warnings come from sparse, since sometimes
I have trouble distinguishing them at a glance.

If you can't find the source of these warnings then I'll take a look
myself on the next iteration.

> >Because our syntax already uses colons, I think that we should
> >probably require IPv6 addresses to be put into brackets,
> >e.g. tcp:[1::2]:1234.  I think that this is a common convention.
> 
>  [ARUN:18-Dec] - Just confirming, after above rework, the commands will be
> executed as below?
> 
>  # ovsdb-server --remote=ptcp:6632:[2001:db8::1] ??.
>  # ovs-vswitchd tcp:[2001:db8::1]:6632 ?...
>  # ovs-vsctl --db=tcp:[2001:db8::1]:6632 list bridge

Yes.

>  But in case of man pages, these brackets are understood as optional.
>  Here is the example change I have in mind for man pages.
> 
>     tcp:ip:port
>            Connect to the given TCP port on ip. If ip is an IPv6 address,
> then use format tcp:[ip]:port .

Yes, it could be confusing.  That is regrettable, but I do not know of a
good alternative.  Be sure to use the correct fonts: bold for a literal
bracket, roman for a bracket that means "optional".

Thanks,

Ben.



More information about the dev mailing list