Incorrect value of s->pref_routes in nest/proto.c

Alexander Shikov a.shikov at dtel-ix.net
Fri Apr 1 12:41:10 CEST 2016


Hello!

While experimenting with tables I've noticed that number of preferred routes 
in 'show protocol all ...' output is shown incorrectly.

Configuration is simple:

table T_ITCONS;
protocol bgp ITCONS {
        table T_ITCONS;
        passive;
        local as MyASN;
        neighbor 193.25.180.17 as 25372;
        rs client;
        prefer older on;
        import  all;
        export  none;
}

protocol pipe P_ITCONS {
        table master;
        mode transparent;
        peer table T_ITCONS;
        import where bgp_path.last = 28773;
        export none;
}


I got 9 routes in T_ITCONS table, 2 of them are exported to master table:

bird> show route
195.78.38.0/23     via 193.25.180.17 on vlan777 [ITCONS 2016-03-31 18:11:33] * (100) [AS28773i]
188.190.160.0/19   via 193.25.180.17 on vlan777 [ITCONS 2016-03-31 18:11:33] * (100) [AS28773i]
bird> show route table T_ITCONS
109.68.40.0/21     via 193.25.180.17 on vlan777 [ITCONS 2016-03-31 18:11:33] * (100) [AS25372i]
80.78.63.0/24      via 193.25.180.17 on vlan777 [ITCONS 2016-03-31 18:11:33] * (100) [AS60359i]
185.102.164.0/22   via 193.25.180.17 on vlan777 [ITCONS 2016-03-31 18:11:33] * (100) [AS29242i]
185.102.164.0/24   via 193.25.180.17 on vlan777 [ITCONS 2016-03-31 18:11:33] * (100) [AS29242i]
194.247.174.0/24   via 193.25.180.17 on vlan777 [ITCONS 2016-03-31 18:11:33] * (100) [AS196831i]
194.247.175.0/24   via 193.25.180.17 on vlan777 [ITCONS 2016-03-31 18:11:33] * (100) [AS196831?]
193.84.72.0/24     via 193.25.180.17 on vlan777 [ITCONS 2016-03-31 18:11:33] * (100) [AS39851i]
195.78.38.0/23     via 193.25.180.17 on vlan777 [ITCONS 2016-03-31 18:11:33] * (100) [AS28773i]
188.190.160.0/19   via 193.25.180.17 on vlan777 [ITCONS 2016-03-31 18:11:33] * (100) [AS28773i]


'show protocol all ITCONS' shows sum of them, i.e. 11 preferred routes and that is incorrect:

bird> show protocol all ITCONS
name     proto    table    state  since       info
ITCONS   BGP      T_ITCONS up     2016-03-31 18:11:33  Established   
  Description:    IT Consulting LLC
  Preference:     100
  Input filter:   ACCEPT
  Output filter:  REJECT
  Routes:         9 imported, 0 exported, 11 preferred
[...]


I'm trying to figure out what's happening in nest/rt-table.c.
Any help will be kindly appreciated! Thank you!

-- 
Alexander Shikov
Technical Staff, Digital Telecom IX
Tel.: +380 44 201 14 07
http://dtel-ix.net/


More information about the Bird-users mailing list