From 5ccc261513acf225981dd21bea202fea8c25ed3c Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Thu, 25 Dec 2003 02:24:27 +0000 Subject: kill IMSG_KROUTE_ADD as well. just send KROUTE_CHANGE requests. --- usr.sbin/bgpd/bgpd.c | 9 ++------- usr.sbin/bgpd/bgpd.h | 3 +-- usr.sbin/bgpd/rde.c | 7 ++----- 3 files changed, 5 insertions(+), 14 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/bgpd/bgpd.c b/usr.sbin/bgpd/bgpd.c index 468a6842882..d2a7468bdb8 100644 --- a/usr.sbin/bgpd/bgpd.c +++ b/usr.sbin/bgpd/bgpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.c,v 1.27 2003/12/25 02:09:19 henning Exp $ */ +/* $OpenBSD: bgpd.c,v 1.28 2003/12/25 02:24:26 henning Exp $ */ /* * Copyright (c) 2003 Henning Brauer @@ -335,17 +335,12 @@ dispatch_imsg(struct imsgbuf *ibuf, int idx, struct mrt_config *conf) break; } break; - case IMSG_KROUTE_ADD: - if (idx != PFD_PIPE_ROUTE) - fatal("route request not from RDE", 0); - if (kroute_change(rfd, imsg.data)) - fatal("kroute_add error", errno); - break; case IMSG_KROUTE_CHANGE: if (idx != PFD_PIPE_ROUTE) fatal("route request not from RDE", 0); if (kroute_change(rfd, imsg.data)) fatal("kroute_change error", errno); + break; case IMSG_KROUTE_DELETE: if (idx != PFD_PIPE_ROUTE) fatal("route request not from RDE", 0); diff --git a/usr.sbin/bgpd/bgpd.h b/usr.sbin/bgpd/bgpd.h index e35242314ee..8f407572fe2 100644 --- a/usr.sbin/bgpd/bgpd.h +++ b/usr.sbin/bgpd/bgpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.h,v 1.22 2003/12/25 02:09:19 henning Exp $ */ +/* $OpenBSD: bgpd.h,v 1.23 2003/12/25 02:24:26 henning Exp $ */ /* * Copyright (c) 2003 Henning Brauer @@ -210,7 +210,6 @@ enum imsg_type { IMSG_MRT_REQ, IMSG_MRT_MSG, IMSG_MRT_END, - IMSG_KROUTE_ADD, IMSG_KROUTE_CHANGE, IMSG_KROUTE_DELETE }; diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index c73b2fdc027..c761cbc1869 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.28 2003/12/24 23:48:06 henning Exp $ */ +/* $OpenBSD: rde.c,v 1.29 2003/12/25 02:24:26 henning Exp $ */ /* * Copyright (c) 2003 Henning Brauer @@ -515,10 +515,7 @@ rde_send_kroute(struct prefix *new, struct prefix *old) if (old == NULL && new == NULL) return; - if (old == NULL) { - type = IMSG_KROUTE_ADD; - p = new; - } else if (new == NULL || new->aspath->state == NEXTHOP_UNREACH) { + if (new == NULL || new->aspath->state == NEXTHOP_UNREACH) { type = IMSG_KROUTE_DELETE; p = old; } else { -- cgit v1.2.3