diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-03-03 10:17:06 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-03-03 10:17:06 +0000 |
commit | 40dc970cc87f330e381e09b68692315c30d660f5 (patch) | |
tree | dd54e440e99d3dfb8032e21a764ae7d347613c0e /usr.sbin/ldpd/lde.c | |
parent | 3748ab7cdac0ecad1ee65027594ef9656785a05a (diff) |
Rework the kroute code by stealing some code from ospfd and massaging it
a lot more. Main reason for this is to add priority support. Additionally
add some additional NO_LABEL fixes.
OK michele@
Diffstat (limited to 'usr.sbin/ldpd/lde.c')
-rw-r--r-- | usr.sbin/ldpd/lde.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.sbin/ldpd/lde.c b/usr.sbin/ldpd/lde.c index 536716be62b..8abf71effa0 100644 --- a/usr.sbin/ldpd/lde.c +++ b/usr.sbin/ldpd/lde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lde.c,v 1.9 2010/03/01 09:05:07 claudio Exp $ */ +/* $OpenBSD: lde.c,v 1.10 2010/03/03 10:17:05 claudio Exp $ */ /* * Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org> @@ -354,7 +354,6 @@ lde_dispatch_parent(int fd, short event, void *bula) { struct imsg imsg; struct kroute kr; - struct rroute rr; struct imsgev *iev = bula; struct imsgbuf *ibuf = &iev->ibuf; ssize_t n; @@ -379,15 +378,14 @@ lde_dispatch_parent(int fd, short event, void *bula) switch (imsg.hdr.type) { case IMSG_NETWORK_ADD: - if (imsg.hdr.len != IMSG_HEADER_SIZE + sizeof(rr)) { + if (imsg.hdr.len != IMSG_HEADER_SIZE + sizeof(kr)) { log_warnx("lde_dispatch_parent: " "wrong imsg len"); break; } - memcpy(&rr, imsg.data, sizeof(rr)); - - lde_kernel_insert(&rr.kr); + memcpy(&kr, imsg.data, sizeof(kr)); + lde_kernel_insert(&kr); break; case IMSG_NETWORK_DEL: if (imsg.hdr.len != IMSG_HEADER_SIZE + sizeof(kr)) { @@ -398,7 +396,6 @@ lde_dispatch_parent(int fd, short event, void *bula) memcpy(&kr, imsg.data, sizeof(kr)); lde_kernel_remove(&kr); - break; case IMSG_RECONF_CONF: if ((nconf = malloc(sizeof(struct ldpd_conf))) == |