summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde_rib.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2004-08-10 13:02:09 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2004-08-10 13:02:09 +0000
commit8babc5b23252c7e76e17692fe161aae7ab7cd71f (patch)
treebff104a2696e1ce7d6e0e71ef13cc74fdadba1e9 /usr.sbin/bgpd/rde_rib.c
parentf8e38e32bed384b5e3285f0135e86c32d6ec684d (diff)
switch nexthop in struct filter_set form struct in_addr to struct bgpd_addr
OK henning@
Diffstat (limited to 'usr.sbin/bgpd/rde_rib.c')
-rw-r--r--usr.sbin/bgpd/rde_rib.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/rde_rib.c b/usr.sbin/bgpd/rde_rib.c
index ed127353780..2d3281129ee 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.55 2004/08/06 12:04:08 claudio Exp $ */
+/* $OpenBSD: rde_rib.c,v 1.56 2004/08/10 13:02:08 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org>
@@ -732,7 +732,8 @@ nexthop_update(struct kroute_nexthop *msg)
}
void
-nexthop_modify(struct rde_aspath *asp, struct bgpd_addr *nexthop, int flags)
+nexthop_modify(struct rde_aspath *asp, struct bgpd_addr *nexthop, int flags,
+ sa_family_t af)
{
struct nexthop *nh;
@@ -740,8 +741,10 @@ nexthop_modify(struct rde_aspath *asp, struct bgpd_addr *nexthop, int flags)
asp->flags |= F_NEXTHOP_REJECT;
if (flags & SET_NEXTHOP_BLACKHOLE)
asp->flags |= F_NEXTHOP_BLACKHOLE;
- if (!(flags & SET_NEXTHOP))
+ if (!(flags & SET_NEXTHOP) ||
+ af != nexthop->af)
return;
+
nh = nexthop_get(nexthop, NULL);
nexthop_unlink(asp);
asp->nexthop = nh;