-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BGP ASPATH parsing error #211
Comments
The aforementioned packet has the Attribute AS_PATH(0x2), which I believe should be encoded AS with 2 octets(old standard) or 4 octets(new standard). New BGP speakers can judge that based on 'capability' advertised by the peer during the OPEN handshake and/or AS4PATH attribute. RFC dpkt assumes 2 octets and errors out when it is not. But, other parsers are parsing this packet 'correctly' by decoding AS as 4 octets. I am not sure how. Source of this packet is routeviews
I can't figure out how other parsers are parsing both of these packets correctly (without knowing the capabilities of the sender or AS4_PATH). Any ideas would be much appreciated. |
Hi @jack8daniels2, thanks for sharing your problem and providing so many details during the hacking and debugging process. Actually we are now working on solving the issues and try to solve as many as possible before releasing |
dpkt fails to parse the following BGP update packet.
This packet was gathered from route views, so it is a valid packet.
It fails with the following exception -
WARNING Parsing exception invalid ASPathSegment: '\x02\xd1\x00\x00i\xba\x00\x00\x02\x87'
From my debugging efforts, I see that type = \x02 and len = \xd1 which is much longer than the buffer length.
I'd appreciate a fix or any ideas that I can pursue to find a fix (that I'll contribute back to the repo).
The text was updated successfully, but these errors were encountered: