Skip to content

Commit 030f615

Browse files
committed
Never display ipv4-mapped nexthop addresses
This fixes the reverse dns resolution for ipv4-mapped nexthops
1 parent 622daf4 commit 030f615

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/store.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ pub trait Store: Clone + Send + Sync + 'static {
310310
}
311311
}
312312
BgpAttrItem::NextHop(BgpNextHop { value }) => {
313-
nexthop = Some(value);
313+
nexthop = Some(value.to_canonical());
314314
}
315315
BgpAttrItem::CommunityList(BgpCommunityList { value }) => {
316316
let mut communities = vec![];
@@ -364,7 +364,7 @@ pub trait Store: Clone + Send + Sync + 'static {
364364
rd = session.route_distinguisher
365365
}
366366
let mut attrs = attrs.clone();
367-
attrs.nexthop = nexthop;
367+
attrs.nexthop = nexthop.map(|nh| nh.to_canonical());
368368
self.update_route(
369369
path,
370370
prefix,

0 commit comments

Comments
 (0)