summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2008-05-08 13:07:23 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2008-05-08 13:07:23 +0000
commit9dbb36905adce5fd7dbdbc73b76db64b42cfbd1f (patch)
treea27a4e9d79f21062b6d53acc91ab19815e2dbcf3
parent01f8555f7752900bd44421dd9de121aaa246b426 (diff)
backout shit committed on accident
-rw-r--r--usr.sbin/bgpd/kroute.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/bgpd/kroute.c b/usr.sbin/bgpd/kroute.c
index 8734cc29add..7f85dfdb413 100644
--- a/usr.sbin/bgpd/kroute.c
+++ b/usr.sbin/bgpd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.158 2008/05/08 07:40:03 henning Exp $ */
+/* $OpenBSD: kroute.c,v 1.159 2008/05/08 13:07:22 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -2030,8 +2030,6 @@ fetchtable(u_int rtableid, int connected_only)
kr->r.flags = F_KERNEL;
kr->r.ifindex = rtm->rtm_index;
- if (rtm->rtm_index)
- kr->r.flags |= F_CONNECTED;
kr->r.prefix.s_addr =
((struct sockaddr_in *)sa)->sin_addr.s_addr;
sa_in = (struct sockaddr_in *)rti_info[RTAX_NETMASK];
@@ -2064,8 +2062,6 @@ fetchtable(u_int rtableid, int connected_only)
kr6->r.flags = F_KERNEL;
kr6->r.ifindex = rtm->rtm_index;
- if (rtm->rtm_index)
- kr6->r.flags |= F_CONNECTED;
memcpy(&kr6->r.prefix,
&((struct sockaddr_in6 *)sa)->sin6_addr,
sizeof(kr6->r.prefix));
@@ -2108,6 +2104,10 @@ fetchtable(u_int rtableid, int connected_only)
sizeof(kr6->r.nexthop));
break;
case AF_LINK:
+ if (sa->sa_family == AF_INET)
+ kr->r.flags |= F_CONNECTED;
+ else if (sa->sa_family == AF_INET6)
+ kr6->r.flags |= F_CONNECTED;
break;
}