diff options
author | glebius <glebius@FreeBSD.org> | 2011-11-22 19:37:57 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2011-11-22 19:37:57 +0000 |
commit | 3555b318c5d15be0a28e83581556858e10ddea1e (patch) | |
tree | 6204d5fdaf091b63304db560b49e63631a79d62b | |
parent | c20986bc61d36fa343f74f7e5f03b4a356a00366 (diff) | |
download | FreeBSD-src-3555b318c5d15be0a28e83581556858e10ddea1e.zip FreeBSD-src-3555b318c5d15be0a28e83581556858e10ddea1e.tar.gz |
Fix SIOCDIFADDR semantics: if no address is specified, then delete first one.
-rw-r--r-- | sys/netinet/in.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/in.c b/sys/netinet/in.c index 84d6a21..e3591ac 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -375,7 +375,7 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp, switch (cmd) { case SIOCAIFADDR: case SIOCDIFADDR: - { + if (ifra->ifra_addr.sin_len == AF_INET) { struct in_ifaddr *oia; IN_IFADDR_RLOCK(); |