sileht / bird-lg

bird looking glass
Other
313 stars 109 forks source link

AS path prepend count is incorrect in the map #44

Closed tamihiro closed 4 years ago

tamihiro commented 5 years ago

When I get a graphviz map for a route like the following:

bird> show route for 1.11.48.0/21 all
Table master4:
1.11.48.0/21         unicast [v4_9370 12:47:02.816 from 59.106.1.2] * (100/?) [AS18313i]
    via 192.168.11.1 on eth2
    Type: BGP univ
    BGP.origin: IGP
    BGP.as_path: 9370 2497 9318 38091 38091 38091 38091 18313
    BGP.next_hop: 157.17.128.4
    BGP.med: 3250
    BGP.local_pref: 100
    BGP.community: (9370,100)
                     unicast [v4v6_9371 12:47:12.935 from 210.224.162.177] (100/?) [AS18313i]
    via 192.168.11.1 on eth2
    Type: BGP univ
    BGP.origin: IGP
    BGP.as_path: 9371 2497 9318 38091 38091 38091 38091 18313
    BGP.next_hop: 157.17.144.2
    BGP.med: 3100
    BGP.local_pref: 100
    BGP.community: (9371,100)

AS38091 path prepend is counted 7 times.

wrong_prepend_count

My previous PR #42 now includes a patch b6c46fc for this glitch. Please review this one as well.

zorun commented 5 years ago

Thanks for the report and the patch. Unfortunately, 1.11.48.0/21 is not in the DFZ so I can't easily test the fix.

Do you have an example of a prefix with prepend in the DFZ?

tamihiro commented 5 years ago

Haha sorry I gave you a bad one. It was actually a DFZ, but only until 2019-03-18 17:35:01 UTC. 😀 How about 175.106.12.0/24, 103.44.37.0/24, or 174.222.0.0/17 to name a few?

tamihiro commented 5 years ago

@zorun with the current master and bird-2.0, I'm afraid you can't even get a graphviz map. Please read my comment. https://github.com/sileht/bird-lg/issues/43#issuecomment-476145175

tamihiro commented 5 years ago

How about 175.106.12.0/24, 103.44.37.0/24, or 174.222.0.0/17 to name a few?

@zorun without reproducing by yourself, you can see what I mean at the following two links. https://lg.gitoyen.net/prefix_detail/whiskey+vodka+x-ray/ipv4?q=175.106.12.0/24 https://lg.gitoyen.net/prefix_bgpmap/whiskey+vodka+x-ray/ipv4?q=175.106.12.0/24

AS46023's prepend count should be three, but the map says 11. HTH

zorun commented 4 years ago

Fixed with #53