summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-03-22 03:48:31 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-03-22 03:48:31 +0000
commit3286d6b6e228d4fc5d1dc8f1cedab7d76d8b6149 (patch)
treeacdf536b6eb5e392d41e02c2d8f878504de038a7 /sys/netinet6
parentb3d7365d989e56c12d526e2d8f15e10b8debac9d (diff)
comment out ifconfig undo code. they are necessary to avoid memory
leakage, however, was too strict that they disallow multiple address from same prefix to be assigned (when rtinit returns EEXIST). we'll need to improve it.
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/in6.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index 296eacb83b3..5e1930cb4e9 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -1,5 +1,5 @@
-/* $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.
@@ -628,6 +628,14 @@ in6_control(so, cmd, data, ifp, p)
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);
@@ -648,6 +656,7 @@ in6_control(so, cmd, data, ifp, p)
}
IFAFREE(&ia->ia_ifa);
}
+#endif
return error;
#ifdef COMPAT_IN6IFIOCTL /* XXX should be unused */
@@ -730,8 +739,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;