summaryrefslogtreecommitdiffstats
path: root/bgpd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* bgpd: Unset only aggregator flag when AGGREGATOR_AS is 0Donatas Abraitis2021-02-051-13/+10
| | | | | | | | | 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>
* bgpd: Drop aggregator_as attribute if malformed in case of BGP_AS_ZERODonatas Abraitis2021-02-031-16/+19
| | | | | | | | | | | | | | | | 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>
* Merge pull request #7449 from sudhanshukumar22/bgp-update-connect-timerDonatas Abraitis2021-02-031-4/+26
|\ | | | | bgpd: config connect timer not applied immediately for non-established peers.
| * bgpd: config connect timer is not applied immediately for peers in ↵sudhanshukumar222021-02-021-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | bgpd: Replace 65535 with UINT16_MAXDonatas Abraitis2021-02-023-6/+6
| | | | | | | | | | | | Just consistent. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* | bgpd: Centralize the dest unlocking for adj_out data structureDonald Sharp2021-02-012-23/+9
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge pull request #7988 from ton31337/fix/initialize_raw_dataDonald Sharp2021-02-011-0/+1
|\ \ | | | | | | bgpd: Initialize bgp_notify.raw_data before passing to bgp_notify_rec…
| * | bgpd: Initialize bgp_notify.raw_data before passing to bgp_notify_receive()Donatas Abraitis2021-01-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` 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>
* | | Merge pull request #7969 from donaldsharp/more_flagsDonatas Abraitis2021-02-013-6/+70
|\ \ \ | |/ / |/| | More flags
| * | bgpd: Add `bgp_nexthop_dump_bnc_change_flags` functionDonald Sharp2021-01-293-3/+30
| | | | | | | | | | | | | | | | | | | | | Allow us to read what the change flags are instead of having to look them up. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| * | bgpd: Add bgp_nexthop_dump_bnc_flagsDonald Sharp2021-01-293-5/+42
| | | | | | | | | | | | | | | | | | | | | 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>
* | | bgpd: Remove hidden `neighbor X route-map Y <in|out>` commandDonald Sharp2021-01-301-18/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge pull request #7960 from kishorekunal01/bgp_fix_allowas_inDonatas Abraitis2021-01-291-5/+0
|\ \ | | | | | | BGP: "no neighbor <peer-group> allowas-in" is not resetting the peer-group member allowas_in[afi][safi].
| * | bgpd: Removing "neighbor <peer-group> allowas-in"Kishore Kunal2021-01-281-5/+0
| | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge pull request #7974 from donaldsharp/more_if_zeroDonatas Abraitis2021-01-298-134/+0
|\ \ \ | | | | | | | | More if zero
| * | | bgpd: Remove #if 0 codeDonald Sharp2021-01-288-134/+0
| | | | | | | | | | | | | | | | | | | | | | | | Remove all dead #if 0 code from bgpd. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | | | bgpd: Show NoNeg instead of bad parsing `show bgp summary` if disabledDonatas Abraitis2021-01-281-1/+3
| | | | | | | | | | | | | | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* | | | bgpd: Include local AS for JSON output in `show bgp summary json` cmdDonatas Abraitis2021-01-281-0/+5
| | | | | | | | | | | | | | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* | | | bgpd: Add `show bgp summary wide` commandDonatas Abraitis2021-01-284-50/+91
|/ / / | | | | | | | | | | | | | | | Add LocalAS into wide output and extend Desc to 64 chars instead of 20. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* | | Merge pull request #7433 from sudhanshukumar22/bgp-aggregate-member-issueDonatas Abraitis2021-01-281-0/+24
|\ \ \ | |/ / |/| | bgpd:'bgpd' core generated on Leaf device with system-test config
| * | bgpd:'bgpd' core generated on Leaf device with system-test configsudhanshukumar222021-01-181-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description: aggregate member route was enqueued for recalculation while bgp instance was deleted. As part of aggregate member route deletion, the aggregate route is reinstalled with self-peer as source, but self-peer is already removed. Assert() for null peer pointer is path attribute aborts bgp. Problem Description/Summary : BGP crashed while cleaning up aggregate route as part of bgp instance deletion. ----------------------- Leaf-4(config)# Leaf-4(config)# no router bgp 65179 vrf Vrf-red Leaf-4(config)# no router bgp 65179 Leaf-4(config)# Leaf-4(config)# Leaf-4(config)# root@Leaf-4:~# Sep 26 15:38:21.257554 System is not ready - Core services are down ------------ router bgp 65179 bgp router-id 100.2.0.3 no bgp default ipv4-unicast bgp network import-check neighbor LeafToHostv4 peer-group neighbor LeafToHostv4 remote-as 65003 neighbor LeafToHostv6 peer-group neighbor LeafToHostv6 remote-as 65003 neighbor LeafToSpinev4 peer-group neighbor LeafToSpinev4 remote-as 65134 neighbor LeafToSpinev4 bfd neighbor LeafToSpinev6 peer-group neighbor LeafToSpinev6 remote-as 65134 neighbor LeafToSpinev6 bfd neighbor WindowsServer peer-group neighbor WindowsServer remote-as 65201 neighbor 155.1.0.4 peer-group LeafToSpinev4 neighbor 155.2.0.4 peer-group LeafToSpinev4 neighbor 2000:155:1::4 peer-group LeafToSpinev6 neighbor 2000:155:2::4 peer-group LeafToSpinev6 neighbor 172.16.11.2 peer-group WindowsServer neighbor 172.16.1.2 remote-as 65101 neighbor 2000:172:16:1::2 remote-as 65101 bgp listen limit 400 bgp listen range 133.3.0.0/16 peer-group LeafToHostv4 bgp listen range 2000:133:3::/48 peer-group LeafToHostv6 ! address-family ipv4 unicast aggregate-address 133.1.0.0/16 as-set aggregate-address 133.2.0.0/16 as-set aggregate-address 133.3.0.0/16 as-set aggregate-address 133.4.0.0/16 as-set redistribute connected neighbor LeafToHostv4 activate neighbor LeafToSpinev4 activate neighbor LeafToSpinev4 allowas-in 1 neighbor LeafToSpinev4 route-map spine_v4_export out neighbor WindowsServer activate neighbor 172.16.1.2 activate exit-address-family ! address-family ipv6 unicast aggregate-address 2000:133:1::/48 as-set aggregate-address 2000:133:2::/48 as-set aggregate-address 2000:133:3::/48 as-set aggregate-address 2000:133:4::/48 as-set redistribute connected .. ------------ (gdb) bt name=0x55607dd49090 <_FUNCTION_.23915> "bgp_path_info_add") at bgpd/bgpd.c:1159 name=name@entry=0x55607dd49090 <_FUNCTION_.23915> "bgp_path_info_add", peer=<optimized out>) at bgpd/bgpd.c:1158 pi=<optimized out>) at bgpd/bgp_route.c:313 afi=afi@entry=AFI_IP, safi=safi@entry=SAFI_UNICAST, p=p@entry=0x55607f1c4e10, origin=<optimized out>, aspath=0x55607f4bc8a0, community=<optimized out>, ecommunity=<optimized out>, lcommunity=<optimized out>, atomic_aggregate=0 '\000', aggregate=0x55607f1c4ee0) at bgpd/bgp_route.c:5926 aggr_p=<optimized out>, aggregate=<optimized out>, pi=0x55607f41f9f0, safi=SAFI_UNICAST, afi=AFI_IP, bgp=0x55607eeba5d0) at bgpd/bgp_route.c:6385 del=del@entry=0x55607f41f9f0, afi=afi@entry=AFI_IP, --Type <return> to continue, or q <return> to quit-- safi=safi@entry=SAFI_UNICAST) at bgpd/bgp_route.c:6446 pi=0x55607f41f9f0, peer=0x55607ef22c10, afi=AFI_IP, safi=SAFI_UNICAST) at bgpd/bgp_route.c:2885 data=<optimized out>) at bgpd/bgp_route.c:4125 at lib/workqueue.c:291 at lib/thread.c:1540 at bgpd/bgp_main.c:498 (gdb) fr 5 name=name@entry=0x55607dd49090 <_FUNCTION_.23915> "bgp_path_info_add", peer=<optimized out>) at bgpd/bgpd.c:1158 1158 bgpd/bgpd.c: No such file or directory. (gdb) fr 10 pi=0x55607f41f9f0, peer=0x55607ef22c10, afi=AFI_IP, safi=SAFI_UNICAST) at bgpd/bgp_route.c:2885 2885 bgpd/bgp_route.c: No such file or directory. (gdb) p peer->lock $2 = 210 (gdb) p peer->status $3 = 8 (gdb) (gdb) p bgp $11 = (struct bgp *) 0x56121ba315d0 (gdb) p bgp->peer_self $12 = (struct peer *) 0x0 (gdb) p bgp->name $13 = 0x0 (gdb) p bgp->name_pretty $14 = 0x56121bb046a0 "VRF default" (gdb) p bgp->inst_type $15 = BGP_INSTANCE_TYPE_DEFAULT (gdb) bgp_aggregate_install(): 5920 5921 new = info_make(ZEBRA_ROUTE_BGP, BGP_ROUTE_AGGREGATE, 0, 5922 bgp->peer_self, attr, rn); 5923 5924 SET_FLAG(new->flags, BGP_PATH_VALID); 5925 5926 bgp_path_info_add(rn, new); 5927 bgp_process(bgp, rn, afi, safi); 299 void bgp_path_info_add(struct bgp_node *rn, struct bgp_path_info *pi): ... 310 311 bgp_path_info_lock(pi); 312 bgp_lock_node(rn); 313 peer_lock(pi->peer); /* bgp_path_info peer reference */ <<< This points to bgp->peer_self = NULL 314 } 1573 #define peer_lock(B) peer_lock_with_caller(_FUNCTION_, (B)) 1156 /* increase reference count on a struct peer */ 1157 struct peer *peer_lock_with_caller(const char *name, struct peer *peer) 1158 { 1159 assert(peer && (peer->lock >= 0)); <<< asserted here 1160 Similar issue was fixed in community and we already have the fix: https://github.com/FRRouting/frr/pull/4816 root@sr407497_lxc2:/home/ubuntu/frr_repo/frr/bgpd# git diff dfb6fd1dd119a5bd660012e940e8328534547e76~ dfb6fd1dd119a5bd660012e940e8328534547e76 diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index abad1db..a372568 100644 — a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -5332,6 +5332,13 @@ static void bgp_purge_af_static_redist_routes(struct bgp *bgp, afi_t afi, struct bgp_node *rn; struct bgp_path_info *pi; + /* Do not install the aggregate route if BGP is in the + * process of termination. + */ + if (bgp_flag_check(bgp, BGP_FLAG_DELETE_IN_PROGRESS) || + (bgp->peer_self == NULL)) + return; + table = bgp->rib[afi][safi]; for (rn = bgp_table_top(table); rn; rn = bgp_route_next(rn)) { for (pi = bgp_node_get_bgp_path_info(rn); pi; pi = pi->next) { But looks like similar handling is required at other places as well: Expected Behavior : BGP daemon should not crash Signed-off-by: sudhanshukumar22 <sudhanshu.kumar@broadcom.com>
* | | Merge pull request #7936 from pjdruddy/l3vpn-lableled-nh-checkDonald Sharp2021-01-275-15/+21
|\ \ \ | | | | | | | | bgpd: make sure nh is valid for MPLS vpn routes
| * | | bgpd: make sure nh is valid for MPLS vpn routesPat Ruddy2021-01-275-15/+21
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | If we are using a nexthop for a MPLS VPN route make sure the nexthop is over a labeled path. This new check mirrors the one in validate_paths (where routes are enabled when a nexthop becomes reachable). The check is introduced to the code path where routes are added and the nexthop is looked up. Signed-off-by: Pat Ruddy <pat@voltanet.io>
* | | Merge pull request #7635 from AnuradhaKaruppiah/ead-evi-knobsPatrick Ruddy2021-01-263-7/+65
|\ \ \ | | | | | | | | bgpd: add config knobs to disable rx and tx of ead-per-evi routes
| * | | bgpd: add config knobs to disable rx and tx of ead-per-evi routesAnuradha Karuppiah2020-12-113-7/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some vendors only advertise EAD-per-ES routes i.e. they do not advertise EAD-per-EVI routes. To interop with these vendors we need to relax the dependancy on EAD-per-EVI routes to activate a remote ES-PE. Sample config - >>>>>>>>>>>>>>>>>>>>>>>>>>>> router bgp 5553 address-family l2vpn evpn disable-ead-evi-rx >>>>>>>>>>>>>>>>>>>>>>>>>>>> Ticket: CM-31177 Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
* | | | Merge pull request #7676 from ↵Russ White2021-01-261-1/+22
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | ton31337/fix/show_ip_bgp_summary_description_truncate bgpd: Strip neighbors's description to 20 chars in show bgp summary
| * | | bgpd: Strip neighbors's description to 20 chars in show bgp summaryDonatas Abraitis2020-12-171-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also make sure we do not show descriptions with whitespace characters, just take the first splitted by whitespace. ``` root@exit1-debian-9:~/frr# vtysh -c 'show run' | grep description neighbor 192.168.0.2 description 12346789012345678901234567890 root@exit1-debian-9:~/frr# vtysh -c 'show ip bgp summary' | grep 192.168.0.2 192.168.0.2 4 65030 0 0 0 0 0 never Idle (Admin) 0 1234678901234567890 ``` ``` root@exit1-debian-9:~/frr# vtysh -c 'show run' | grep description neighbor 192.168.0.2 description one two root@exit1-debian-9:~/frr# vtysh -c 'show ip bgp summary' | grep 192.168.0.2 192.168.0.2 4 65030 0 0 0 0 0 never Idle (Admin) 0 one ``` Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* | | | bgpd: Assert that community_str2com("no-export") always returns non-NULLDonatas Abraitis2021-01-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | community_str2com("no-export"); returns ALWAYS non-NULL. If NULL returned here, we really have a bigger problems in the call path. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* | | | bgpd: Set no-export community for blackhole tagged prefixesDonatas Abraitis2021-01-251-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC says to prevent propagation of the prefix outside the local AS. So, let's use NO_EXPORT. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* | | | bgpd: Log prefix when community filter failsDonatas Abraitis2021-01-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed when NO_ADVERTISE or NO_EXPORT is handled for outgoing updates. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* | | | Merge pull request #7899 from ton31337/fix/bgpd_blackhole_communitybase_7.6Donald Sharp2021-01-225-81/+49
|\ \ \ \ | | | | | | | | | | bgpd: Massage Blackhole community
| * | | | bgpd: Set NO_ADVERTISE community if blackhole community receivedDonatas Abraitis2021-01-214-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rfc7999: A BGP speaker receiving an announcement tagged with the BLACKHOLE community SHOULD add the NO_ADVERTISE or NO_EXPORT community as defined in [RFC1997], or a similar community, to prevent propagation of the prefix outside the local AS. The community to prevent propagation SHOULD be chosen according to the operator's routing policy. Sent: ``` router bgp 65534 no bgp ebgp-requires-policy neighbor 192.168.0.2 remote-as 65030 ! address-family ipv4 unicast redistribute connected neighbor 192.168.0.2 route-map spine out exit-address-family ! ! ip prefix-list self seq 5 permit 192.168.100.1/32 ! route-map spine permit 10 match ip address prefix-list self set community blackhole ! ``` Received: ``` spine1-debian-9# show ip bgp 192.168.100.1/32 BGP routing table entry for 192.168.100.1/32 Paths: (1 available, best #1, table default, inform peer to blackhole prefix) Not advertised to any peer 65534 192.168.0.1 from 192.168.0.1 (192.168.100.1) Origin incomplete, metric 0, valid, external, best (First path received) Community: blackhole no-advertise Last update: Thu Jan 21 12:56:39 2021 ``` Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
| * | | | bgpd: Remove community_regexp_delete() functionDonatas Abraitis2021-01-211-80/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not used. Commented. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* | | | | Merge pull request #7854 from patrasar/2606829Mark Stapp2021-01-221-2/+8
|\ \ \ \ \ | | | | | | | | | | | | bgpd : multiple memory leak fixes in show commands
| * | | | | bgpd : multiple memory leak fixes in show commandsSarita Patra2021-01-221-2/+8
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue: bgpd got kill due to out of memory, when show bgp neighbor json and show ip bgp neighbor <ip> routes json commands executed multiple times in a setup having 320554 routes. RCA: Heap allocated for bgpd keeps increasing. This is verified using top command and show memory command. Memleak Fix-1: show ip bgp route json command When dumping a large bit of table data via bgp_show_route and if there is no information to display for a particular struct bgp_node *` the data allocated via json_object_new_array() is not freed. This is resolved now. Memleak Fix-2: The function bgp_peer_counts() doesn't free the memory allocated for json_loop when there is No such neighbor or address family. This is fixed now. Signed-off-by: Sarita Patra <saritap@vmware.com>
* / / / / bgpd: Add afi/safi info to debug processing dataDonald Sharp2021-01-211-14/+20
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When debugging in bgp is turned on for route-map processing it would be awful nice to know what afi-safi we are working on for the particular route-map. Especially when using a route-map across different peers and different afi/safi's Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | | | Merge pull request #7781 from chiragshah6/evpn_devRuss White2021-01-194-240/+11779
|\ \ \ \ | | | | | | | | | | [yang,bgpd] convert neighbor prefix-list and route-map to transactional clis
| * | | | bgpd: convert nbr rmap transactional cliChirag Shah2021-01-102-314/+474
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move vtysh handler to DEFPY - Convert neighbor route-map command to transactional cli. - After nb conversion, remove not used apis. - Implement NB callbacks for afi-safis Signed-off-by: Chirag Shah <chirag@nvidia.com>
| * | | | yang: nbr plist nb conversion for more afi-safisChirag Shah2021-01-103-8/+11338
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Chirag Shah <chirag@nvidia.com>
| * | | | bgpd: convert neighbor plist to transactional cliChirag Shah2021-01-102-120/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move vtysh handler to DEFPY - Convert neighbor prefix-list command to transactional cli. - After nb conversion, remove not used apis. - implement NB apis for ipv4 afi-safis Signed-off-by: Chirag Shah <chirag@nvidia.com>
* | | | | Merge pull request #7884 from donaldsharp/null_stuffRuss White2021-01-1910-39/+38
|\ \ \ \ \ | | | | | | | | | | | | Null stuff
| * | | | | bgpd: Use uint32_t for size value instead of int in ecommunity structDonald Sharp2021-01-189-35/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `struct ecommunity` structure is using an int for a size value. Let's switch it over to a uint32_t for size values since a size value for data can never be negative. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| * | | | | bgpd: attr is already derefed cannot be null hereDonald Sharp2021-01-181-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the function bgp_adj_out_set_subgroup, the attr pointer is already derefed in all paths leading to a test for NULL. You cannot pass a NULL attribute in since the whole function would just immediately crash. CID -> 1500604 Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | | | | | Merge pull request #7639 from qlyoung/frr-luaRuss White2021-01-195-86/+357
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Scripting
| * | | | | build: HAVE_LUA -> HAVE_SCRIPTINGQuentin Young2020-12-024-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And also guard all scripting-related stuff with HAVE_SCRIPTING. Signed-off-by: Quentin Young <qlyoung@nvidia.com>
| * | | | | bgpd: update routemap scripting exampleQuentin Young2020-12-025-101/+319
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Change from "match command <foo>" to "match script <script>" - Use new scripting API Signed-off-by: Quentin Young <qlyoung@nvidia.com>
| * | | | | lib: cleanup / refactor scripting fooQuentin Young2020-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - fix 'struct lua_State' - change includes to library style - rename encoder funcs to look like lua_push* funcs - fix erroneous doc comment on prefix encoder - remove unused (and broken) convenience func Signed-off-by: Quentin Young <qlyoung@nvidia.com>
| * | | | | lib: move bgp routemap stuff out of frrlua.[ch]Quentin Young2020-12-021-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
| * | | | | lib: remove frrlua_initializeQuentin Young2020-12-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was toy code used for testing purposes. Code calling Lua should be very explicit about what is loaded into the Lua state. Also, the allocator used is exactly the same allocator used by default w/ luaL_newstate(). Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
| * | | | | lib: clean up frrlua.[ch]Quentin Young2020-12-021-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use frrlua_* prefix to differentiate from Lua builtins * Allow frrlua_initialize to pass an empty script * Fixup naming of table accessors * Fixup naming of prefix -> table encoder * Fixup BGP routemap code to new function names * Fix includes for frrlua.h * Clean up doc comments Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>