summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_packet.c
diff options
context:
space:
mode:
authorLouis Scalbert <louis.scalbert@6wind.com>2023-04-19 13:40:13 +0200
committerLouis Scalbert <louis.scalbert@6wind.com>2023-09-18 14:57:03 +0200
commit39a8d354c11f6f063fa5154f5807e7a0c9b04b46 (patch)
tree274eb91b310d78b045f9b00f0dca42a797e30764 /bgpd/bgp_packet.c
parentlib: add link-state prefixes (diff)
downloadfrr-39a8d354c11f6f063fa5154f5807e7a0c9b04b46.tar.xz
frr-39a8d354c11f6f063fa5154f5807e7a0c9b04b46.zip
bgpd: store bgp link-state prefixes
Add the ability to store link-state prefixes in the BGP table. Store a raw copy of the BGP link state NLRI TLVs as received in the packet in 'p.u.prefix_linkstate.ptr'. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'bgpd/bgp_packet.c')
-rw-r--r--bgpd/bgp_packet.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index 9525ea016..4eb56ad75 100644
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -48,6 +48,7 @@
#include "bgpd/bgp_io.h"
#include "bgpd/bgp_keepalives.h"
#include "bgpd/bgp_flowspec.h"
+#include "bgpd/bgp_linkstate_tlv.h"
#include "bgpd/bgp_trace.h"
DEFINE_HOOK(bgp_packet_dump,
@@ -349,7 +350,11 @@ int bgp_nlri_parse(struct peer *peer, struct attr *attr,
return bgp_nlri_parse_evpn(peer, attr, packet, mp_withdraw);
case SAFI_FLOWSPEC:
return bgp_nlri_parse_flowspec(peer, attr, packet, mp_withdraw);
+ case SAFI_LINKSTATE:
+ return bgp_nlri_parse_linkstate(peer, attr, packet,
+ mp_withdraw);
}
+
return BGP_NLRI_PARSE_ERROR;
}