diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-06-10 11:35:00 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-06-10 11:38:24 +0200 |
commit | 8dcad8e9fdfea1695e078564fea17bad4ca59adc (patch) | |
tree | 9735c5235362ceed4f1d53322e7544af257b15ab /bgpd/bgpd.h | |
parent | Merge pull request #11370 from donaldsharp/lib_zebra_cleanup (diff) | |
download | frr-8dcad8e9fdfea1695e078564fea17bad4ca59adc.tar.xz frr-8dcad8e9fdfea1695e078564fea17bad4ca59adc.zip |
bgpd: last_reset_cause_size can't be larger than 65k bytes
Reduce the scope, to avoid comparing uint16_t vs. size_t in a loop.
```
vty_out(vty,
" Message received that caused BGP to send a NOTIFICATION:\n ");
for (i = 1; i <= p->last_reset_cause_size;
i++) {
```
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to '')
-rw-r--r-- | bgpd/bgpd.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h index bf26bdc5b..98e59bcc8 100644 --- a/bgpd/bgpd.h +++ b/bgpd/bgpd.h @@ -1637,7 +1637,7 @@ struct peer { * a new value to the last_reset reason */ - size_t last_reset_cause_size; + uint16_t last_reset_cause_size; uint8_t last_reset_cause[BGP_MAX_PACKET_SIZE]; /* The kind of route-map Flags.*/ |