Mark Stapp
272e11bfc4
zebra: give some evpn apis better names
...
Use more useful names for a few evpn apis.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-07-19 08:43:48 -04:00
github login name
906640dbaf
pimd : memory leak in rp_table cleanup.
...
Problem Statement:
==================
valgrind shows memleaks in rp_table, when pimd shuts down gracefully.
2020-05-05 22:09:29,451 ERROR: Memory leaks in router [r4] for daemon [pimd]
2020-05-05 22:09:29,451 ERROR: Memory leaks in router [r4] for daemon [zebra]
2020-05-05 22:09:29,637 ERROR: Found memory leak in module pimd
2020-05-05 22:09:29,638 ERROR: ==6178== 184 (56 direct, 128 indirect) bytes in 1 blocks are definitely lost in loss record 21 of 21
2020-05-05 22:09:29,638 ERROR: ==6178== at 0x4C2FFAC: calloc (vg_replace_malloc.c:762)
2020-05-05 22:09:29,638 ERROR: ==6178== by 0x4E855EE: qcalloc (memory.c:111)
2020-05-05 22:09:29,638 ERROR: ==6178== by 0x4EAA43C: route_table_init_with_delegate (table.c:52)
2020-05-05 22:09:29,638 ERROR: ==6178== by 0x1281A1: pim_rp_init (pim_rp.c:114)
2020-05-05 22:09:29,638 ERROR: ==6178== by 0x11D0F8: pim_instance_init (pim_instance.c:117)
2020-05-05 22:09:29,638 ERROR: ==6178== by 0x11D0F8: pim_vrf_new (pim_instance.c:150)
2020-05-05 22:09:29,638 ERROR: ==6178== by 0x4EB1BEC: vrf_get (vrf.c:209)
2020-05-05 22:09:29,638 ERROR: ==6178== by 0x4EB2B2F: vrf_init (vrf.c:493)
2020-05-05 22:09:29,638 ERROR: ==6178== by 0x11D227: pim_vrf_init (pim_instance.c:217)
2020-05-05 22:09:29,638 ERROR: ==6178== by 0x11BBAB: main (pim_main.c:121)
Fix:
====
rp_info is allocated in pim_rp_init API. rp_info pointer is present
in rp_list and rp_table. In rp_list cleanup, the memory for rp_info
gets freed. rp_table clean up should be done first and then rp_list.
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-07-19 04:30:58 -07:00
github login name
660b044294
pimd: pim_ifchannel_local_membership_add should not inherit if (S,G) rpf unresolved
...
Problem:
S,G entry has iif = oif in FHR is LHR case.
Setup:-
R11-----R2----R4
R11 :- FHR and LHR
R2 :- RP
R4 :- LHR
Issue :-
1) shut mapped interface in R11
2) wait for 5 min
3) do FRR restart
5) No shut of mapped interface
OIL is added for local interface also where OIL is same as IIF
and duplicate traffic observed on R4 receives in Ixia
RCA:
pim_ifchannel_local_membership_add adds inherited oif from starg when iif for
SG is unavailable.
When rpf for that SG resolves to this inherited oif from starg, iif is also in oif.
This results in dup traffic.
Fix:
If iif is not available, do not inherit from starg.
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-07-19 03:57:25 -07:00
Donald Sharp
fb8e437bcd
Merge pull request #9080 from ton31337/fix/reason_bgpd
...
bgpd: Drop unnecessary chars for filtered reason
2021-07-18 15:33:19 -04:00
Donatas Abraitis
396a82ec2e
Merge pull request #9075 from donaldsharp/alias_auto_completion
...
bgpd: Allow for auto-completion of community alias's created
2021-07-18 20:30:41 +03:00
Donatas Abraitis
692174a1c5
bgpd: Drop unnecessary chars for filtered reason
...
Seems missed grammarly review for the reason "as-path contains our own AS;"
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-07-18 18:03:25 +03:00
Donatas Abraitis
dddec792ae
Merge pull request #9061 from donaldsharp/bgp_max_path_doc
...
doc: Document the maximum-paths command for bgp
2021-07-18 11:46:35 +03:00
Donald Lee
596b44af8a
lib: Remove warning about script not found
...
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
9d6204020d
bgpd: Remove warning about not finding script
...
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
7472871eef
lib: Comment functions
...
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
62435f8ce1
bgpd: Use int encoder/decoder
...
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
2b67227e6e
lib: Add int encoder/decoder
...
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
8878080b1b
lib: Remove ../ include
...
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
0972af957a
bgpd: Update bgpd example with get_result
...
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
aed6f883a0
doc: Update documentation
...
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
64d457d7ac
lib: Rename frrscript_unload to delete
...
frrscript_load now loads a function instead of a file, so frrscript_unload
should be renamed since it does not unload a function.
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
8a04c1e74e
tests: Add more examples to get_result
...
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
b664092990
lib: standardize zlog error messages
...
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
ad6e9b854d
test: Use frrscript_unload
...
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
fae19fa56d
lib: frrscript unload deallocates Lua function
...
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
8a79921ca3
lib: format macro slashes
...
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
5090d7249f
tests: Add test for frrscript_get_result
...
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
06947ddeac
lib: Add frrscript_get_result
...
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
24ff8520af
lib: frrscript_call check name before decode
...
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
7948c5d27a
tests: Add errorneous test cases
...
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
cb5de23140
lib: update frrscript unload
...
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
4535b6113c
tests: Add test for calling Lua function
...
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
bf938fdb9d
bgpd: Update bgpd example to call function
...
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
a71096fb0a
lib: Update Script command example to call function
...
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
40d038d2a1
lib: Change frrscript_call to call function instead
...
There is some rather heavy error checking logic in frrscript_call. Normally
I'd put this in the _frrscript_call function, but the error checking needs
to happen before the encoders/decoders in the macro are called.
The error checking looks messy but its really just nested ternary
expressions insite a larger statement expression.
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
f0cddf950f
lib: create new frrscript_new
...
frrscript_new now creates a new frrscript
frrscript_load now loads a function (by allocating a new lua stack)
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Lee
105ba9af8f
lib: Change frrscript to hold many Lua states
...
Instead of 1 frrscript : 1 lua state, it is changed to 1 : N.
The states are hashed with their function names.
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00
Donald Sharp
7ed3c169cb
Merge pull request #9062 from ton31337/fix/bgp_dampening_json_crash
...
bgpd: BGP dampening JSON fixes
2021-07-16 14:41:32 -04:00
Donald Sharp
b4ad2fae54
bgpd: Allow for auto-completion of community alias's created
...
Add a bit of code to allow for auto-completion of the community
alias command when attempting to use it for show commands.
example:
eva(config)# bgp community alias 11:22 FOO
eva(config)# end
eva# show bgp ipv4 uni alias
ALIAS_NAME BGP community alias
FOO
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-07-16 09:52:53 -04:00
Mark Stapp
12e1fe1251
Merge pull request #9063 from sworleys/Fix-IFP-NHG
...
zebra: fix ifp pointer for groups/recursives
2021-07-16 09:33:52 -04:00
Rafael Zalamena
9d37889de0
Merge pull request #9001 from donaldsharp/pim_mrib_lookup_do_all
...
pimd: When passing lookup information back pass the fully resolved
2021-07-16 10:24:27 -03:00
Donald Sharp
c24e832ae9
Merge pull request #8946 from gpnaveen/bgp_lib_changes
...
tests: Adding lib changes for bgp peer type verification.
2021-07-16 09:15:36 -04:00
Donald Sharp
eeef611bad
Merge pull request #9068 from ton31337/fix/reduce_converge_time
...
tests: Reduce bgp_conditional_advertisement converge time 10x
2021-07-16 08:34:46 -04:00
Mark Stapp
65574cda3b
Merge pull request #9049 from LabNConsulting/chopps/improve-frr-reload-delta
...
tools: improve frr-reload.py delta file creation
2021-07-16 08:21:57 -04:00
Igor Ryzhov
6a09e0a34a
Merge pull request #9038 from donaldsharp/realloc_bgp
...
bgpd: XREALLOC handles NULL properly
2021-07-16 13:17:47 +03:00
Igor Ryzhov
3e763419d4
Merge pull request #9053 from opensourcerouting/ospfv3-debug-guard
...
ospf6d: remove extra debug message
2021-07-16 13:09:59 +03:00
Christian Hopps
be4a9b0570
tools: improve frr-reload.py delta file creation
...
- Remove incorrect requirement for `service integrated-vtysh-config`
when producing a delta.
- Add `--test-reset` option which suppresses non-parseable lines from the
produced delta
- Use new features in common_config.py
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-07-15 22:12:01 -04:00
Donatas Abraitis
2c3d4b28bd
tests: Reduce bgp_conditional_advertisement converge time 10x
...
~15min vs. ~1min.
Before:
```
1 passed, 1 skipped in 908.61 seconds
```
After:
```
1 passed, 1 skipped in 82.94 seconds
```
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-07-15 23:40:42 +03:00
Donald Sharp
0f8de6a8d8
Merge pull request #9055 from ton31337/fix/show_pfxsnt_even_when_default_route_originated
...
bgpd: Reflect changes to pfxSnt when using default-originate
2021-07-15 15:54:01 -04:00
Donald Sharp
cae48a42f8
Merge pull request #9065 from colinbs/fix_config_help_undefined_sanitizer
...
configure.ac: fix help text to --enable-undefined-sanitizer
2021-07-15 15:52:15 -04:00
Colin Sames
3f70087c2a
configure.ac: fix help text to --enable-undefined-sanitizer
...
Signed-off-by: Colin Sames <colin.sames@haw-hamburg.de>
2021-07-15 19:18:02 +02:00
Stephen Worley
bf157b9263
zebra: fix ifp pointer for groups/recursives
...
At some point we broke the ifp pointer for nhe->ifp such
that it was pointing to an interface even in groups/recurisve
instances.
Add checks here to make it again so that we only set the ifp
pointer if it is a fully resolved singleton NHE.
Signed-off-by: Stephen Worley <sworley@nvidia.com>
2021-07-15 11:24:24 -04:00
Donatas Abraitis
3125804678
bgpd: Fix dampening flap-statistics json
crash
...
With fix:
```
exit1-debian-9# sh ip bgp dampening flap-statistics
BGP table version is 22, local router ID is 10.10.10.200, vrf id 0
Default local pref 100, local AS 65001
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
RPKI validation codes: V valid, I invalid, N Not found
Network From Flaps Duration Reuse Path
*d 10.0.0.0/24 192.168.0.2 4 00:00:50 00:35:56 65000 ?
*d 10.10.10.100/32 192.168.0.2 4 00:00:50 00:35:56 65000 ?
*d 192.168.1.0/24 192.168.0.2 4 00:00:50 00:35:56 65000 ?
Displayed 3 routes and 10 total paths
exit1-debian-9# sh ip bgp dampening flap-statistics json
{
"vrfId": 0,
"vrfName": "default",
"tableVersion": 22,
"routerId": "10.10.10.200",
"defaultLocPrf": 100,
"localAS": 65001,
"routes": { "10.0.0.0/24": [
{
"valid":true,
"damped":true,
"pathFrom":"external",
"peerHost":"192.168.0.2",
"bdiFlap":4,
"peerUptime":"00:00:54",
"peerUptimeMsec":54000,
"peerUptimeEstablishedEpoch":1626355135,
"reuseTimerMsecs":2151000,
"asPath":"65000",
"origin":"?"
}
],"10.10.10.100/32": [
{
"valid":true,
"damped":true,
"pathFrom":"external",
"peerHost":"192.168.0.2",
"bdiFlap":4,
"peerUptime":"00:00:54",
"peerUptimeMsec":54000,
"peerUptimeEstablishedEpoch":1626355135,
"reuseTimerMsecs":2151000,
"asPath":"65000",
"origin":"?"
}
],"192.168.1.0/24": [
{
"valid":true,
"damped":true,
"pathFrom":"external",
"peerHost":"192.168.0.2",
"bdiFlap":4,
"peerUptime":"00:00:54",
"peerUptimeMsec":54000,
"peerUptimeEstablishedEpoch":1626355135,
"reuseTimerMsecs":2151000,
"asPath":"65000",
"origin":"?"
}
] } }
```
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-07-15 16:20:02 +03:00
nguggarigoud
ea234209a1
tests: Fixing timing issue in evpn script.
...
Modified bgp timer values for faster convergence.
Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-07-15 05:57:25 -07:00
Donatas Abraitis
e5be8c1dac
bgpd: Fix dampening dampened-paths json
crash
...
```
5 0x00007fccab6fac39 in json_object_boolean_true_add (obj=<optimized out>, key=<optimized out>) at lib/json.c:70
No locals.
6 0x000055c7b8c08ae5 in route_vty_short_status_out (vty=<optimized out>, path=0x55c7bb37dcf0, p=<optimized out>, json_path=0x55c7bb3735a0)
at bgpd/bgp_route.c:8566
rpki_state = RPKI_NOT_BEING_USED
7 0x000055c7b8c22d1b in flap_route_vty_out (afi=AFI_IP, json=0x55c7bb3735a0, use_json=true, safi=SAFI_UNICAST, display=0, path=0x55c7bb37dcf0,
p=0x55c7bb37dea0, vty=0x55c7bb39e4c0) at bgpd/bgp_route.c:9600
attr = <optimized out>
bdi = 0x55c7bb377950
timebuf = '\000' <repeats 24 times>
len = <optimized out>
8 bgp_show_table (vty=0x55c7bb39e4c0, bgp=0x55c7bb316300, safi=safi@entry=SAFI_UNICAST, table=0x55c7bb314d90, type=bgp_show_type_flap_statistics,
output_arg=0x0, rd=0x0, is_last=1, output_cum=0x0, total_cum=0x0, json_header_depth=0x7ffeefd649f8, show_flags=1, rpki_target_state=RPKI_NOT_BEING_USED)
at bgpd/bgp_route.c:11110
```
With fix:
```
exit1-debian-9# sh ip bgp dampening dampened-paths
BGP table version is 16, local router ID is 10.10.10.200, vrf id 0
Default local pref 100, local AS 65001
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
RPKI validation codes: V valid, I invalid, N Not found
Network From Reuse Path
*d 10.0.0.0/24 192.168.0.2 00:21:08 65000 ?
*d 10.10.10.100/32 192.168.0.2 00:21:08 65000 ?
*d 192.168.1.0/24 192.168.0.2 00:21:08 65000 ?
Displayed 3 routes and 10 total paths
exit1-debian-9# sh ip bgp dampening dampened-paths json
{
"vrfId": 0,
"vrfName": "default",
"tableVersion": 16,
"routerId": "10.10.10.200",
"defaultLocPrf": 100,
"localAS": 65001,
"routes": { "10.0.0.0/24": [
{
"valid":true,
"damped":true,
"pathFrom":"external",
"reuseTimerMsecs":1263000,
"asPath":"65000",
"origin":"?",
"peerHost":"192.168.0.2"
}
],"10.10.10.100/32": [
{
"valid":true,
"damped":true,
"pathFrom":"external",
"reuseTimerMsecs":1263000,
"asPath":"65000",
"origin":"?",
"peerHost":"192.168.0.2"
}
],"192.168.1.0/24": [
{
"valid":true,
"damped":true,
"pathFrom":"external",
"reuseTimerMsecs":1263000,
"asPath":"65000",
"origin":"?",
"peerHost":"192.168.0.2"
}
] } }
```
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-07-15 15:55:46 +03:00