Skip to content

Commit

Permalink
Dont rely on parse2 for Aggregator
Browse files Browse the repository at this point in the history
  • Loading branch information
DRiKE committed Oct 31, 2023
1 parent ed6411f commit 3f4107e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/bgp/message/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,17 +461,17 @@ impl<Octs: Octets> UpdateMessage<Octs> {
){
// XXX not nice that we have to do this here, also it is exactly
// the same as in the fn parse in path_attributes.rs
/*
let asn = if sc.has_four_octet_asn() {
use crate::util::parser::parse_ipv4addr;
let mut pa = epa.value_into_parser();
let asn = if self.session_config.has_four_octet_asn() {
Asn::from_u32(pa.parse_u32_be()?)
} else {
Asn::from_u32(pa.parse_u16_be()?.into())
};

let address = parse_ipv4addr(&mut pa)?;
Ok(Some(AggregatorInfo::new(asn, address)))
*/
Ok(Some(Aggregator::parse2(&mut epa.value_into_parser(), epa.session_config())?.inner()))
//Ok(Some(Aggregator::parse2(&mut epa.value_into_parser(), epa.session_config())?.inner()))
} else {
Ok(None)
}
Expand Down

0 comments on commit 3f4107e

Please sign in to comment.