diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2023-04-28 19:13:56 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2023-05-01 04:01:16 +0200 |
commit | 1be0be1b71f0127740a4aa6f35d4a256d6c34fb9 (patch) | |
tree | 807420edb2dba2a8c648845a9c3e7d311692ede5 /proto/bgp/bgp.c | |
parent | a8a64ca0fed41c78376b27880e934296bd3c3a7f (diff) |
BGP: Save sent and received OPEN messages
These are necessary for BMP Peer UP message and it is better to keep them
in BGP than in BMP (so BMP could be restarted or added later).
Diffstat (limited to 'proto/bgp/bgp.c')
-rw-r--r-- | proto/bgp/bgp.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index c806765a..373b0392 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -380,6 +380,13 @@ bgp_close_conn(struct bgp_conn *conn) rfree(conn->sk); conn->sk = NULL; + mb_free(conn->local_open_msg); + conn->local_open_msg = NULL; + mb_free(conn->remote_open_msg); + conn->remote_open_msg = NULL; + conn->local_open_length = 0; + conn->remote_open_length = 0; + mb_free(conn->local_caps); conn->local_caps = NULL; mb_free(conn->remote_caps); |