summaryrefslogtreecommitdiff
path: root/bgpd/bgpd.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-07-23 20:30:47 -0400
committerDonald Sharp <sharpd@nvidia.com>2023-07-24 22:41:14 -0400
commit73b66bed83a38eea37371c6bbb0655c72c903293 (patch)
tree18823835fc2da77caf323dd4482c9015599647be /bgpd/bgpd.h
parent9e32b73634a8bbe893f2425ee89ee27651d93408 (diff)
bgpd: The last_reset_cause in the peer structure is too large
The last_reset_cause is a plain old BGP_MAX_PACKET_SIZE buffer that is really enlarging the peer data structure. Let's just copy the stream that failed and only allocate how ever much the packet size actually was. While it's likely that we have a reset reason, the packet typically is not going to be 65k in size. Let's save space. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/bgpd.h')
-rw-r--r--bgpd/bgpd.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index 5c42abef5e..5e467bb873 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -1716,8 +1716,7 @@ struct peer {
* a new value to the last_reset reason
*/
- uint16_t last_reset_cause_size;
- uint8_t last_reset_cause[BGP_MAX_PACKET_SIZE];
+ struct stream *last_reset_cause;
/* The kind of route-map Flags.*/
uint16_t rmap_type;