summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-07-08 07:56:52 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-07-08 07:56:52 +0000
commit01d38b21903899f9771cd07a54f45188c969a7bc (patch)
tree2a0eac84a4bd8e58aaf49880a28ec65403e55bd7 /sys/netinet6
parent3868f357f900c737e1576a6cbf60fb242961dcc1 (diff)
Use a new RTF_CONNECTED flag for interface (connected) routes.
Recent changes to support multiple interface routes broke the assumption made by all our userland routing daemons concerning interface routes. Historically such routes had a "gateway" sockaddr of type AF_LINK. But to be able to support multiple interface routes as any other multipath routes, they now have a unique "gateway" sockaddr containing their corresponding IP address. This self-describing flag should avoid ambiguity when dealing with interface routes. Issue reported by <mxb AT alumni DOT chalmers DOT se> and benno@ ok claudio@, benno@
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/nd6_rtr.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c
index 9acef421b86..6eeb29149cb 100644
--- a/sys/netinet6/nd6_rtr.c
+++ b/sys/netinet6/nd6_rtr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6_rtr.c,v 1.107 2015/06/16 11:09:40 mpi Exp $ */
+/* $OpenBSD: nd6_rtr.c,v 1.108 2015/07/08 07:56:51 mpi Exp $ */
/* $KAME: nd6_rtr.c,v 1.97 2001/02/07 11:09:13 itojun Exp $ */
/*
@@ -1735,12 +1735,10 @@ nd6_prefix_onlink(struct nd_prefix *pr)
mask6.sin6_len = sizeof(mask6);
mask6.sin6_addr = pr->ndpr_mask;
- /* rtrequest1() will probably set RTF_UP, but we're not sure. */
- rtflags = RTF_UP;
if (nd6_need_cache(ifp))
- rtflags |= RTF_CLONING;
+ rtflags = (RTF_UP | RTF_CLONING | RTF_CONNECTED);
else
- rtflags &= ~RTF_CLONING;
+ rtflags = RTF_UP;
bzero(&info, sizeof(info));
info.rti_flags = rtflags;