From b1b3fc5fe0c3d01e8f82ab33c2d62091d63b544a Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Thu, 7 Sep 2023 10:17:52 +0300 Subject: [PATCH] bgpd: Move BGP_CAP_LLGR_MIN_PACKET_LEN to headers file Signed-off-by: Donatas Abraitis --- bgpd/bgp_open.c | 12 ------------ bgpd/bgp_open.h | 13 +++++++++++++ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c index da70f67c18..6ee5b5dc5c 100644 --- a/bgpd/bgp_open.c +++ b/bgpd/bgp_open.c @@ -576,18 +576,6 @@ static int bgp_capability_restart(struct peer *peer, static int bgp_capability_llgr(struct peer *peer, struct capability_header *caphdr) { -/* - * +--------------------------------------------------+ - * | Address Family Identifier (16 bits) | - * +--------------------------------------------------+ - * | Subsequent Address Family Identifier (8 bits) | - * +--------------------------------------------------+ - * | Flags for Address Family (8 bits) | - * +--------------------------------------------------+ - * | Long-lived Stale Time (24 bits) | - * +--------------------------------------------------+ - */ -#define BGP_CAP_LLGR_MIN_PACKET_LEN 7 struct stream *s = BGP_INPUT(peer); size_t end = stream_get_getp(s) + caphdr->length; diff --git a/bgpd/bgp_open.h b/bgpd/bgp_open.h index 1d005efd02..a92c56d1b5 100644 --- a/bgpd/bgp_open.h +++ b/bgpd/bgp_open.h @@ -25,6 +25,19 @@ struct graceful_restart_af { uint8_t flag; }; +/* + * +--------------------------------------------------+ + * | Address Family Identifier (16 bits) | + * +--------------------------------------------------+ + * | Subsequent Address Family Identifier (8 bits) | + * +--------------------------------------------------+ + * | Flags for Address Family (8 bits) | + * +--------------------------------------------------+ + * | Long-lived Stale Time (24 bits) | + * +--------------------------------------------------+ + */ +#define BGP_CAP_LLGR_MIN_PACKET_LEN 7 + /* Capability Code */ #define CAPABILITY_CODE_MP 1 /* Multiprotocol Extensions */ #define CAPABILITY_CODE_REFRESH 2 /* Route Refresh Capability */