]>
git.puffer.fish Git - matthieu/frr.git/log
Philippe Guibert [Fri, 1 Jul 2022 12:50:40 +0000 (14:50 +0200)]
bgpd: implement retain route-target all behaviour
A new command is available under SAFI_MPLS_VPN:
With this command, the BGP vpnvx prefixes received are
not kept, if there are no VRF interested in importing
those vpn entries.
A soft refresh is performed if there is a change of
configuration: retain cmd, vrf import settings, or
route-map change.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
David Lamparter [Wed, 13 Jul 2022 14:54:39 +0000 (16:54 +0200)]
Merge pull request #11598 from patrasar/pim_get_instance
David Lamparter [Wed, 13 Jul 2022 14:51:10 +0000 (16:51 +0200)]
Merge pull request #11585 from patrasar/sg_str
David Lamparter [Wed, 13 Jul 2022 14:49:27 +0000 (16:49 +0200)]
Merge pull request #11593 from mobash-rasool/fixes
mobash-rasool [Wed, 13 Jul 2022 11:59:30 +0000 (17:29 +0530)]
Merge pull request #11597 from opensourcerouting/pimd-packed-member
pimd: fix unaligned accesses
Mobashshera Rasool [Tue, 12 Jul 2022 08:11:12 +0000 (01:11 -0700)]
pimd,pim6d: Set RP to true if the address matches, ignore prefix-length
The API pim_rp_check_interface_addrs checks if the RP address matches
with the primary address then it returns true.
In case of PIMv4 this condition is true, therefore the router becomes RP.
But in case of PIMv6, this condition does not pass because primary address
for PIMv6 is link-local address.
Also PIMv4 allows secondary addresses to be used as RP
if it is a host route in case primary does not match.
Fixing it by only checking the configured
RP address with the interface address and ignoring the prefix
length since it does not matter.
Fixes: #11335
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
mobash-rasool [Wed, 13 Jul 2022 04:12:07 +0000 (09:42 +0530)]
Merge pull request #11576 from anlancs/fix/minor-5
zebra: remove redundant flags assignment
anlan_cs [Fri, 8 Jul 2022 21:38:26 +0000 (17:38 -0400)]
zebra: remove redundant flags assignment
The assignment of neigh flags on ES peers is set twice. Just clean it.
Signed-off-by: anlan_cs <vic.lan@pica8.com>
Donatas Abraitis [Tue, 12 Jul 2022 16:09:32 +0000 (19:09 +0300)]
Merge pull request #11566 from louis-6wind/rename-mplsvpn
bgpd: rename "struct bgp" variables in mplsvpn and cleanup
Jafar Al-Gharaibeh [Tue, 12 Jul 2022 15:55:23 +0000 (09:55 -0600)]
Merge pull request #11572 from opensourcerouting/fix/avoid_double_quotes_when_cat
tools: Do not wrap the pidfile into double-quotes for frrcommon.sh
Mark Stapp [Tue, 12 Jul 2022 15:44:29 +0000 (11:44 -0400)]
Merge pull request #11461 from mobash-rasool/pimv6-enable
pim6d: Enable/disable pim6d daemons on different platforms based on flags
David Lamparter [Tue, 12 Jul 2022 15:41:09 +0000 (17:41 +0200)]
Merge pull request #11285 from iqras23/conditional_def_orig
Russ White [Tue, 12 Jul 2022 14:23:01 +0000 (10:23 -0400)]
Merge pull request #11577 from opensourcerouting/fix/memory_leak_bgp_gr_notification
bgpd: Free ->raw_data from Hard Notification message after we use it
Sarita Patra [Tue, 12 Jul 2022 13:01:50 +0000 (06:01 -0700)]
pimd: Remove pim_get_pim_instance defination in pim_cmd_common.h
Signed-off-by: Sarita Patra <saritap@vmware.com>
Sarita Patra [Tue, 12 Jul 2022 13:00:57 +0000 (06:00 -0700)]
pimd: Avoid unnecessary vrf lookup
In several places, we are getting the vrf structure using
vrf_lookup_by_name(). Again we are passing vrf->vrf_id to
pim_get_pim_instance() to get the pim_instance.
The API pim_get_pim_instance() again get the VRF structure using
vrf_lookup_by_id(). This is avoided in this PR.
Signed-off-by: Sarita Patra <saritap@vmware.com>
Sarita Patra [Mon, 11 Jul 2022 11:58:45 +0000 (04:58 -0700)]
pim6d: Longest possible length of a (S,G) string is 94 bytes
Longest possible length of a IPV6 (S,G) string is 94 bytes
INET6_ADDRSTRLEN * 2 = 46 * 2
(,) = 1
NULL Character at end = 1
Signed-off-by: Sarita Patra <saritap@vmware.com>
Sarita Patra [Mon, 11 Jul 2022 11:56:29 +0000 (04:56 -0700)]
pimd: Fix description for PIM_SG_LEN
Signed-off-by: Sarita Patra <saritap@vmware.com>
David Lamparter [Tue, 12 Jul 2022 10:55:42 +0000 (12:55 +0200)]
Merge pull request #11580 from patrasar/remove_pim_addr.h
pimd: removal double inclusion of pim_addr.h
David Lamparter [Tue, 12 Jul 2022 10:47:46 +0000 (12:47 +0200)]
pimd: fix unaligned accesses
These are in packed structs at weird offsets (e.g. 2 bytes), and as such
need a memcpy to get them into proper alignment.
It'd be even better if the pimd code used proper de/serialization, but
let's get this improved one step at a time.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Jafar Al-Gharaibeh [Tue, 12 Jul 2022 06:15:47 +0000 (00:15 -0600)]
Merge pull request #11588 from opensourcerouting/fix/babeld_missing_routes
babeld: Install route to RIB if parse_update_subtlv() is false
Donatas Abraitis [Mon, 11 Jul 2022 17:26:06 +0000 (20:26 +0300)]
babeld: Install route to RIB if parse_update_subtlv() is false
We installed the route only if the type was SUBTLV_MANDATORY.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Donatas Abraitis [Mon, 11 Jul 2022 16:40:06 +0000 (19:40 +0300)]
Merge pull request #11583 from mobash-rasool/fixes
pimd: Correct the order of show json for interface traffic
Louis Scalbert [Thu, 5 May 2022 16:46:35 +0000 (18:46 +0200)]
bgpd: fix wrong nexthop bgp struct for nexthop validation
The bgp_nexthop must be the source bgp structure. It cannot be the
destination bgp one.
Use bgp_orig source bgp struct by default.
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Louis Scalbert [Fri, 8 Jul 2022 10:37:57 +0000 (12:37 +0200)]
bgpd: rename "struct bgp" variables in mplsvpn
The "struct bgp" variable names in the mplsvpn bgp code do not
explicitly say whether they refer to a source or destination BGP
instance. Some variable declarations are commented out with "from" and
"to" but this does not avoid confusion within the functions. The names
of "struct bgp" variables are reused in different functions but their
names sometimes refer to a source instance and sometimes to a
destination instance.
Rename the "struct bgp" variable names to from_bgp and to_bgp.
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Louis Scalbert [Thu, 5 May 2022 12:19:53 +0000 (14:19 +0200)]
bgpd: remove duplicated arg in leak_update
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Sarita Patra [Mon, 11 Jul 2022 08:26:24 +0000 (01:26 -0700)]
pimd: removal double inclusion of pim_addr.h
Signed-off-by: Sarita Patra <saritap@vmware.com>
Donatas Abraitis [Fri, 8 Jul 2022 16:11:17 +0000 (19:11 +0300)]
tools: Do not wrap the pidfile into double-quotes for frrcommon.sh
The problem is that when we run watchfrr.sh/frrinit.sh, we get something like:
```
cat: '"/var/run/frr/staticd.pid"': No such file or directory
cat: '"/var/run/frr/babeld.pid"': No such file or directory
cat: '"/var/run/frr/zebra.pid"': No such file or directory
```
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Donatas Abraitis [Sun, 10 Jul 2022 09:42:46 +0000 (12:42 +0300)]
bgpd: Free ->raw_data from Hard Notification message after we use it
==175785== 0 bytes in 1 blocks are definitely lost in loss record 1 of 88
==175785== at 0x483DD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==175785== by 0x492EB8E: qcalloc (in /usr/local/lib/libfrr.so.0.0.0)
==175785== by 0x269823: bgp_notify_decapsulate_hard_reset (in /usr/lib/frr/bgpd)
==175785== by 0x26C85D: bgp_notify_receive (in /usr/lib/frr/bgpd)
==175785== by 0x26E94E: bgp_process_packet (in /usr/lib/frr/bgpd)
==175785== by 0x4985349: thread_call (in /usr/local/lib/libfrr.so.0.0.0)
==175785== by 0x491D521: frr_run (in /usr/local/lib/libfrr.so.0.0.0)
==175785== by 0x1EBEE8: main (in /usr/lib/frr/bgpd)
==175785==
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Mobashshera Rasool [Mon, 11 Jul 2022 11:13:29 +0000 (04:13 -0700)]
pimd: Correct the order of show json for interface traffic
"show ip pim interface traffic json" shows pruneTx first and then
pruneRx stats
where as
"show ip pim interface <ifname> json" shows pruneRx first and then
pruneTx stats.
Although the values are right but the display looks odd.
Making it same as other stats, first display Rx and then Tx.
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
Mark Stapp [Mon, 11 Jul 2022 11:37:00 +0000 (07:37 -0400)]
Merge pull request #11579 from opensourcerouting/fix/revert_isis_fast_reroute
isisd: Revert fast-reroute recent changes
Donatas Abraitis [Sun, 10 Jul 2022 18:41:25 +0000 (21:41 +0300)]
Revert "isisd: apply fast-reroute on an adjacency failure"
This reverts commit
71252973234e70ffa3cb5eec43d4efc1be3d3331 .
Donatas Abraitis [Sun, 10 Jul 2022 18:41:21 +0000 (21:41 +0300)]
Revert "isisd: remove previous labels before fast-reroute"
This reverts commit
a254fa54e3d5c31befb40164fc70deab3cf639ad .
Donatas Abraitis [Sun, 10 Jul 2022 18:41:17 +0000 (21:41 +0300)]
Revert "isisd: allow nexthop lookup on interface only"
This reverts commit
a11742dc53e31d1379cb4f7b9b7b750614e30928 .
Donatas Abraitis [Sun, 10 Jul 2022 18:41:12 +0000 (21:41 +0300)]
Revert "isisd: apply fast-reroute when an interface falls down"
This reverts commit
62e458278b3d261f492ffeac7ed70b32272a43dd .
Donatas Abraitis [Sun, 10 Jul 2022 18:41:07 +0000 (21:41 +0300)]
Revert "isisd: avoid fast-reroute on down adjacency when the interface is down"
This reverts commit
08e4960ab48c1c9e4227e40b286d5cbc4ac581f0 .
Donatas Abraitis [Sun, 10 Jul 2022 18:41:02 +0000 (21:41 +0300)]
Revert "isisd: avoid fast-reroute from running twice on a down interface event"
This reverts commit
d526476184999275c318b13f92ae6b38a0250052 .
Donatas Abraitis [Sun, 10 Jul 2022 18:40:55 +0000 (21:40 +0300)]
Revert "topotests: isis-tilfa add a switchover test after linkdown"
This reverts commit
bac0d1e6068ae46502bd5b348765faea554ebf72 .
Donatas Abraitis [Sun, 10 Jul 2022 18:40:49 +0000 (21:40 +0300)]
Revert "topotests: isis-tilfa add a switchover test after BFD down"
This reverts commit
e83a52698b31fde2532b4a5a8c5223ba5e858ef2 .
Donatas Abraitis [Sun, 10 Jul 2022 18:40:43 +0000 (21:40 +0300)]
Revert "isisd: fix metric calculation of classic lfa backup prefixes"
This reverts commit
e45958e9cfccd6dfc108a7ef5cb73775e8ef2e68 .
Donatas Abraitis [Sun, 10 Jul 2022 18:40:32 +0000 (21:40 +0300)]
Revert "isisd: fix SPF scheduling on IPv6 only topology"
This reverts commit
d95cd33545006004424736d20a0226b5cd9fb47a .
Donatas Abraitis [Sun, 10 Jul 2022 18:40:16 +0000 (21:40 +0300)]
Revert "topotests: isis-lfa add a switchover test after linkdown"
This reverts commit
5558ac984fa3adc5beb66a1945ad169705a28a37 .
Donatas Abraitis [Sun, 10 Jul 2022 18:40:11 +0000 (21:40 +0300)]
Revert "topotests: isis-lfa add a switchover test after hello timeout"
This reverts commit
c99ef489629ffa057b312756771693e417309995 .
Donatas Abraitis [Sun, 10 Jul 2022 18:40:05 +0000 (21:40 +0300)]
Revert "topotests: isis-lfa add a switchover test after neighbor clear"
This reverts commit
9cdc099bb5d1fa0c3949847759469bfc444a885c .
Donatas Abraitis [Sun, 10 Jul 2022 18:39:59 +0000 (21:39 +0300)]
Revert "topotests: isis-lfa add a switchover test after BFD down"
This reverts commit
c8d2816ee5245ac2a13cbb36299f2f0c23f226e3 .
mobash-rasool [Sat, 9 Jul 2022 04:19:36 +0000 (09:49 +0530)]
Merge pull request #11570 from opensourcerouting/pim6-bsr-clear
pim6d: add `clear ipv6 pim bsr-data`
Donald Sharp [Sat, 9 Jul 2022 01:30:54 +0000 (21:30 -0400)]
Merge pull request #11569 from opensourcerouting/gcc-plugin-shortcomings-220708
bgpd: work around GCC/plugin shortcomings
Donatas Abraitis [Fri, 8 Jul 2022 19:16:28 +0000 (22:16 +0300)]
Merge pull request #11568 from anlancs/fix/minor-4
bgpd: fix missing rmac value in debug
Russ White [Fri, 8 Jul 2022 15:14:07 +0000 (11:14 -0400)]
Merge pull request #10962 from louis-6wind/lfa-netlink
isisd: apply fast-reroute as soon an interface or an adjacency falls down
David Lamparter [Fri, 6 May 2022 08:28:52 +0000 (10:28 +0200)]
pim6d: add `clear ipv6 pim bsr-data`
This is needed for ANVL between testruns, and already in IPv4 too.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter [Fri, 8 Jul 2022 11:59:10 +0000 (13:59 +0200)]
bgpd: work around GCC/plugin shortcomings
The GCC extended printf format checking plugin runs into some GCC
shortcomings regarding casts on printf function parameters. While this
can be fixed with a small GCC patch, patching GCC is "nontrivial" to say
the least. Luckily, it happens that this is /almost/ not an issue for
the FRR source base.
Since we fix SA "misunderstandings" too, let's just fix places where the
format checking plugin runs into this limitation to keep things working
extra smoothly.
(It's not a huge effort either, these two spots in bgpd are the only
places that trigger the plugin limitation, and it's been "clean" before
that for more than a year if my memory is right.)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Louis Scalbert [Wed, 27 Apr 2022 15:52:38 +0000 (17:52 +0200)]
bgpd: show prefix in leak_update_nexthop_valid debug
Add prefix information in a leak_update_nexthop_valid() debug log.
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Louis Scalbert [Thu, 28 Apr 2022 15:00:50 +0000 (17:00 +0200)]
bgpd: fix setting BGP_PATH_VALID flag in leak_update
(Un)set the BGP_PATH_VALID flag appropriately in the leak_update
function.
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Louis Scalbert [Wed, 27 Apr 2022 12:15:13 +0000 (14:15 +0200)]
bgpd: factorize nexthop validation code in leak_update function
Factorize some duplicated codes about nexthop validation in the
leak_update function.
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
David Lamparter [Fri, 8 Jul 2022 08:46:35 +0000 (10:46 +0200)]
Merge pull request #10592 from patrasar/master_pimv6_bsm
Donatas Abraitis [Fri, 8 Jul 2022 06:50:44 +0000 (09:50 +0300)]
Merge pull request #11553 from patrasar/clear_ip_mroute
pimd, pim6d: Fix description for clear ip[v6] mroute command
anlan_cs [Fri, 8 Jul 2022 04:09:56 +0000 (00:09 -0400)]
bgpd: fix missing rmac value in debug
`attr.rmac` is not set in debug as expected for its wrong place in code.
Just move the debug process (`bgp_debug_zebra(NULL)`) after possible `rmac`
value is set.
Signed-off-by: anlan_cs <vic.lan@pica8.com>
sarita patra [Thu, 5 May 2022 08:04:19 +0000 (01:04 -0700)]
pim6d: removed pim6_stubs.c file
pim6_stub.c file is no more needed.
Signed-off-by: sarita patra <saritap@vmware.com>
sarita patra [Wed, 4 May 2022 14:11:35 +0000 (07:11 -0700)]
pim6d: Adjust pim_show_bsm_db for IPV6
Signed-off-by: sarita patra <saritap@vmware.com>
sarita patra [Wed, 27 Apr 2022 11:17:48 +0000 (04:17 -0700)]
pim6d: IPV6 adjust in hash_calc_on_grp_rp
Signed-off-by: sarita patra <saritap@vmware.com>
sarita patra [Wed, 27 Apr 2022 10:43:55 +0000 (03:43 -0700)]
Revert "pim6d: IPv6-adjust BSM code"
This reverts commit
809c11a9d87e0d12a5c3d3ca6906bc398a58de6c .
sarita patra [Wed, 27 Apr 2022 10:27:24 +0000 (03:27 -0700)]
pim6d: remove unused variable neigh_src_str
Signed-off-by: sarita patra <saritap@vmware.com>
sarita patra [Wed, 16 Mar 2022 11:57:12 +0000 (04:57 -0700)]
pim6d: running pim_bsm.c for pimv6
Signed-off-by: sarita patra <saritap@vmware.com>
sarita patra [Wed, 16 Mar 2022 10:17:06 +0000 (03:17 -0700)]
pim6d: add pimv6 support for bsmmsg_grpinfo
Signed-off-by: sarita patra <saritap@vmware.com>
sarita patra [Wed, 16 Mar 2022 10:08:53 +0000 (03:08 -0700)]
pim6d: add pimv6 support for bsmmsg_rpinfo
Signed-off-by: sarita patra <saritap@vmware.com>
sarita patra [Tue, 1 Mar 2022 21:38:01 +0000 (13:38 -0800)]
pim6d: add pimv6 support for bsm_hdr
Signed-off-by: sarita patra <saritap@vmware.com>
sarita patra [Wed, 16 Feb 2022 12:09:23 +0000 (04:09 -0800)]
pim6d: Add pim_addr rp_addr in bsm_rpinfo
Signed-off-by: sarita patra <saritap@vmware.com>
Donald Sharp [Thu, 7 Jul 2022 16:23:07 +0000 (12:23 -0400)]
Merge pull request #11541 from opensourcerouting/zebra-mr-netlink
zebra: fix various multicast routing netlink API bits
Donald Sharp [Thu, 7 Jul 2022 16:22:19 +0000 (12:22 -0400)]
Merge pull request #11545 from opensourcerouting/fix/memory_leak_for_bmp_listener
bgpd: Free memory for BMP listeners when deleting BGP instance
Jafar Al-Gharaibeh [Thu, 7 Jul 2022 14:56:34 +0000 (08:56 -0600)]
Merge pull request #11549 from opensourcerouting/fix/logrotate
tools: Add missing bfdd to logrotate config
sarita patra [Wed, 16 Feb 2022 11:45:34 +0000 (03:45 -0800)]
pim6d: bsr nht handling for IPV6
Signed-off-by: sarita patra <saritap@vmware.com>
sarita patra [Wed, 16 Feb 2022 11:43:07 +0000 (03:43 -0800)]
pim6d: modify in_addr current_bsr to pim_addr current_bsr
Signed-off-by: sarita patra <saritap@vmware.com>
Martin Winter [Thu, 7 Jul 2022 12:27:06 +0000 (14:27 +0200)]
debian: Add pkg.frr.pim6d build profile
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Mobashshera Rasool [Tue, 21 Jun 2022 07:30:39 +0000 (00:30 -0700)]
redhat: Always disable PIM6d on CentOS 6 and RedHat 6 systems
Since these systems are too old to correctly support the protocol
disabling the PIM6d.
Also by default disable on all. Use --enable-pim6d flag to
enable it.
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
Mobashshera Rasool [Mon, 2 May 2022 09:28:13 +0000 (02:28 -0700)]
pim6d: Disable pim6d compilation by default
By default, disable pim6d compilation. If someone
wants to enable the compilation, should use ./configure option
with --enable-pim6d.
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
Christian Hopps [Thu, 7 Jul 2022 14:09:26 +0000 (10:09 -0400)]
Merge pull request #11552 from opensourcerouting/pkgfix
Package build fixes
David Lamparter [Thu, 7 Jul 2022 13:36:57 +0000 (15:36 +0200)]
Merge pull request #10715 from patrasar/pim_rpf_prefix_to_pimaddr
pim6d: modify pim_rpf from struct prefix to pim_addr
Sarita Patra [Thu, 7 Jul 2022 13:12:03 +0000 (06:12 -0700)]
pim6d: Fix description for "clear ipv6 mroute" cmd
Signed-off-by: Sarita Patra <saritap@vmware.com>
Sarita Patra [Thu, 7 Jul 2022 13:06:06 +0000 (06:06 -0700)]
pimd: Fix description for "clear ip mroute" cmd
Signed-off-by: Sarita Patra <saritap@vmware.com>
Martin Winter [Thu, 7 Jul 2022 10:10:54 +0000 (12:10 +0200)]
snapcraft: Version must be quoted in snap store
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Martin Winter [Thu, 7 Jul 2022 09:19:34 +0000 (11:19 +0200)]
debian: Fix version requirement for rtrlib to allow distro specific names
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
David Lamparter [Wed, 6 Jul 2022 09:27:53 +0000 (11:27 +0200)]
zebra: debug decode RTA_EXPIRES and RTA_MFC_STATS
Just adding two more attributes to decode and show nicely in netlink
msgdump debug output.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter [Wed, 6 Jul 2022 09:26:01 +0000 (11:26 +0200)]
zebra: fix remaining MR RTM_GETROUTE oddities
The IPv6 version needs rtm_src_len and rtm_dst_len filled in due to
strict validation. IPv4 also has this requirement, but zebra is running
in non-strict mode there so the kernel accepts it...
Also the table ID hack is IPv4 only.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Donatas Abraitis [Thu, 7 Jul 2022 06:49:21 +0000 (09:49 +0300)]
tools: Add missing bfdd to logrotate config
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Donatas Abraitis [Thu, 7 Jul 2022 07:11:45 +0000 (10:11 +0300)]
Merge pull request #11530 from ARShreenidhi/default_originate_testcase
tests : bgp default originate test cases
Donatas Abraitis [Thu, 7 Jul 2022 07:09:42 +0000 (10:09 +0300)]
Merge pull request #11548 from paulc39/check_hostname_in_resolver_resolve
lib: check hostname in resolver_resolve
kevinshen [Thu, 7 Jul 2022 04:10:03 +0000 (12:10 +0800)]
lib: check hostname in resolver_resolve
resolver_resolve should check hostname is null or not.
if ares_gethostbyname() get null hostname string, the hostname string will access a null pointer and crash.
Signed-off-by: kevinshen <kevinshen@inspur.com>
Donatas Abraitis [Wed, 6 Jul 2022 14:26:05 +0000 (17:26 +0300)]
bgpd: Free memory for BMP listeners when deleting BGP instance
When using `no router bgp` we MUST free the memory for the listeners too.
Replicate with:
```
router bgp 100
bmp targets server1
bmp listener 0.0.0.0 port 65535
no router bgp
router bgp 100
bmp targets server1
bmp listener 0.0.0.0 port 65535
no router bgp
router bgp 100
bmp targets server1
bmp listener 0.0.0.0 port 65535
no router bgp
```
Before:
```
Type : Current# Size Total Max# MaxBytes
BMP targets : 0 240 0 1 248
BMP targets name : 0 8 0 1 24
BMP listener : 12 152 1824 12 1824
BMP instance state : 0 88 0 1 88
```
After:
```
Type : Current# Size Total Max# MaxBytes
BMP targets : 0 240 0 1 248
BMP targets name : 0 8 0 1 24
BMP listener : 0 152 0 1 152
BMP instance state : 0 88 0 1 88
```
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
ARShreenidhi [Wed, 6 Jul 2022 05:57:13 +0000 (05:57 +0000)]
tests : Topotest support to bgp_default_originate
When there is change in route-map policy associated with default-originate, changes does not reflect.
When route-map associated with default-originate is deleted, default route doesn't get withdrawn
Update message is not being sent when only route-map is removed from the default-originate config.
SNT counter gets incremented on change of every policy associated with default-originate
Route-map with multiple match clauses causes inconsistencies with default-originate.
Default-originate behaviour on BGP-attributes
Signed-off-by: ARShreenidhi <rshreenidhi@vmware.com>
Iqra Siddiqui [Fri, 27 May 2022 15:07:36 +0000 (08:07 -0700)]
bgpd: Fix insonsistencies with default-originate route-map
Description:
- When there are multiple policies configured with
route-map then the first matching policy is not
getting applied on default route originated with
default-originate.
- In BGP we first run through the BGP RIB and then
pass it to the route-map to find if its permit or
deny. Due to this behaviour the first route in
BGP RIB that passes the route-map will be applied.
Fix:
- Passing extra parameter to routemap_apply so that
we can get the preference of the matching policy,
keep comparing it with the old preference and finally
consider the policy with less preference.
Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com>
Signed-off-by: Iqra Siddiqui <imujeebsiddi@vmware.com>
mobash-rasool [Wed, 6 Jul 2022 14:45:58 +0000 (20:15 +0530)]
Merge pull request #11542 from opensourcerouting/bfd-coverity
bfdd: fix coverity scan issues
Mark Stapp [Wed, 6 Jul 2022 13:52:05 +0000 (09:52 -0400)]
Merge pull request #11540 from opensourcerouting/typesafe-assume-explain
lib: use assume() for SA fixing, add explainer
Rafael Zalamena [Wed, 6 Jul 2022 10:52:17 +0000 (07:52 -0300)]
bfdd: fix coverity memory overrun
Use the destination for the operator `sizeof()` instead of the source
which could (and is) be bigger than destination.
We are not truncating any data here it just happens that the zebra
interface data structure hardware address can be bigger due to different
types of interface.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Rafael Zalamena [Wed, 6 Jul 2022 10:49:56 +0000 (07:49 -0300)]
bfdd: fix coverity scan resource leak
Close the descriptor if something fails and we don't return it.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
sarita patra [Mon, 23 May 2022 12:18:28 +0000 (05:18 -0700)]
pim6d: Pass pim_addr for pim_nht callbacks.
For pim callbacks, we pass pim_addr as value, not pointer.
So making it consistent for pim_nht callbacks.
Signed-off-by: sarita patra <saritap@vmware.com>
sarita patra [Wed, 27 Apr 2022 08:55:57 +0000 (01:55 -0700)]
pimd: Adjust rpf_addr in show commands
Signed-off-by: sarita patra <saritap@vmware.com>
David Lamparter [Wed, 6 Jul 2022 09:43:05 +0000 (11:43 +0200)]
Merge pull request #11521 from patrasar/pimv6_drpriority
pim6d: Fix [no] ipv6 pim drpriority command
sarita patra [Wed, 27 Apr 2022 08:31:31 +0000 (01:31 -0700)]
pimd: Handle rpf_addr in pim_ifchannel code
Signed-off-by: sarita patra <saritap@vmware.com>
sarita patra [Wed, 27 Apr 2022 08:31:06 +0000 (01:31 -0700)]
pimd: Handle rpf_addr in pim nht
Signed-off-by: sarita patra <saritap@vmware.com>
sarita patra [Wed, 27 Apr 2022 08:30:16 +0000 (01:30 -0700)]
pimd: Handle rpf_addr in register send/recv
Signed-off-by: sarita patra <saritap@vmware.com>
sarita patra [Wed, 27 Apr 2022 08:29:34 +0000 (01:29 -0700)]
pimd: Handle rpf_addr in join/prune processing
Signed-off-by: sarita patra <saritap@vmware.com>