Code Monkey home page Code Monkey logo

Comments (3)

Zahaib avatar Zahaib commented on June 13, 2024

For more context, the issue here is that the peering session for this BGP update message was over IPv6 (both peer and local addresses are IPv6)

Peer IP Address: 2001:7f8:54::1:204
Local IP Address: 2001:7f8:54::1:99

However, peering session doesn't necessarily mean that NLRI will follow the same AFI. In fact, NLRI at the end of BGP message should always be decoded as IPv4. RFC4760 for multiprotocol extensions also confirms this. Under 1. Introduction first paragraph, it states that:

The only three pieces of information carried by BGP-4 [BGP-4] that
are IPv4 specific are (a) the NEXT_HOP attribute (expressed as an
IPv4 address), (b) AGGREGATOR (contains an IPv4 address), and (c)
NLRI (expressed as IPv4 address prefixes).

from mrtparse.

t2mune avatar t2mune commented on June 13, 2024

Hi,

Thank you very much for reporting this issue.
I fixed it, so could you confirm that it works correctly?
In my environment, the result is as follows:

--- updates.20200422.0125.out.before    2020-04-24 19:23:31.974871626 +0900
+++ updates.20200422.0125.out.after 2020-04-24 19:43:59.898189564 +0900
(...snip)
@@ -1160977,29 +1160977,29 @@
         NEXT_HOP: 85.208.68.1
     Path Attribute Flags/Type/Length: 0xc0/8/64
         COMMUNITY: 0:8304 0:49981 16:1134 6762:1 6762:31 6762:40 6762:10150 24115:57463 25091:22414 25091:24115 64700:57463 64704:1300 65400:0 65400:65400 65444:102 65444:2000
-    NLRI: 305::/20
-    NLRI: 305::/24
-    NLRI: 305:1000::/21
-    NLRI: 305:1000::/24
-    NLRI: 350::/12
-    NLRI: 3e0::/12
-    NLRI: 3d0::/12
-    NLRI: 305:400::/24
-    NLRI: 305:900::/24
-    NLRI: 305:1100::/24
-    NLRI: 305:1200::/24
-    NLRI: 305:a00::/24
-    NLRI: 305:b00::/24
-    NLRI: 305:700::/24
-    NLRI: 305:1300::/24
-    NLRI: 305:200::/24
-    NLRI: 305:600::/24
-    NLRI: 305:300::/24
-    NLRI: 305:1500::/24
-    NLRI: 305:500::/24
-    NLRI: 305:800::/24
-    NLRI: 305:100::/24
-    NLRI: 305:1400::/24
+    NLRI: 3.5.0.0/20
+    NLRI: 3.5.0.0/24
+    NLRI: 3.5.16.0/21
+    NLRI: 3.5.16.0/24
+    NLRI: 3.80.0.0/12
+    NLRI: 3.224.0.0/12
+    NLRI: 3.208.0.0/12
+    NLRI: 3.5.4.0/24
+    NLRI: 3.5.9.0/24
+    NLRI: 3.5.17.0/24
+    NLRI: 3.5.18.0/24
+    NLRI: 3.5.10.0/24
+    NLRI: 3.5.11.0/24
+    NLRI: 3.5.7.0/24
+    NLRI: 3.5.19.0/24
+    NLRI: 3.5.2.0/24
+    NLRI: 3.5.6.0/24
+    NLRI: 3.5.3.0/24
+    NLRI: 3.5.21.0/24
+    NLRI: 3.5.5.0/24
+    NLRI: 3.5.8.0/24
+    NLRI: 3.5.1.0/24
+    NLRI: 3.5.20.0/24

from mrtparse.

Zahaib avatar Zahaib commented on June 13, 2024

Thanks for the update, I took a look at your change and it looks good to me. I can also confirm that IPv4 are now getting decoded correctly.

from mrtparse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.