summaryrefslogtreecommitdiff
path: root/sys/net/route.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2011-07-04 04:29:18 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2011-07-04 04:29:18 +0000
commitef5f1b83a6551f7b66a6fb3c9960750efe43882a (patch)
tree39de6aa19a14bab7ac054d92e2b8c1db4f81461e /sys/net/route.c
parent7c72c5061a097ed3358cd701f56f4a8918038be1 (diff)
LINK_STATE cleanup. It is no longer needed to special case carp(4).
LINK_STATE_IS_UP() does the trick now for all cases. OK henning@ deraadt@
Diffstat (limited to 'sys/net/route.c')
-rw-r--r--sys/net/route.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index 90acfb7cbf1..e928158718f 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.130 2011/04/04 16:06:13 blambert Exp $ */
+/* $OpenBSD: route.c,v 1.131 2011/07/04 04:29:17 claudio Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
@@ -854,9 +854,8 @@ rtrequest1(int req, struct rt_addrinfo *info, u_int8_t prio,
senderr(EEXIST);
}
/* check the link state since the table supports it */
- if ((LINK_STATE_IS_UP(ifa->ifa_ifp->if_link_state) ||
- ifa->ifa_ifp->if_link_state == LINK_STATE_UNKNOWN)
- && ifa->ifa_ifp->if_flags & IFF_UP)
+ if (LINK_STATE_IS_UP(ifa->ifa_ifp->if_link_state) &&
+ ifa->ifa_ifp->if_flags & IFF_UP)
rt->rt_flags |= RTF_UP;
else {
rt->rt_flags &= ~RTF_UP;
@@ -1528,8 +1527,7 @@ rt_if_linkstate_change(struct radix_node *rn, void *arg, u_int id)
struct rtentry *rt = (struct rtentry *)rn;
if (rt->rt_ifp == ifp) {
- if ((LINK_STATE_IS_UP(ifp->if_link_state) ||
- ifp->if_link_state == LINK_STATE_UNKNOWN) &&
+ if (LINK_STATE_IS_UP(ifp->if_link_state) &&
ifp->if_flags & IFF_UP) {
if (!(rt->rt_flags & RTF_UP)) {
/* bring route up */