diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2013-06-03 17:02:00 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2013-06-03 17:02:00 +0000 |
commit | ee519c8e6b33a351bcb263ad82a98963968850d2 (patch) | |
tree | 4f2e783220a37f5bf82e47c7562bffc3185b1885 /usr.sbin/ldpd/lde.c | |
parent | e26d12b972c48d1484901452ba6eca2553f787f9 (diff) |
Remove the IMSG_NEIGHBOR_CHANGE message
Unlike OSPF, LDP has no concept of intermediate states. A session is
either operational or not operational as far as the label distribution
engine (lde) is concerned. In this case, the IMSG_NEIGHBOR_UP and
IMSG_NEIGHBOR_DOWN messages are enough.
Diff by Renato Westphal
Diffstat (limited to 'usr.sbin/ldpd/lde.c')
-rw-r--r-- | usr.sbin/ldpd/lde.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/usr.sbin/ldpd/lde.c b/usr.sbin/ldpd/lde.c index eec2a492611..6c483b47646 100644 --- a/usr.sbin/ldpd/lde.c +++ b/usr.sbin/ldpd/lde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lde.c,v 1.22 2010/10/26 12:08:14 claudio Exp $ */ +/* $OpenBSD: lde.c,v 1.23 2013/06/03 17:01:59 claudio Exp $ */ /* * Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org> @@ -195,7 +195,7 @@ lde_dispatch_imsg(int fd, short event, void *bula) struct in_addr addr; ssize_t n; time_t now; - int state, shut = 0, verbose; + int shut = 0, verbose; if (event & EV_READ) { if ((n = imsg_read(ibuf)) == -1) @@ -315,17 +315,6 @@ lde_dispatch_imsg(int fd, short event, void *bula) case IMSG_NEIGHBOR_DOWN: lde_nbr_del(lde_nbr_find(imsg.hdr.peerid)); break; - case IMSG_NEIGHBOR_CHANGE: - if (imsg.hdr.len - IMSG_HEADER_SIZE != sizeof(state)) - fatalx("invalid size of OE request"); - memcpy(&state, imsg.data, sizeof(state)); - - nbr = lde_nbr_find(imsg.hdr.peerid); - if (nbr == NULL) - break; - - nbr->state = state; - break; case IMSG_CTL_SHOW_LIB: rt_dump(imsg.hdr.pid); @@ -601,9 +590,6 @@ lde_nbr_new(u_int32_t peerid, struct lde_nbr *new) { struct lde_nbr *nbr; - if (lde_nbr_find(peerid)) - return (NULL); - if ((nbr = calloc(1, sizeof(*nbr))) == NULL) fatal("lde_nbr_new"); |