On Thu, Jul 23, 2015 at 4:31 PM, Ben Pfaff <b...@nicira.com> wrote:

> On Thu, Jul 23, 2015 at 04:30:12PM -0700, Alex Wang wrote:
> > This commit refines the comments of function netdev_linux_get_in6()
> > to correctly describe its behavior.
> >
> > Signed-off-by: Alex Wang <al...@nicira.com>
>
> It always returns 0, not 'true'.
>
> But should it return EADDRNOTAVAIL if none is found?  And EOPNOTSUPP if
> /proc/net/if_inet6 does not exist?
>
>
This also makes sense, and just realized that making netdev_linux_get_in6()
conform to the get_in6 api definition will fix the bug.  So, I'll send out
a new
patch,

Thanks,
Alex Wang,




> > diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
> > index 18a1399..913a532 100644
> > --- a/lib/netdev-linux.c
> > +++ b/lib/netdev-linux.c
> > @@ -2439,8 +2439,9 @@ parse_if_inet6_line(const char *line,
> >                      ifname);
> >  }
> >
> > -/* If 'netdev' has an assigned IPv6 address, sets '*in6' to that
> address (if
> > - * 'in6' is non-null) and returns true.  Otherwise, returns false. */
> > +/* If 'netdev' has an assigned IPv6 address, sets '*in6' to that
> address.
> > + * Otherwise, sets '*in6' to 'in6addr_any'.  This function always
> returns
> > + * true. */
> >  static int
> >  netdev_linux_get_in6(const struct netdev *netdev_, struct in6_addr *in6)
> >  {
> > --
> > 1.7.9.5
> >
> > _______________________________________________
> > dev mailing list
> > dev@openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev
>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to