-/* $OpenBSD: in.c,v 1.16 2000/03/12 06:46:31 itojun Exp $ */
+/* $OpenBSD: in.c,v 1.17 2000/03/22 03:48:30 itojun Exp $ */
/* $NetBSD: in.c,v 1.26 1996/02/13 23:41:39 christos Exp $ */
/*
case SIOCSIFADDR:
error = in_ifinit(ifp, ia, satosin(&ifr->ifr_addr), 1);
+#if 0
+ /*
+ * the code chokes if we are to assign multiple addresses with
+ * the same address prefix (rtinit() will return EEXIST, which
+ * is not fatal actually). we will get memory leak if we
+ * don't do it.
+ * -> we may want to hide EEXIST from rtinit().
+ */
undo:
if (error && newifaddr){
TAILQ_REMOVE(&ifp->if_addrlist, &ia->ia_ifa, ifa_list);
if ((ifp->if_flags & IFF_LOOPBACK) == 0)
in_interfaces--;
}
+#endif
return error;
case SIOCSIFNETMASK:
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))
-/* $OpenBSD: in6.c,v 1.16 2000/03/12 06:16:58 itojun Exp $ */
-/* $KAME: in6.c,v 1.55 2000/02/25 00:32:23 itojun Exp $ */
+/* $OpenBSD: in6.c,v 1.17 2000/03/22 03:48:30 itojun Exp $ */
+/* $KAME: in6.c,v 1.63 2000/03/21 05:18:38 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
case SIOCSIFADDR_IN6:
error = in6_ifinit(ifp, ia, &ifr->ifr_addr, 1);
+#if 0
+ /*
+ * the code chokes if we are to assign multiple addresses with
+ * the same address prefix (rtinit() will return EEXIST, which
+ * is not fatal actually). we will get memory leak if we
+ * don't do it.
+ * -> we may want to hide EEXIST from rtinit().
+ */
undo:
if (error && newifaddr) {
TAILQ_REMOVE(&ifp->if_addrlist, &ia->ia_ifa, ifa_list);
}
IFAFREE(&ia->ia_ifa);
}
+#endif
return error;
#ifdef COMPAT_IN6IFIOCTL /* XXX should be unused */
}
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;