diff options
author | 2015-09-21 11:15:27 +0000 | |
---|---|---|
committer | 2015-09-21 11:15:27 +0000 | |
commit | 829e8109f8ccbda092304dad176653a5ed74c868 (patch) | |
tree | 50022d6200fc9f6fd91c053a77bc509b996ef84e | |
parent | spelling fix; (diff) | |
download | wireguard-openbsd-829e8109f8ccbda092304dad176653a5ed74c868.tar.xz wireguard-openbsd-829e8109f8ccbda092304dad176653a5ed74c868.zip |
Set the correct priority for connected routes.
Found by benno@.
ok phessler@, claudio@, benno@
-rw-r--r-- | sys/net/route.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/route.c b/sys/net/route.c index ff26860af9d..bd949b585a8 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.239 2015/09/12 20:50:17 mpi Exp $ */ +/* $OpenBSD: route.c,v 1.240 2015/09/21 11:15:27 mpi Exp $ */ /* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */ /* @@ -1195,6 +1195,9 @@ rt_ifa_add(struct ifaddr *ifa, int flags, struct sockaddr *dst) if (flags & (RTF_LOCAL|RTF_BROADCAST)) prio = RTP_LOCAL; + if (flags & RTF_CONNECTED) + prio = RTP_CONNECTED; + error = rtrequest1(RTM_ADD, &info, prio, &rt, rtableid); if (error == 0) { if (rt->rt_ifa != ifa) { |