diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2018-10-18 12:19:10 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2018-10-18 12:19:10 +0000 |
commit | 22d3a678c057bd119b9844eb4539b42ef70f43b3 (patch) | |
tree | 6f3a1a5bf1464d0a2a2a97c430fd76a76ee70bad /usr.sbin | |
parent | 1b2688a79a476f5eca03f6373f327ec9909dad3e (diff) |
In rde_update_queue_runner() reset eor on every loop else a spurious and
most probably wrong EoR could be sent out because the variable persisted
over iterations.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/rde.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index 709114efaca..2bf92b65ecb 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.436 2018/10/18 09:28:53 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.437 2018/10/18 12:19:09 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -2653,7 +2653,7 @@ void rde_update_queue_runner(void) { struct rde_peer *peer; - int r, sent, max = RDE_RUNNER_ROUNDS, eor = 0; + int r, sent, max = RDE_RUNNER_ROUNDS, eor; u_int16_t len, wd_len, wpos; len = sizeof(queue_buf) - MSGSIZE_HEADER; @@ -2664,6 +2664,7 @@ rde_update_queue_runner(void) continue; if (peer->state != PEER_UP) continue; + eor = 0; /* first withdraws */ wpos = 2; /* reserve space for the length field */ r = up_dump_prefix(queue_buf + wpos, len - wpos - 2, @@ -2706,10 +2707,8 @@ rde_update_queue_runner(void) fatal("%s %d imsg_compose error", __func__, __LINE__); sent++; - if (eor) { - eor = 0; + if (eor) peer_send_eor(peer, AID_INET); - } } max -= sent; } while (sent != 0 && max > 0); |