diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2003-12-25 23:22:14 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2003-12-25 23:22:14 +0000 |
commit | 04caca02d32d49591e39b12c20bbff3856cf7f16 (patch) | |
tree | 12bc73f6db7ed918506598fce2a810b55dab5539 /usr.sbin/bgpd/rde.c | |
parent | ace6e29365b585df8eba49386d9463030bd32a5c (diff) |
RDE part of the nexthop verification puzzle.
The RDE just tracks the nexthop IPs and reacts on nexthop messages
from the parent.
ok henning@
Diffstat (limited to 'usr.sbin/bgpd/rde.c')
-rw-r--r-- | usr.sbin/bgpd/rde.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index c761cbc1869..0d3e0718853 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.29 2003/12/25 02:24:26 henning Exp $ */ +/* $OpenBSD: rde.c,v 1.30 2003/12/25 23:22:13 claudio Exp $ */ /* * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> @@ -238,6 +238,10 @@ rde_dispatch_imsg(struct imsgbuf *ibuf, int idx) fatal("session msg not from session engine", 0); peer_down(imsg.hdr.peerid); break; + case IMSG_NEXTHOP_UPDATE: + if (idx != PFD_PIPE_MAIN) + fatal("nexthop response not from parent", 0); + break; case IMSG_MRT_REQ: if (idx != PFD_PIPE_MAIN) fatal("mrt request not from parent", 0); @@ -531,6 +535,20 @@ rde_send_kroute(struct prefix *new, struct prefix *old) } /* + * nexthop specific functions + */ +void +rde_send_nexthop(in_addr_t next, int valid) +{ + if (valid) + imsg_compose(&ibuf_main, IMSG_NEXTHOP_ADD, 0, + &next, sizeof(next)); + else + imsg_compose(&ibuf_main, IMSG_NEXTHOP_REMOVE, 0, + &next, sizeof(next)); +} + +/* * peer functions */ struct peer_table { |