netdev-bsd: Correctly handle IPv4 netmasks.
authorBen Pfaff <blp@nicira.com>
Wed, 31 Jul 2013 22:22:12 +0000 (15:22 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 8 Aug 2013 06:40:31 +0000 (23:40 -0700)
commit2b906eca2a06b2d351118041bc9a7b8d118eb626
treed543979df0f7b6b8ae0b6cf6a4debdf4a65f508a
parenta5440992d69e488e58424dfea2a0c45e5dc1c7e4
netdev-bsd: Correctly handle IPv4 netmasks.

netdev_bsd_get_in4() did not set anything in its 'netmask' output argument
if the IPv4 address was cached, leaving it indeterminate.  It would also
mark the cache as valid even if there was an error retrieving the netmask.
This fixes both problems.

Found by inspection.

Signed-off-by: Ben Pfaff <blp@nicira.com>
CC: Ed Maste <emaste@freebsd.org>
lib/netdev-bsd.c