summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2010-09-01 13:54:55 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2010-09-01 13:54:55 +0000
commit31ee4580c97a8106349c27092b402ec9514510b0 (patch)
treecb7e859667a132be50c9319d12ac4846c60cf711
parent0f2f71bb272dbc114719fadbea707bd36f9c8726 (diff)
s/lfib/fib/ for more consitency with the other routing daemons.
This started manly because of ldpctl beeing inconsistent and me misstyping lfib almost every time. OK michele@
-rw-r--r--usr.sbin/ldpd/control.c8
-rw-r--r--usr.sbin/ldpd/kroute.c8
-rw-r--r--usr.sbin/ldpd/ldpd.c12
-rw-r--r--usr.sbin/ldpd/ldpd.conf.56
-rw-r--r--usr.sbin/ldpd/ldpd.h12
-rw-r--r--usr.sbin/ldpd/ldpe.c14
-rw-r--r--usr.sbin/ldpd/parse.y12
7 files changed, 29 insertions, 43 deletions
diff --git a/usr.sbin/ldpd/control.c b/usr.sbin/ldpd/control.c
index 41ab2a0294e..42908960955 100644
--- a/usr.sbin/ldpd/control.c
+++ b/usr.sbin/ldpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.8 2010/05/14 11:52:19 claudio Exp $ */
+/* $OpenBSD: control.c,v 1.9 2010/09/01 13:54:54 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -220,10 +220,8 @@ control_dispatch_imsg(int fd, short event, void *bula)
break;
switch (imsg.hdr.type) {
- case IMSG_CTL_LFIB_COUPLE:
- case IMSG_CTL_LFIB_DECOUPLE:
- ldpe_fib_update(imsg.hdr.type);
- /* FALLTHROUGH */
+ case IMSG_CTL_FIB_COUPLE:
+ case IMSG_CTL_FIB_DECOUPLE:
case IMSG_CTL_RELOAD:
c->iev.ibuf.pid = imsg.hdr.pid;
ldpe_imsg_compose_parent(imsg.hdr.type, 0, NULL, 0);
diff --git a/usr.sbin/ldpd/kroute.c b/usr.sbin/ldpd/kroute.c
index 38e27a8c0ce..9b86138f550 100644
--- a/usr.sbin/ldpd/kroute.c
+++ b/usr.sbin/ldpd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.20 2010/07/12 14:35:13 bluhm Exp $ */
+/* $OpenBSD: kroute.c,v 1.21 2010/09/01 13:54:54 claudio Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -272,7 +272,7 @@ kr_delete(struct kroute *kroute)
void
kr_shutdown(void)
{
- kr_lfib_decouple();
+ kr_fib_decouple();
if (flag_all_routers) {
kr_state.fib_sync = 1; /* force removal of mulitcast route */
@@ -285,7 +285,7 @@ kr_shutdown(void)
}
void
-kr_lfib_couple(void)
+kr_fib_couple(void)
{
struct kroute_node *kr;
@@ -309,7 +309,7 @@ kr_lfib_couple(void)
}
void
-kr_lfib_decouple(void)
+kr_fib_decouple(void)
{
struct kroute_node *kr;
u_int32_t rl;
diff --git a/usr.sbin/ldpd/ldpd.c b/usr.sbin/ldpd/ldpd.c
index d665152af24..948679fa4fa 100644
--- a/usr.sbin/ldpd/ldpd.c
+++ b/usr.sbin/ldpd/ldpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldpd.c,v 1.11 2010/07/08 09:41:05 claudio Exp $ */
+/* $OpenBSD: ldpd.c,v 1.12 2010/09/01 13:54:54 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -256,7 +256,7 @@ main(int argc, char *argv[])
iev_lde->handler, iev_lde);
event_add(&iev_lde->ev, NULL);
- if (kr_init(!(ldpd_conf->flags & LDPD_FLAG_NO_LFIB_UPDATE)) == -1)
+ if (kr_init(!(ldpd_conf->flags & LDPD_FLAG_NO_FIB_UPDATE)) == -1)
fatalx("kr_init failed");
/* remove unneded stuff from config */
@@ -360,11 +360,11 @@ main_dispatch_ldpe(int fd, short event, void *bula)
log_debug("configuration reloaded");
break;
*/
- case IMSG_CTL_LFIB_COUPLE:
- kr_lfib_couple();
+ case IMSG_CTL_FIB_COUPLE:
+ kr_fib_couple();
break;
- case IMSG_CTL_LFIB_DECOUPLE:
- kr_lfib_decouple();
+ case IMSG_CTL_FIB_DECOUPLE:
+ kr_fib_decouple();
break;
case IMSG_CTL_KROUTE:
case IMSG_CTL_KROUTE_ADDR:
diff --git a/usr.sbin/ldpd/ldpd.conf.5 b/usr.sbin/ldpd/ldpd.conf.5
index ad0d56eced5..1da09bc756c 100644
--- a/usr.sbin/ldpd/ldpd.conf.5
+++ b/usr.sbin/ldpd/ldpd.conf.5
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ldpd.conf.5,v 1.4 2010/01/02 21:29:56 jmc Exp $
+.\" $OpenBSD: ldpd.conf.5,v 1.5 2010/09/01 13:54:54 claudio Exp $
.\"
.\" Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
.\" Copyright (c) 2005, 2006 Esben Norby <norby@openbsd.org>
@@ -18,7 +18,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: January 2 2010 $
+.Dd $Mdocdate: September 1 2010 $
.Dt LDPD.CONF 5
.Os
.Sh NAME
@@ -66,7 +66,7 @@ Global settings concerns the main behaviour of the daemon.
.Pp
.Bl -tag -width Ds -compact
.It Xo
-.Ic lfib-update
+.Ic fib-update
.Pq Ic yes Ns \&| Ns Ic no
.Xc
If set to
diff --git a/usr.sbin/ldpd/ldpd.h b/usr.sbin/ldpd/ldpd.h
index d218f0a102a..96823a982af 100644
--- a/usr.sbin/ldpd/ldpd.h
+++ b/usr.sbin/ldpd/ldpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldpd.h,v 1.24 2010/07/08 09:41:05 claudio Exp $ */
+/* $OpenBSD: ldpd.h,v 1.25 2010/09/01 13:54:54 claudio Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -46,7 +46,7 @@
#define MAX_RTSOCK_BUF 128 * 1024
#define LDP_BACKLOG 128
-#define LDPD_FLAG_NO_LFIB_UPDATE 0x0001
+#define LDPD_FLAG_NO_FIB_UPDATE 0x0001
#define F_LDPD_INSERTED 0x0001
#define F_CONNECTED 0x0002
@@ -75,8 +75,8 @@ enum imsg_type {
IMSG_CTL_SHOW_INTERFACE,
IMSG_CTL_SHOW_NBR,
IMSG_CTL_SHOW_LIB,
- IMSG_CTL_LFIB_COUPLE,
- IMSG_CTL_LFIB_DECOUPLE,
+ IMSG_CTL_FIB_COUPLE,
+ IMSG_CTL_FIB_DECOUPLE,
IMSG_CTL_KROUTE,
IMSG_CTL_KROUTE_ADDR,
IMSG_CTL_IFINFO,
@@ -393,8 +393,8 @@ int kr_init(int);
int kr_change(struct kroute *);
int kr_delete(struct kroute *);
void kr_shutdown(void);
-void kr_lfib_couple(void);
-void kr_lfib_decouple(void);
+void kr_fib_couple(void);
+void kr_fib_decouple(void);
void kr_dispatch_msg(int, short, void *);
void kr_show_route(struct imsg *);
void kr_ifinfo(char *, pid_t);
diff --git a/usr.sbin/ldpd/ldpe.c b/usr.sbin/ldpd/ldpe.c
index a2b802a0a5b..4079eb0481a 100644
--- a/usr.sbin/ldpd/ldpe.c
+++ b/usr.sbin/ldpd/ldpe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldpe.c,v 1.11 2010/07/08 09:41:05 claudio Exp $ */
+/* $OpenBSD: ldpe.c,v 1.12 2010/09/01 13:54:54 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -51,7 +51,6 @@ void recv_packet(int, short, void *);
struct ldpd_conf *leconf = NULL, *nconf;
struct imsgev *iev_main;
struct imsgev *iev_lde;
-int oe_nofib;
/* ARGSUSED */
void
@@ -143,8 +142,6 @@ ldpe(struct ldpd_conf *xconf, int pipe_parent2ldpe[2], int pipe_ldpe2lde[2],
session_socket_blockmode(xconf->ldp_session_socket, BM_NONBLOCK);
leconf = xconf;
- if (leconf->flags & LDPD_FLAG_NO_LFIB_UPDATE)
- oe_nofib = 1;
if ((pw = getpwnam(LDPD_USER)) == NULL)
fatal("getpwnam");
@@ -509,15 +506,6 @@ ldpe_router_id(void)
}
void
-ldpe_fib_update(int type)
-{
- if (type == IMSG_CTL_LFIB_COUPLE)
- oe_nofib = 0;
- if (type == IMSG_CTL_LFIB_DECOUPLE)
- oe_nofib = 1;
-}
-
-void
ldpe_iface_ctl(struct ctl_conn *c, unsigned int idx)
{
struct iface *iface;
diff --git a/usr.sbin/ldpd/parse.y b/usr.sbin/ldpd/parse.y
index 52a3c0688c5..ed4bc2a7558 100644
--- a/usr.sbin/ldpd/parse.y
+++ b/usr.sbin/ldpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.6 2010/08/03 18:42:40 henning Exp $ */
+/* $OpenBSD: parse.y,v 1.7 2010/09/01 13:54:54 claudio Exp $ */
/*
* Copyright (c) 2004, 2005, 2008 Esben Norby <norby@openbsd.org>
@@ -107,7 +107,7 @@ typedef struct {
%}
-%token LSPACE INTERFACE ROUTERID LFIBUPDATE
+%token LSPACE INTERFACE ROUTERID FIBUPDATE
%token HOLDTIME HELLOINTERVAL KEEPALIVE
%token DISTRIBUTION RETENTION ADVERTISEMENT
%token EXTTAG PASSIVE
@@ -164,11 +164,11 @@ conf_main : ROUTERID STRING {
}
free($2);
}
- | LFIBUPDATE yesno {
+ | FIBUPDATE yesno {
if ($2 == 0)
- conf->flags |= LDPD_FLAG_NO_LFIB_UPDATE;
+ conf->flags |= LDPD_FLAG_NO_FIB_UPDATE;
else
- conf->flags &= ~LDPD_FLAG_NO_LFIB_UPDATE;
+ conf->flags &= ~LDPD_FLAG_NO_FIB_UPDATE;
}
| DISTRIBUTION STRING {
conf->mode &= ~(MODE_DIST_INDEPENDENT |
@@ -348,12 +348,12 @@ lookup(char *s)
{"advertisement", ADVERTISEMENT},
{"distribution", DISTRIBUTION},
{"external-tag", EXTTAG},
+ {"fib-update", FIBUPDATE},
{"hello-interval", HELLOINTERVAL},
{"holdtime", HOLDTIME},
{"interface", INTERFACE},
{"keepalive", KEEPALIVE},
{"labelspace", LSPACE},
- {"lfib-update", LFIBUPDATE},
{"passive", PASSIVE},
{"retention", RETENTION},
{"router-id", ROUTERID},