[ovs-dev] [PATCH] netdev-linux: Refine function comments of netdev_linux_get_in6().

Ben Pfaff blp at nicira.com
Thu Jul 23 23:31:45 UTC 2015


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 <alexw at 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?

> 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 at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list