Fix SIOCDIFADDR semantics: if no address is specified, then delete first one.

This commit is contained in:
glebius 2011-11-22 19:37:57 +00:00
parent c20986bc61
commit 3555b318c5

View File

@ -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();