]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
22 months agoMerge pull request #11597 from opensourcerouting/pimd-packed-member
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

22 months agoMerge pull request #11576 from anlancs/fix/minor-5
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

22 months agozebra: 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>
22 months agoMerge pull request #11566 from louis-6wind/rename-mplsvpn
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

22 months agoMerge pull request #11572 from opensourcerouting/fix/avoid_double_quotes_when_cat
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

22 months agoMerge pull request #11461 from mobash-rasool/pimv6-enable
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

22 months agoMerge pull request #11285 from iqras23/conditional_def_orig
David Lamparter [Tue, 12 Jul 2022 15:41:09 +0000 (17:41 +0200)]
Merge pull request #11285 from iqras23/conditional_def_orig

22 months agoMerge pull request #11577 from opensourcerouting/fix/memory_leak_bgp_gr_notification
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

22 months agoMerge pull request #11580 from patrasar/remove_pim_addr.h
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

22 months agopimd: fix unaligned accesses
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>
22 months agoMerge pull request #11588 from opensourcerouting/fix/babeld_missing_routes
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

22 months agobabeld: 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>
22 months agoMerge pull request #11583 from mobash-rasool/fixes
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

22 months agobgpd: fix wrong nexthop bgp struct for nexthop validation
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>
22 months agobgpd: rename "struct bgp" variables in mplsvpn
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>
22 months agobgpd: remove duplicated arg in leak_update
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>
22 months agopimd: removal double inclusion of pim_addr.h
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>
22 months agotools: Do not wrap the pidfile into double-quotes for frrcommon.sh
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>
22 months agobgpd: Free ->raw_data from Hard Notification message after we use it
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>
22 months agopimd: Correct the order of show json for interface traffic
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>
22 months agoMerge pull request #11579 from opensourcerouting/fix/revert_isis_fast_reroute
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

22 months agoRevert "isisd: apply fast-reroute on an adjacency failure"
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.

22 months agoRevert "isisd: remove previous labels before fast-reroute"
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.

22 months agoRevert "isisd: allow nexthop lookup on interface only"
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.

22 months agoRevert "isisd: apply fast-reroute when an interface falls down"
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.

22 months agoRevert "isisd: avoid fast-reroute on down adjacency when the interface is down"
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.

22 months agoRevert "isisd: avoid fast-reroute from running twice on a down interface event"
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.

22 months agoRevert "topotests: isis-tilfa add a switchover test after linkdown"
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.

22 months agoRevert "topotests: isis-tilfa add a switchover test after BFD down"
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.

22 months agoRevert "isisd: fix metric calculation of classic lfa backup prefixes"
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.

22 months agoRevert "isisd: fix SPF scheduling on IPv6 only topology"
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.

22 months agoRevert "topotests: isis-lfa add a switchover test after linkdown"
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.

22 months agoRevert "topotests: isis-lfa add a switchover test after hello timeout"
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.

22 months agoRevert "topotests: isis-lfa add a switchover test after neighbor clear"
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.

22 months agoRevert "topotests: isis-lfa add a switchover test after BFD down"
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.

22 months agoMerge pull request #11570 from opensourcerouting/pim6-bsr-clear
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`

22 months agoMerge pull request #11569 from opensourcerouting/gcc-plugin-shortcomings-220708
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

22 months agoMerge pull request #11568 from anlancs/fix/minor-4
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

22 months agoMerge pull request #10962 from louis-6wind/lfa-netlink
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

22 months agopim6d: add `clear ipv6 pim bsr-data`
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>
22 months agobgpd: work around GCC/plugin shortcomings
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>
22 months agobgpd: show prefix in leak_update_nexthop_valid debug
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>
22 months agobgpd: fix setting BGP_PATH_VALID flag in leak_update
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>
22 months agobgpd: factorize nexthop validation code in leak_update function
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>
22 months agoMerge pull request #10592 from patrasar/master_pimv6_bsm
David Lamparter [Fri, 8 Jul 2022 08:46:35 +0000 (10:46 +0200)]
Merge pull request #10592 from patrasar/master_pimv6_bsm

22 months agoMerge pull request #11553 from patrasar/clear_ip_mroute
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

22 months agobgpd: fix missing rmac value in debug
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>
22 months agopim6d: removed pim6_stubs.c file
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>
22 months agopim6d: Adjust pim_show_bsm_db for IPV6
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>
22 months agopim6d: IPV6 adjust in hash_calc_on_grp_rp
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>
22 months agoRevert "pim6d: IPv6-adjust BSM code"
sarita patra [Wed, 27 Apr 2022 10:43:55 +0000 (03:43 -0700)]
Revert "pim6d: IPv6-adjust BSM code"

This reverts commit 809c11a9d87e0d12a5c3d3ca6906bc398a58de6c.

22 months agopim6d: remove unused variable neigh_src_str
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>
22 months agopim6d: running pim_bsm.c for pimv6
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>
22 months agopim6d: add pimv6 support for bsmmsg_grpinfo
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>
22 months agopim6d: add pimv6 support for bsmmsg_rpinfo
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>
22 months agopim6d: add pimv6 support for bsm_hdr
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>
22 months agopim6d: Add pim_addr rp_addr in bsm_rpinfo
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>
22 months agoMerge pull request #11541 from opensourcerouting/zebra-mr-netlink
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

22 months agoMerge pull request #11545 from opensourcerouting/fix/memory_leak_for_bmp_listener
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

22 months agoMerge pull request #11549 from opensourcerouting/fix/logrotate
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

22 months agopim6d: bsr nht handling for IPV6
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>
22 months agopim6d: modify in_addr current_bsr to pim_addr current_bsr
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>
22 months agodebian: Add pkg.frr.pim6d build profile
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>
22 months agoredhat: Always disable PIM6d on CentOS 6 and RedHat 6 systems
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>
22 months agopim6d: Disable pim6d compilation by default
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>
22 months agoMerge pull request #11552 from opensourcerouting/pkgfix
Christian Hopps [Thu, 7 Jul 2022 14:09:26 +0000 (10:09 -0400)]
Merge pull request #11552 from opensourcerouting/pkgfix

Package build fixes

22 months agoMerge pull request #10715 from patrasar/pim_rpf_prefix_to_pimaddr
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

22 months agopim6d: Fix description for "clear ipv6 mroute" cmd
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>
22 months agopimd: Fix description for "clear ip mroute" cmd
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>
22 months agosnapcraft: Version must be quoted in snap store
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>
22 months agodebian: Fix version requirement for rtrlib to allow distro specific names
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>
22 months agozebra: debug decode RTA_EXPIRES and RTA_MFC_STATS
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>
22 months agozebra: fix remaining MR RTM_GETROUTE oddities
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>
22 months agotools: Add missing bfdd to logrotate config
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>
22 months agoMerge pull request #11530 from ARShreenidhi/default_originate_testcase
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

22 months agoMerge pull request #11548 from paulc39/check_hostname_in_resolver_resolve
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

22 months agolib: 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>
22 months agobgpd: Free memory for BMP listeners when deleting BGP instance
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>
22 months agotests : Topotest support to bgp_default_originate
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>
22 months agobgpd: Fix insonsistencies with default-originate route-map
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>
22 months agoMerge pull request #11542 from opensourcerouting/bfd-coverity
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

22 months agoMerge pull request #11540 from opensourcerouting/typesafe-assume-explain
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

22 months agobfdd: fix coverity memory overrun
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>
22 months agobfdd: fix coverity scan resource leak
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>
22 months agopim6d: Pass pim_addr for pim_nht callbacks.
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>
22 months agopimd: Adjust rpf_addr in show commands
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>
22 months agoMerge pull request #11521 from patrasar/pimv6_drpriority
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

22 months agopimd: Handle rpf_addr in pim_ifchannel code
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>
22 months agopimd: Handle rpf_addr in pim nht
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>
22 months agopimd: Handle rpf_addr in register send/recv
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>
22 months agopimd: Handle rpf_addr in join/prune processing
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>
22 months agopim6d: Handle rpf_addr in pim_msg_build_jp_groups()
sarita patra [Wed, 27 Apr 2022 08:29:11 +0000 (01:29 -0700)]
pim6d: Handle rpf_addr in pim_msg_build_jp_groups()

Signed-off-by: sarita patra <saritap@vmware.com>
22 months agopim6d: Handle rpf_addr in on_neighbor_jp_timer()
sarita patra [Wed, 27 Apr 2022 08:28:33 +0000 (01:28 -0700)]
pim6d: Handle rpf_addr in on_neighbor_jp_timer()

Signed-off-by: sarita patra <saritap@vmware.com>
22 months agopim6d: Handle rpf_addr in pim_if_addr_add()
sarita patra [Wed, 27 Apr 2022 08:26:54 +0000 (01:26 -0700)]
pim6d: Handle rpf_addr in pim_if_addr_add()

Signed-off-by: sarita patra <saritap@vmware.com>
22 months agopim6d: Adjust rpf_addr in pim_tib code
sarita patra [Wed, 27 Apr 2022 08:24:42 +0000 (01:24 -0700)]
pim6d: Adjust rpf_addr in pim_tib code

In this PR, we are handling the pim_tib code
after rpf_addr modified from prefix to pim_addr.

Signed-off-by: sarita patra <saritap@vmware.com>
22 months agopim6d: Adjust rpf_addr in pim_vxlan_orig_mr_up_add
sarita patra [Wed, 27 Apr 2022 08:23:31 +0000 (01:23 -0700)]
pim6d: Adjust rpf_addr in pim_vxlan_orig_mr_up_add

In this PR, we are handling the pim_vxlan_orig_mr_up_add()
after rpf_addr modified from prefix to pim_addr.

Signed-off-by: sarita patra <saritap@vmware.com>
22 months agopim6d: Adjust rpf_addr in pim_zebra
sarita patra [Wed, 27 Apr 2022 08:22:21 +0000 (01:22 -0700)]
pim6d: Adjust rpf_addr in pim_zebra

In this PR, we are handling the pim_zebra code
after rpf_addr modified from prefix to pim_addr.

Signed-off-by: sarita patra <saritap@vmware.com>
22 months agopim6d: Adjust rpf_addr in pim_upstream
sarita patra [Wed, 27 Apr 2022 08:21:23 +0000 (01:21 -0700)]
pim6d: Adjust rpf_addr in pim_upstream

In this PR, we are handling the pim_upstream
after rpf_addr modified from prefix to pim_addr.

Signed-off-by: sarita patra <saritap@vmware.com>
22 months agopim6d: Adjust rpf_addr in rp_info
sarita patra [Wed, 27 Apr 2022 08:20:38 +0000 (01:20 -0700)]
pim6d: Adjust rpf_addr in rp_info

In this PR, we are handling the rp_info
after rpf_addr modified from prefix
to pim_addr.

Signed-off-by: sarita patra <saritap@vmware.com>
22 months agopim6d: Adjust rpf_addr rpf code
sarita patra [Wed, 27 Apr 2022 08:19:33 +0000 (01:19 -0700)]
pim6d: Adjust rpf_addr rpf code

In this PR, we are handling the pim_rpf code
after rpf_addr modified from prefix
to pim_addr.

Signed-off-by: sarita patra <saritap@vmware.com>