summaryrefslogtreecommitdiff
path: root/sys/netinet6/in6.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2016-07-13 08:40:47 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2016-07-13 08:40:47 +0000
commitf32428ef3ea79eefd8eb2d483c7a452aff5be8aa (patch)
tree92426a4fbeb9d7dde8fde801e2ac98b04f4ea2a0 /sys/netinet6/in6.c
parent9fc9082205665b1e1df61ad29f650cd7d123dfbd (diff)
Introduce RTF_MULTICAST and flag corresponding IPv6 routes as such
instead of abusing RTF_CLONING. Fix a leak reporeted by Aaron Riekenberg on misc@, ok sthen@
Diffstat (limited to 'sys/netinet6/in6.c')
-rw-r--r--sys/netinet6/in6.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index 0de02a67d8d..bd0b3155629 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6.c,v 1.188 2016/07/05 10:17:14 mpi Exp $ */
+/* $OpenBSD: in6.c,v 1.189 2016/07/13 08:40:46 mpi Exp $ */
/* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */
/*
@@ -757,8 +757,7 @@ in6_update_ifa(struct ifnet *ifp, struct in6_aliasreq *ifra,
info.rti_info[RTAX_GATEWAY] = sin6tosa(&ia6->ia_addr);
info.rti_info[RTAX_NETMASK] = sin6tosa(&mltmask);
info.rti_info[RTAX_IFA] = sin6tosa(&ia6->ia_addr);
- /* XXX: we need RTF_CLONING to fake nd6_rtrequest */
- info.rti_flags = RTF_CLONING;
+ info.rti_flags = RTF_MULTICAST;
error = rtrequest(RTM_ADD, &info, RTP_CONNECTED, NULL,
ifp->if_rdomain);
if (error)
@@ -814,7 +813,7 @@ in6_update_ifa(struct ifnet *ifp, struct in6_aliasreq *ifra,
info.rti_info[RTAX_GATEWAY] = sin6tosa(&ia6->ia_addr);
info.rti_info[RTAX_NETMASK] = sin6tosa(&mltmask);
info.rti_info[RTAX_IFA] = sin6tosa(&ia6->ia_addr);
- info.rti_flags = RTF_CLONING;
+ info.rti_flags = RTF_MULTICAST;
error = rtrequest(RTM_ADD, &info, RTP_CONNECTED, NULL,
ifp->if_rdomain);
if (error)