I think we should not do the same for get_in4(). If interface is not assigned with ipv4 address, ioctl function will return errno 99. Then user could later assign a valid ip. But caching error number makes ovs never check again. (unless react to RTNLGRP_LINK notification and mark it as invalid)
This also makes me wondering, if the same thing could happen to get_in6()? How do we cope with ipv6 address change? Thanks, Alex Wang, On Fri, Jul 24, 2015 at 9:37 AM, Ben Pfaff <b...@nicira.com> wrote: > On Fri, Jul 24, 2015 at 09:41:11AM -0700, Alex Wang wrote: > > 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 <ronald...@vmware.com> > > Signed-off-by: Alex Wang <al...@nicira.com> > > > > --- > > PATCH->V2: > > - Take Ben's advice and cache the error. > > Acked-by: Ben Pfaff <b...@nicira.com> > _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev