diff options
| -rw-r--r-- | usr.sbin/eigrpd/eigrpe.c | 7 | ||||
| -rw-r--r-- | usr.sbin/eigrpd/eigrpe.h | 4 | ||||
| -rw-r--r-- | usr.sbin/eigrpd/hello.c | 4 | ||||
| -rw-r--r-- | usr.sbin/eigrpd/update.c | 31 |
4 files changed, 9 insertions, 37 deletions
diff --git a/usr.sbin/eigrpd/eigrpe.c b/usr.sbin/eigrpd/eigrpe.c index df9f1d61536..1955558ed69 100644 --- a/usr.sbin/eigrpd/eigrpe.c +++ b/usr.sbin/eigrpd/eigrpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eigrpe.c,v 1.10 2015/12/13 18:55:53 renato Exp $ */ +/* $OpenBSD: eigrpe.c,v 1.11 2016/01/15 12:32:34 renato Exp $ */ /* * Copyright (c) 2015 Renato Westphal <renato@openbsd.org> @@ -500,8 +500,7 @@ eigrpe_dispatch_rde(int fd, short event, void *bula) switch (imsg.hdr.type) { case IMSG_SEND_UPDATE_END: - send_update(nbr->ei, nbr, 0, 1, - &nbr->update_list); + send_update(nbr->ei, nbr, 0, &nbr->update_list); message_list_clr(&nbr->update_list); break; case IMSG_SEND_REPLY_END: @@ -529,7 +528,7 @@ eigrpe_dispatch_rde(int fd, short event, void *bula) switch (imsg.hdr.type) { case IMSG_SEND_MUPDATE_END: - send_update(ei, NULL, 0, 0, &ei->update_list); + send_update(ei, NULL, 0, &ei->update_list); message_list_clr(&ei->update_list); break; case IMSG_SEND_MQUERY_END: diff --git a/usr.sbin/eigrpd/eigrpe.h b/usr.sbin/eigrpd/eigrpe.h index 89d2f0d7454..e142ea89d92 100644 --- a/usr.sbin/eigrpd/eigrpe.h +++ b/usr.sbin/eigrpd/eigrpe.h @@ -1,4 +1,4 @@ -/* $OpenBSD: eigrpe.h,v 1.5 2016/01/15 12:29:29 renato Exp $ */ +/* $OpenBSD: eigrpe.h,v 1.6 2016/01/15 12:32:34 renato Exp $ */ /* * Copyright (c) 2015 Renato Westphal <renato@openbsd.org> @@ -185,7 +185,7 @@ void recv_hello(struct eigrp_iface *, union eigrpd_addr *, struct nbr *, struct tlv_parameter *); /* update.c */ -void send_update(struct eigrp_iface *, struct nbr *, uint32_t, int, +void send_update(struct eigrp_iface *, struct nbr *, uint32_t, struct rinfo_head *); void recv_update(struct nbr *, struct rinfo_head *, uint32_t); diff --git a/usr.sbin/eigrpd/hello.c b/usr.sbin/eigrpd/hello.c index c422cdfe21f..90828653981 100644 --- a/usr.sbin/eigrpd/hello.c +++ b/usr.sbin/eigrpd/hello.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hello.c,v 1.2 2015/10/05 01:59:33 renato Exp $ */ +/* $OpenBSD: hello.c,v 1.3 2016/01/15 12:32:34 renato Exp $ */ /* * Copyright (c) 2015 Renato Westphal <renato@openbsd.org> @@ -97,6 +97,6 @@ recv_hello(struct eigrp_iface *ei, union eigrpd_addr *src, struct nbr *nbr, /* send an expedited hello */ send_hello(ei, NULL, 0, 0); - send_update(nbr->ei, nbr, EIGRP_HDR_FLAG_INIT, 0, NULL); + send_update(nbr->ei, nbr, EIGRP_HDR_FLAG_INIT, NULL); } } diff --git a/usr.sbin/eigrpd/update.c b/usr.sbin/eigrpd/update.c index 8f071921c10..7511ec4cd2a 100644 --- a/usr.sbin/eigrpd/update.c +++ b/usr.sbin/eigrpd/update.c @@ -1,4 +1,4 @@ -/* $OpenBSD: update.c,v 1.2 2015/10/04 23:00:10 renato Exp $ */ +/* $OpenBSD: update.c,v 1.3 2016/01/15 12:32:34 renato Exp $ */ /* * Copyright (c) 2015 Renato Westphal <renato@openbsd.org> @@ -31,14 +31,13 @@ extern struct eigrpd_conf *econf; void send_update(struct eigrp_iface *ei, struct nbr *nbr, uint32_t flags, - int startup, struct rinfo_head *rinfo_list) + struct rinfo_head *rinfo_list) { struct eigrp *eigrp = ei->eigrp; struct ibuf *buf; struct rinfo_entry *re; int size; int route_len; - struct eigrp_hdr *eigrp_hdr; /* don't exceed the interface's mtu */ do { @@ -81,14 +80,6 @@ send_update(struct eigrp_iface *ei, struct nbr *nbr, uint32_t flags, } } while (!TAILQ_EMPTY(rinfo_list)); - /* set the EOT flag in the last startup update */ - if (startup) { - if ((eigrp_hdr = ibuf_seek(buf, 0, sizeof(*eigrp_hdr))) == NULL) - fatalx("send_update: buf_seek failed"); - eigrp_hdr->flags = ntohl(eigrp_hdr->flags) | EIGRP_HDR_FLAG_EOT; - eigrp_hdr->flags = htonl(eigrp_hdr->flags); - } - rtp_send(ei, nbr, buf); return; fail: @@ -111,24 +102,6 @@ recv_update(struct nbr *nbr, struct rinfo_head *rinfo_list, uint32_t flags) if (nbr->flags & F_EIGRP_NBR_PENDING) nbr_init(nbr); - else if (!(flags & EIGRP_HDR_FLAG_RS)) - /* - * This is not in the draft, but apparently if a Cisco - * device sends an INIT Update it expects to receive - * an INIT Update as well, otherwise it triggers the - * "stuck in INIT state" error and discards subsequent - * packets. However, there is an exception: when the - * "clear ip eigrp neighbors soft" command is issued - * on a Cisco device, the "Restart Flag" is also set - * in the EIGRP header. In this case the Cisco device - * doesn't expect to receive an INIT Update otherwise - * the adjacency will flap. Unfortunately it looks - * like that there is some kind of initialization - * FSM implemented in the Cisco devices that is not - * documented in the draft. - */ - send_update(nbr->ei, nbr, EIGRP_HDR_FLAG_INIT, - 0, NULL); /* * The INIT flag instructs us to advertise all of our routes, |
