summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2016-11-14 12:45:31 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2016-11-14 12:45:31 +0000
commit262c83091de6d3f15b7ccc69c09356ae1f7128cc (patch)
treeea3dcb65f9f5d66c21732d1e4df06a603accc9bb /sys
parent6240fb39f5089eae779684dd38789ef5a16ea0bf (diff)
Reflect interface priorities when inserting RTF_CONNECTED routes.
When multiple RTF_CLONING routes exist for a given subnet, bringing one of the interfaces up/down could make impossible to insert new ARP/NDP entries. In this case the first RTF_CONNECTED route of the multipath list no longer corresponded to the wired interface because it had the same priority as the carp(4) route. This is another regression of supporting multiple RTF_CONNECTED routes. Fix a bug with a CARP setup reported by stsp@ ok stsp@
Diffstat (limited to 'sys')
-rw-r--r--sys/net/route.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index 3146867ab3a..73e6ba0e8c3 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.336 2016/11/14 10:32:46 mpi Exp $ */
+/* $OpenBSD: route.c,v 1.337 2016/11/14 12:45:30 mpi Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
@@ -1215,7 +1215,7 @@ rt_ifa_add(struct ifaddr *ifa, int flags, struct sockaddr *dst)
prio = RTP_LOCAL;
if (flags & RTF_CONNECTED)
- prio = RTP_CONNECTED;
+ prio = ifp->if_priority + RTP_CONNECTED;
error = rtrequest(RTM_ADD, &info, prio, &rt, rtableid);
if (error == 0) {