diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-01-12 13:33:17 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-01-12 13:33:17 +0000 |
commit | 1b90e602977493019983f46c9113241a59e7cc59 (patch) | |
tree | 5c28236b9fbe95fda774009953a4903b4ab68a90 /usr.sbin/bgpd/rde_rib.c | |
parent | 9963d85edc566970b02ecb6373709ed448799d06 (diff) |
Nexthop announcement fixup. There are different rules for ibgp and ebgp.
For ibgp the nexthop is normally passed unmodified unless the nexthop is
equal to the remote peer ip. To ebgp peers the nexthop is changed to the
local session ip unless the remote peer ip and the nexthop are on the same
subnet. OK henning@
Diffstat (limited to 'usr.sbin/bgpd/rde_rib.c')
-rw-r--r-- | usr.sbin/bgpd/rde_rib.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/rde_rib.c b/usr.sbin/bgpd/rde_rib.c index 21d593f1ee7..e9c71336283 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.21 2004/01/11 22:08:04 henning Exp $ */ +/* $OpenBSD: rde_rib.c,v 1.22 2004/01/12 13:33:16 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> @@ -1111,6 +1111,10 @@ nexthop_update(struct kroute_nexthop *msg) memcpy(&nh->true_nexthop, &msg->gateway, sizeof(nh->true_nexthop)); + nh->nexthop_netlen = msg->kr.prefixlen; + nh->nexthop_net.af = AF_INET; + nh->nexthop_net.v4.s_addr = msg->kr.prefix; + nh->connected = msg->connected; LIST_FOREACH(asp, &nh->path_h, nexthop_l) { |