summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/bgpd/rde.h3
-rw-r--r--usr.sbin/bgpd/rde_rib.c14
2 files changed, 7 insertions, 10 deletions
diff --git a/usr.sbin/bgpd/rde.h b/usr.sbin/bgpd/rde.h
index ed082de364a..5ff59dd4820 100644
--- a/usr.sbin/bgpd/rde.h
+++ b/usr.sbin/bgpd/rde.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.h,v 1.57 2004/09/28 15:48:52 claudio Exp $ */
+/* $OpenBSD: rde.h,v 1.58 2004/11/10 12:41:58 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> and
@@ -191,7 +191,6 @@ struct nexthop {
u_int8_t nexthop_netlen;
u_int8_t flags;
#define NEXTHOP_CONNECTED 0x01
-#define NEXTHOP_LINKLOCAL 0x02
};
/* generic entry without address specific part */
diff --git a/usr.sbin/bgpd/rde_rib.c b/usr.sbin/bgpd/rde_rib.c
index 39b9fe201eb..e0fca5bc461 100644
--- a/usr.sbin/bgpd/rde_rib.c
+++ b/usr.sbin/bgpd/rde_rib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_rib.c,v 1.59 2004/08/17 15:39:36 claudio Exp $ */
+/* $OpenBSD: rde_rib.c,v 1.60 2004/11/10 12:41:58 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org>
@@ -726,14 +726,12 @@ nexthop_update(struct kroute_nexthop *msg)
nh->state = NEXTHOP_UNREACH;
if (msg->connected) {
- if (!(nh->flags & NEXTHOP_LINKLOCAL))
- /* use linklocal address if provided */
- nh->true_nexthop = nh->exit_nexthop;
nh->flags |= NEXTHOP_CONNECTED;
- } else {
- nh->true_nexthop = msg->gateway;
- nh->flags &= ~NEXTHOP_LINKLOCAL;
- }
+ memcpy(&nh->true_nexthop, &nh->exit_nexthop,
+ sizeof(nh->true_nexthop));
+ } else
+ memcpy(&nh->true_nexthop, &msg->gateway,
+ sizeof(nh->true_nexthop));
nh->nexthop_netlen = msg->kr.kr4.prefixlen;
nh->nexthop_net.af = AF_INET;