From 84a256c9180fb5c9d744493bbdc33b664c93ded2 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Thu, 25 Dec 2003 23:41:24 +0000 Subject: Turn the nexthop verification on. At least in the RDE. ok henning@ --- usr.sbin/bgpd/rde.c | 10 ++-------- usr.sbin/bgpd/rde_rib.c | 5 ++--- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index 0d3e0718853..cbecc69fe20 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.30 2003/12/25 23:22:13 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.31 2003/12/25 23:41:23 claudio Exp $ */ /* * Copyright (c) 2003 Henning Brauer @@ -241,6 +241,7 @@ rde_dispatch_imsg(struct imsgbuf *ibuf, int idx) case IMSG_NEXTHOP_UPDATE: if (idx != PFD_PIPE_MAIN) fatal("nexthop response not from parent", 0); + nexthop_update(imsg.data); break; case IMSG_MRT_REQ: if (idx != PFD_PIPE_MAIN) @@ -263,13 +264,6 @@ rde_dispatch_imsg(struct imsgbuf *ibuf, int idx) } } -/* - * rde_request_dispatch() -- handle all messages comming form the parent. - * This are reconfiguration request and inquiries. - * XXX most is done in rde_dispatch_imsg so probably drop this function. - */ - - /* * rde_update_dispatch() -- handle routing updates comming from the session * engine. diff --git a/usr.sbin/bgpd/rde_rib.c b/usr.sbin/bgpd/rde_rib.c index 556393d197f..eb93ec810e1 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.7 2003/12/25 23:22:13 claudio Exp $ */ +/* $OpenBSD: rde_rib.c,v 1.8 2003/12/25 23:41:23 claudio Exp $ */ /* * Copyright (c) 2003 Claudio Jeker @@ -948,8 +948,7 @@ nexthop_add(struct rde_aspath *asp) nh = nexthop_get(asp->flags.nexthop.s_addr); if (nh == NULL) { nh = nexthop_alloc(); - //nh->state = NEXTHOP_LOOKUP; - nh->state = NEXTHOP_REACH; + nh->state = NEXTHOP_LOOKUP; nh->exit_nexthop = asp->flags.nexthop; LIST_INSERT_HEAD(NEXTHOP_HASH(asp->flags.nexthop.s_addr), nh, nexthop_l); -- cgit v1.2.3