#if 0'ed undo code for interface address addition failure.
it was a bit too strong, and forbids multiple addresses from same prefix to be assigned. now the behavior is the same as previous - memory leak on interface address addition failure. http://orange.kame.net/dev/query-pr.cgi?pr=218
This commit is contained in:
parent
761188a49b
commit
d926d6fa47
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: in.c,v 1.56 2000/03/12 05:01:16 itojun Exp $ */
|
||||
/* $NetBSD: in.c,v 1.57 2000/03/18 02:41:58 itojun Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
@ -476,6 +476,7 @@ in_control(so, cmd, data, ifp, p)
|
||||
|
||||
case SIOCSIFADDR:
|
||||
error = in_ifinit(ifp, ia, satosin(&ifr->ifr_addr), 1);
|
||||
#if 0
|
||||
undo:
|
||||
if (error && newifaddr) {
|
||||
TAILQ_REMOVE(&ifp->if_addrlist, &ia->ia_ifa, ifa_list);
|
||||
@ -485,6 +486,7 @@ in_control(so, cmd, data, ifp, p)
|
||||
if ((ifp->if_flags & IFF_LOOPBACK) == 0)
|
||||
in_interfaces--;
|
||||
}
|
||||
#endif
|
||||
return error;
|
||||
|
||||
case SIOCSIFNETMASK:
|
||||
@ -518,8 +520,10 @@ in_control(so, cmd, data, ifp, p)
|
||||
if (ifra->ifra_addr.sin_family == AF_INET &&
|
||||
(hostIsNew || maskIsNew)) {
|
||||
error = in_ifinit(ifp, ia, &ifra->ifra_addr, 0);
|
||||
#if 0
|
||||
if (error)
|
||||
goto undo;
|
||||
#endif
|
||||
}
|
||||
if ((ifp->if_flags & IFF_BROADCAST) &&
|
||||
(ifra->ifra_broadaddr.sin_family == AF_INET))
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: in6.c,v 1.24 2000/03/12 05:23:07 itojun Exp $ */
|
||||
/* $NetBSD: in6.c,v 1.25 2000/03/18 02:41:59 itojun Exp $ */
|
||||
/* $KAME: in6.c,v 1.56 2000/03/02 07:11:00 itojun Exp $ */
|
||||
|
||||
/*
|
||||
@ -644,6 +644,7 @@ in6_control(so, cmd, data, ifp, p)
|
||||
|
||||
case SIOCSIFADDR_IN6:
|
||||
error = in6_ifinit(ifp, ia, &ifr->ifr_addr, 1);
|
||||
#if 0
|
||||
undo:
|
||||
if (error && newifaddr) {
|
||||
TAILQ_REMOVE(&ifp->if_addrlist, &ia->ia_ifa, ifa_list);
|
||||
@ -664,6 +665,7 @@ in6_control(so, cmd, data, ifp, p)
|
||||
}
|
||||
IFAFREE(&ia->ia_ifa);
|
||||
}
|
||||
#endif
|
||||
return error;
|
||||
|
||||
#ifdef COMPAT_IN6IFIOCTL /* XXX should be unused */
|
||||
@ -746,8 +748,10 @@ in6_control(so, cmd, data, ifp, p)
|
||||
}
|
||||
if (hostIsNew || prefixIsNew) {
|
||||
error = in6_ifinit(ifp, ia, &ifra->ifra_addr, 0);
|
||||
#if 0
|
||||
if (error)
|
||||
goto undo;
|
||||
#endif
|
||||
}
|
||||
if (hostIsNew && (ifp->if_flags & IFF_MULTICAST)) {
|
||||
int error_local = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user