netdev-linux: Make netdev_linux_get_in6() conform to API definition.
authorAlex Wang <alexw@nicira.com>
Thu, 23 Jul 2015 23:25:32 +0000 (16:25 -0700)
committerAlex Wang <alexw@nicira.com>
Tue, 28 Jul 2015 16:34:31 +0000 (09:34 -0700)
commit11df5f06e4ce0db686c136caa2584fe26e5f1fb4
tree27abd79ba151c0b267a246d2067feae4bbddd68b
parent4bf22388f2ae29003291cada309e7ed31c2717e7
netdev-linux: Make netdev_linux_get_in6() conform to API definition.

The get_in6() API defined in netdev-provider.h requires the return
of error values when the 'netdev' has no assigned IPv6 address or
the 'netdev' does not support IPv6.  However, the netdev_linux_get_in6()
implementation does not follow this (always return 0).  And this
causes the a bug in deleting vlan interfaces created for vlan
splinter.

This commit makes netdev_linux_get_in6() conform to the API definition
and returns the specified error value when failing to get IPv6 address.

VMware-BZ: #1485521
Reported-by: Ronald Lee <ronaldlee@vmware.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/netdev-linux.c