| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
bgpd: Print IPv4 nexthop for IPv6 prefixes under bgp_table_map_apply()
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With latest kernels that's possible to have IPv6 routes with IPv4 nexthops.
We already handled this in bgp_zebra_announce():
nexthop = bgp_path_info_to_ipv6_nexthop(mpinfo_cp,
&ifindex);
if (!nexthop)
nh_updated = update_ipv4nh_for_route_install(
nh_othervrf,
nh_othervrf ? info->extra->bgp_orig
: bgp,
&mpinfo_cp->attr->nexthop,
mpinfo_cp->attr, is_evpn, api_nh);
else
nh_updated = update_ipv6nh_for_route_install(
nh_othervrf,
nh_othervrf ? info->extra->bgp_orig
: bgp,
nexthop, ifindex, mpinfo, info, is_evpn,
api_nh);
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
|\ \
| | |
| | | |
Add Support for rfc 8050 MRT add-path
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Rfc 8050 adds support for BGP NLRI that carry path identifiers. this commit adds that support to FRR
- Updated bgp_dump.h to include new sub-type values
- Updated bgp_dump.c to check for add_path af_caps in the peer struct.
- Updated bgp_dump.c to use the proper sub-type values upon detection of add-path af_caps
- Updated bgp_dump.c to properly dump the path_id wen present.
Signed-off-by: David Teach <dteach@routeviews.org>
|
|\ \ \
| | | |
| | | | |
bgpd: fix empty advertised-routes for 2-tier safis
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
'show bgp ipv[46] vpn neighbors ... advertised-routes' was displaying
empty output due to new command syntax using show_adj_routes() which
assumed each bgp_table was single-tier (not nested). This fixes that
assumption for safis with a two-tier bgp_table (SAFI_MPLS_VPN,
SAFI_ENCAP, and SAFI_EVPN).
Before:
ub18# show bgp ipv6 vpn neighbors 2001:db8:cafe::2 advertised-routes
ub18#
After:
ub20# show bgp ipv6 vpn neighbors 2001:db8:cafe::1 advertised-routes
BGP table version is 2, local router ID is 100.64.0.222, vrf id 0
Default local pref 100, local AS 1
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 30:30
*> 2::2/128 :: 0 100 32768 i
*> 2::22/128 :: 0 100 32768 i
Route Distinguisher: 33:33
*> 2::2/128 :: 0 100 32768 i
*> 2::22/128 :: 0 100 32768 i
Total number of prefixes 4
Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
|
|\ \ \
| | | |
| | | | |
new clang fixes
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The return code from smux_trap is never used. If we have
never used it after all this time. Remove the return from
the function.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The new bgp_mplsvpn_snmp.c code increments i and
never uses that value. Comment the code out
to make the clang SA analyzer happy. Shouldn't
be a problem since this code will never probably
be touched again(ha!).
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|\ \ \ \
| | | | |
| | | | | |
bgpd: Check for peer->su_remote if not NULL when handling IPv6 nexthop
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
```
(gdb) bt
0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
1 0x00007fe57ca4a42a in __GI_abort () at abort.c:89
2 0x00007fe57ddd1935 in core_handler (signo=6, siginfo=0x7ffc81067570, context=<optimized out>) at lib/sigevent.c:255
3 <signal handler called>
4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
5 0x00007fe57ca4a42a in __GI_abort () at abort.c:89
6 0x00007fe57ddd1935 in core_handler (signo=11, siginfo=0x7ffc81067e30, context=<optimized out>) at lib/sigevent.c:255
7 <signal handler called>
8 0x000055a7b25b923f in bgp_path_info_to_ipv6_nexthop (ifindex=ifindex@entry=0x7ffc810683c0, path=<optimized out>, path=<optimized out>) at bgpd/bgp_zebra.c:909
9 0x000055a7b25bb2e5 in bgp_zebra_announce (dest=dest@entry=0x55a7b5239c10, p=p@entry=0x55a7b5239c10, info=info@entry=0x55a7b5239cd0, bgp=bgp@entry=0x55a7b518b090, afi=afi@entry=AFI_IP6, safi=safi@entry=SAFI_UNICAST) at bgpd/bgp_zebra.c:1358
10 0x000055a7b256af6a in bgp_process_main_one (bgp=0x55a7b518b090, dest=0x55a7b5239c10, afi=AFI_IP6, safi=SAFI_UNICAST) at bgpd/bgp_route.c:2918
11 0x000055a7b256b0ee in bgp_process_wq (wq=<optimized out>, data=0x55a7b5221800) at bgpd/bgp_route.c:3027
12 0x00007fe57ddea2e0 in work_queue_run (thread=0x7ffc8106cd60) at lib/workqueue.c:291
13 0x00007fe57dde0781 in thread_call (thread=thread@entry=0x7ffc8106cd60) at lib/thread.c:1684
14 0x00007fe57dda84b8 in frr_run (master=0x55a7b48aaf00) at lib/libfrr.c:1126
15 0x000055a7b250a7da in main (argc=<optimized out>, argv=<optimized out>) at bgpd/bgp_main.c:540
(gdb)
```
This crashes with configs like:
```
router bgp 65534
no bgp ebgp-requires-policy
no bgp network import-check
!
address-family ipv6 unicast
import vrf donatas <<<<<< Crashes when entering this command
exit-address-family
!
router bgp 65534 vrf donatas
no bgp ebgp-requires-policy
no bgp network import-check
neighbor fe80::c15a:ddab:1689:db86 remote-as 65025
neighbor fe80::c15a:ddab:1689:db86 interface eth2
neighbor fe80::c15a:ddab:1689:db86 update-source eth2
neighbor fe80::c15a:ddab:1689:db86 capability extended-nexthop
!
address-family ipv6 unicast
network 2a02:face::/32 <<<<<< Crashes due to static networks
neighbor fe80::c15a:ddab:1689:db86 activate
exit-address-family
!
```
Locally configured routes do not have peer->su_remote.
```
exit1-debian-9# show bgp ipv6 unicast
BGP table version is 3, local router ID is 192.168.100.1, vrf id 0
Default local pref 100, local AS 65534
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 2a02:abc::/64 fe80::c15a:ddab:1689:db86@5<
0 65025 i
2a02:face::/32 ::@5< 0 32768 i
Displayed 2 routes and 2 total paths
exit1-debian-9#
```
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
bgpd: send correct BMP down message when nht fails
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When sending BMP messages for a status change event for a peer whose NHT
has failed, we were sending a Peer Down Reason Code of 1 (Local system
closed, NOTIFICATION follows) with no NOTIFICAION PDU (because there was
none). This is wrong. Also, the reason code of 1 is semantically off, it
should be 2 (Local system closed, FSM event follows).
This patch:
- adds definitions of all BGP FSM event codes per RFC4271
- changes the BMP reason code emitted when a peer changes state due to
NHT failure to 2 and encodes FSM event 18 (TcpConnectionFails)
- changes the catch-all case where we have not yet
implemented the appropriate BMP response to indicate reason code 2
with FSM event 0 (no relevant Event code is defined).
These changes ought to prevent the BMP session from being torn down due
to an improperly formatted message.
Signed-off-by: Quentin Young <qlyoung@qlyoung.net>
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | | |
Neither tabs nor newlines are acceptable in syslog messages. They also
break line-based parsing of file logs.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|\ \ \
| |/ /
|/| | |
bgpd: When deleting a neighbor from a peer-group the PGNAME is optional
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently when deleting a neighbor from a peer-group:
no neighbor A.B.C.D peer-group FOO
We must specify FOO, while A.B.C.D is sufficient enough of an
identifier to know what to do.
Make PGNAME optional on this command and just delete the peer.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|/
|
|
| |
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
|\
| |
| | |
L3vpn mpls snmp upstream 1
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The old bgpTraps group was obsolteted by RFC4273 and the
bgpNotifications groups was introduces. The new notifications
mirror the bgpTraps except that an extra item peerRemoteAddr
is sent in the notification. This upgrades the support to
conform with RFC4273
Signed-off-by: Pat Ruddy <pat@voltanet.io>
|
| |
| |
| |
| |
| |
| |
| | |
Add support for mplsL3VpnVrfUp and mplsL3VpnVrfDown notifications
from [RFC4382]
Signed-off-by: Pat Ruddy <pat@voltanet.io>
|
| |
| |
| |
| |
| |
| | |
add code to support the route target table from [RFC4382]
Signed-off-by: Pat Ruddy <pat@voltanet.io>
|
| |
| |
| |
| |
| |
| |
| | |
Expose the max ecommunity string length for range checking
in SNMP route-target string processing.
Signed-off-by: Pat Ruddy <pat@voltanet.io>
|
| |
| |
| |
| |
| |
| | |
Add MIB support for the route table in RFC4382
Signed-off-by: Pat Ruddy <pat@voltanet.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
support for counts of per-vrf routes:
added
deleted
current
Signed-off-by: Pat Ruddy <pat@voltanet.io>
|
| |
| |
| |
| |
| |
| |
| | |
Add infrastucture to return the mplsL3vpnIfConfTable from
[RFC4382]
Signed-off-by: Pat Ruddy <pat@voltanet.io>
|
| |
| |
| |
| |
| |
| |
| | |
Add SNMP support for L3vpn Vrf table as defined in [RFC4382]
Keep track of vrf status for the table and for future traps.
Signed-off-by: Pat Ruddy <pat@voltanet.io>
|
| |
| |
| |
| |
| |
| |
| | |
Add infrastructure for mplsvpn MIB (RFC-4382) and the top level
ScalarGroup.
Signed-off-by: Pat Ruddy <pat@voltanet.io>
|
| |
| |
| |
| |
| |
| |
| | |
If a vrf is exporting to a vpn table and/or importing to a vpn
table then it is assumed t be a MPLS VPN vrf.
Signed-off-by: Pat Ruddy <pat@voltanet.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
From RFC4382:
A VRF is
up(1) when there is at least one interface associated
with the VRF whose ifOperStatus is up(1). A VRF is
down(2) when:
a. There does not exist at least one interface whose
ifOperStatus is up(1).
b. There are no interfaces associated with the VRF.
Run through interfaces associated with a vrf and return
true if there is one in the up state.
Signed-off-by: Pat Ruddy <pat@voltanet.io>
|
|\ \
| | |
| | | |
bgpd: Remove aggregatorAsMalformed related outputs JSON and non-JSON
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Already not necessary, because if BGP aggregator AS attribute is with
value of 0, then the attribute is already discarded at early processing.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
|\ \ \
| | | |
| | | | |
bgpd: Dump BGP attrs to check what's the actual prefix with aggr_as 0
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Just for more debug information regarding malformed aggregator_as.
```
bgpd[5589]: [EC 33554434] 192.168.10.25: AGGREGATOR AS number is 0 for aspath: 65030
bgpd[5589]: bgp_attr_aggregator: attributes: nexthop 192.168.10.25, origin i, path 65030
```
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
|\ \ \
| | | |
| | | | |
bgpd: Do not compare attr again.
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`same_attr` has been computed and `hook_call(bgp_process)` (calling
BMP module) would not change it. We could reuse the value to filter
same attribute updates, avoiding an extra comparison.
Signed-off-by: zyxwvu Shi <i@shiyc.cn>
|
|/ /
| |
| |
| | |
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Avoid mangling packet size which is expected to be the same as received.
Stream pointer advancing is necessary to avoid changing the packet and
reseting BGP sessions.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
An UPDATE message that contains the AS number of zero in the AS_PATH
or AGGREGATOR attribute MUST be considered as malformed and be
handled by the procedures specified in [RFC7606].
An UPDATE message with a malformed AGGREGATOR attribute SHALL be
handled using the approach of "attribute discard".
Attribute discard: In this approach, the malformed attribute MUST
be discarded and the UPDATE message continues to be processed.
This approach MUST NOT be used except in the case of an attribute
that has no effect on route selection or installation.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
|\ \
| | |
| | | |
bgpd: config connect timer not applied immediately for non-established peers.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
non-established state.
Description:
When user is config connect timer, it doesn't reflect
immediately. It reflect when next time neighbor is tried to reconnect.
Problem Description/Summary :
When user is config connect timer, it doesn't reflect
The network connection was aborted by the local system.d to reconnect.
Fix is to update the connect timer immediately if BGP
session is not in establish state.
Expected Behavior :
If neighbor is not yet established, we should immediately apply the config connect timer to the peer.
Signed-off-by: sudhanshukumar22 <sudhanshu.kumar@broadcom.com>
|
| |/
|/|
| |
| |
| |
| | |
Just consistent.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When FRR creates a adj_out data structure we lock the `struct
bgp_dest` node associated with it. On freeing of this data
structure and removing the lock it was not associated with
the actual free of the adjacency structure. Let's clean up
the lock/unlock to be centralized to the alloc/free of the adj_out.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|\ \
| | |
| | | |
bgpd: Initialize bgp_notify.raw_data before passing to bgp_notify_rec…
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
```
2523558-==2523558==
2523558-==2523558== Conditional jump or move depends on uninitialised value(s)
2523558:==2523558== at 0x47F242: bgp_notify_admin_message (bgp_debug.c:505)
2523558-==2523558== by 0x47F242: bgp_notify_print (bgp_debug.c:534)
2523558-==2523558== by 0x4BA9BC: bgp_notify_receive (bgp_packet.c:1905)
2523558-==2523558== by 0x4BA9BC: bgp_process_packet (bgp_packet.c:2602)
2523558-==2523558== by 0x4904B7E: thread_call (thread.c:1681)
2523558-==2523558== by 0x48CAA27: frr_run (libfrr.c:1126)
2523558-==2523558== by 0x474B1A: main (bgp_main.c:540)
2523558-==2523558== Uninitialised value was created by a stack allocation
2523558:==2523558== at 0x4BA33D: bgp_process_packet (bgp_packet.c:2529)
```
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
|\ \ \
| |/ /
|/| | |
More flags
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Allow us to read what the change flags are instead of having
to look them up.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add a function that allows us to see a string version of the
bnc->flags bit fields.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This command was put in place to allow upgrades for the
neighbor command from the BGP_NODE and have it put
into the ipv4 uni node instead. Since this
utterly kills the yang conversion. I believe we need
to remove this. Since people upgrading will just loose
the route-map applicatoin( if they are using such an old
config ) and RFC 8212 will come into play. They'll figure
it out pretty fast.
Fixes: #7983
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|\ \
| | |
| | | |
BGP: "no neighbor <peer-group> allowas-in" is not resetting the peer-group member allowas_in[afi][safi].
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Unconfig not resetting the peer-group member allowas_in[afi][safi]
This is causing remote route to be accept.
Signed-off-by: Kishore Kunal <kishorekunal01@broadcom.com>
|