Remove the #if 1 / #endif around some code that appears to be

responsible deleting the 'first' AF_INET address on the interface if the
target address has family == AF_UNSPEC.
This commit is contained in:
dyoung 2011-10-28 22:23:54 +00:00
parent 53c8737e53
commit b16114789d

View File

@ -1,4 +1,4 @@
/* $NetBSD: in.c,v 1.139 2011/10/19 01:52:22 dyoung Exp $ */
/* $NetBSD: in.c,v 1.140 2011/10/28 22:23:54 dyoung Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.139 2011/10/19 01:52:22 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.140 2011/10/28 22:23:54 dyoung Exp $");
#include "opt_inet.h"
#include "opt_inet_conf.h"
@ -352,12 +352,10 @@ in_control(struct socket *so, u_long cmd, void *data, struct ifnet *ifp,
if ((cmd == SIOCDIFADDR || cmd == SIOCGIFALIAS) && ia == NULL)
return (EADDRNOTAVAIL);
#if 1 /*def COMPAT_43*/
if (cmd == SIOCDIFADDR &&
ifra->ifra_addr.sin_family == AF_UNSPEC) {
ifra->ifra_addr.sin_family = AF_INET;
}
#endif
/* FALLTHROUGH */
case SIOCSIFADDR:
case SIOCSIFDSTADDR: