Comments (1)
I had a quick look at this. The failure is in prepending an ASPath to a route that has no existing AS_SET or AS_SEQUENCE. The code checks the length, but doesn't deal with that lack of length in the second part:
let data = if len != 0 && buf[0] == Attribute::AS_PATH_TYPE_SEQ && buf[1] < 255 {
let mut new_buf = Vec::with_capacity(len as usize + 4);
new_buf.put_u8(buf[0]);
new_buf.put_u8(buf[1] + 1);
new_buf.put_u32(as_number);
new_buf.put(&buf[2..]);
AttributeData::Bin(new_buf)
} else {
let mut new_buf = Vec::with_capacity(len as usize + 6);
new_buf.put_u8(Attribute::AS_PATH_TYPE_SEQ);
new_buf.put_u8(1);
new_buf.put_u32(as_number);
new_buf.put(&buf[4..]);
AttributeData::Bin(new_buf)
};
Looking in the bview file, I see the following. Note the prefix at line 81357 has no AS Path.
81354,84.205.0.0/19 3356 8928 24724 31608
81355,84.205.32.0/19 8419 6461 1299 3307
81356,84.205.80.0/24 6067 16150 1103 1125 196613 12654
81357,84.205.81.0/24
81358,84.205.83.0/24 6067 5413 12654
81359,84.205.84.0/24 6067 16150 8928 513 513 513 513 12654
81360,84.205.85.0/24 6067 13237 12654
So we don't take the first path because len is zero, but then there's an assumption data is there. I think the 'len != 0' check is to protect the AS_PATH_TYPE_SEQ check.
from rustybgp.
Related Issues (15)
- weird number of prefixes received and resources used when testing with gobgp mrt files HOT 1
- RustyBGP performance issues HOT 4
- how to find out that a peer has sent all the routes HOT 2
- getting a panic with latest code HOT 7
- Dependent create treebitmap has been deprecated HOT 3
- Stress testing via rtod
- MRT injecting fails with "failed to send: EOF" HOT 5
- Does rustybpg support multipathing/ECMP (e.g., rfc7911)? HOT 1
- Error while building HOT 2
- Route Server mode HOT 5
- Is the watcher functionality supported? HOT 2
- Consider submitting rustybgp to memorysafety.org HOT 5
- Why do the CI workflows have gobgp binaries? HOT 1
- BGP add path support HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rustybgp.