Add capability from rfc8950.

Just the basic parser, still needs to be integrated into the rest of the
code for the OPEN message parsing, and then the rest of the MP
Reach/Unreach NLRI parsing needs to be added.
This commit is contained in:
2023-02-23 01:07:46 +01:00
parent ff3211d1fc
commit 5818ec4956
4 changed files with 105 additions and 2 deletions

View File

@ -1276,6 +1276,7 @@ where
for attr in &u.path_attributes {
match attr {
PathAttribute::MPReachNLRIPathAttribute(nlri) => {
// TODO: Determine which AFI/SAFI this update corresponds to.
let nexthop_res = nlri.clone().nexthop_to_v6();
// TODO: How do we pick whether to use the global or LLNH?
if let Some((global, _llnh_opt)) = nexthop_res {
@ -1287,6 +1288,7 @@ where
}
}
PathAttribute::MPUnreachNLRIPathAttribute(nlri) => {
// TODO: Determine which AFI/SAFI this update corresponds to.
self.process_withdrawals(nlri.nlris.clone())?;
}
_ => {}