Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions stages/rv-live/openbmp.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ func (s *RvLive) processRecord(record *kgo.Record) error {
return fmt.Errorf("dangling bytes after BGP message: %d/%d", n, len(bm.BgpData))
}

// the peer A flag announces the legacy 2-byte AS_PATH encoding (RFC 7854/4.2)
// NB: trust it only when set; routeviews never sets it, and assuming 4-byte
// ASNs on a clear flag would defeat --guess-asn
if bm.Peer.Is2ByteAS() {
m.ParseAS4 = -1
}

// set time
if !bm.Peer.Time.IsZero() {
m.Time = bm.Peer.Time
Expand Down
Loading