]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agoMerge pull request #5327 from lkrishnamoor/rm_rd_filter
Donatas Abraitis [Sat, 16 Nov 2019 06:55:24 +0000 (08:55 +0200)]
Merge pull request #5327 from lkrishnamoor/rm_rd_filter

bgpd: route-map support for evpn RD filter

4 years agoMerge pull request #5312 from chiragshah6/evpn_dev2
Sri Mohana Singamsetty [Fri, 15 Nov 2019 23:39:53 +0000 (15:39 -0800)]
Merge pull request #5312 from chiragshah6/evpn_dev2

bgpd: fix memory leak in vni-vrf route tables for evpn routes

4 years agoMerge pull request #5335 from opensourcerouting/ldpd-buffer-overflow
Sri Mohana Singamsetty [Fri, 15 Nov 2019 23:37:33 +0000 (15:37 -0800)]
Merge pull request #5335 from opensourcerouting/ldpd-buffer-overflow

ldpd: add missing sanity check in the parsing of label messages

4 years agoMerge pull request #5303 from taspelund/special_interface_error
Rafael Zalamena [Fri, 15 Nov 2019 16:35:13 +0000 (13:35 -0300)]
Merge pull request #5303 from taspelund/special_interface_error

staticd: Make blackhole keyword errors more straightforward

4 years agoMerge pull request #5330 from dslicenc/tools-bfd-timers
Donatas Abraitis [Fri, 15 Nov 2019 13:12:18 +0000 (15:12 +0200)]
Merge pull request #5330 from dslicenc/tools-bfd-timers

tools: stop repeating lines to delete for multiple bfd timer changes

4 years agoMerge pull request #5320 from donaldsharp/pim_igmp_ignore_from_ourself
Donatas Abraitis [Fri, 15 Nov 2019 12:41:52 +0000 (14:41 +0200)]
Merge pull request #5320 from donaldsharp/pim_igmp_ignore_from_ourself

Pim igmp ignore from ourself

4 years agoMerge pull request #5351 from ton31337/fix/add_missing_whitespace
Donald Sharp [Fri, 15 Nov 2019 12:38:07 +0000 (07:38 -0500)]
Merge pull request #5351 from ton31337/fix/add_missing_whitespace

bgpd: Add missing whitespace in update_subgroup_remove_peer_internal()

4 years agoMerge pull request #5324 from lkrishnamoor/advertise-routes-bug
Donatas Abraitis [Fri, 15 Nov 2019 12:08:43 +0000 (14:08 +0200)]
Merge pull request #5324 from lkrishnamoor/advertise-routes-bug

bgpd: Bug fix in "show bgp l2vpn evpn ... advertised-routes'

4 years agobgpd: Add missing whitespace in update_subgroup_remove_peer_internal()
Donatas Abraitis [Fri, 15 Nov 2019 09:09:17 +0000 (11:09 +0200)]
bgpd: Add missing whitespace in update_subgroup_remove_peer_internal()

Before the fix:

2019/11/14 19:52:21 BGP: peer 192.168.2.5 deleted from subgroup s4peer
cnt 0 - missing space after s4 before peer

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agostaticd: Make blackhole keyword errors more straightforward
Trey Aspelund [Fri, 8 Nov 2019 21:51:36 +0000 (16:51 -0500)]
staticd: Make blackhole keyword errors more straightforward

Previous error was misleading and made it seem like Null0,
reject, or blackhole nexthops on static routes are invalid.
This commit makes it more clear as to why the error is seen.

Signed-off-by: Trey Aspelund <taspelund@cumulusnetworks.com>
4 years agoMerge pull request #5342 from satheeshkarra/ospf_dbgs
Sri Mohana Singamsetty [Thu, 14 Nov 2019 22:17:36 +0000 (14:17 -0800)]
Merge pull request #5342 from satheeshkarra/ospf_dbgs

ospfd: Adding Debugs to Track OSPF DD Exchange

4 years agobgpd: route-map support for evpn RD filter
Lakshman Krishnamoorthy [Wed, 13 Nov 2019 00:51:24 +0000 (16:51 -0800)]
bgpd: route-map support for evpn RD filter

With this code change, we can now filter evpn routes based on RD using the
match statement: "match evpn rd XX"

Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
4 years agoMerge pull request #5300 from ton31337/feature/add_a_test_case_for_sender-as-path...
Rafael Zalamena [Thu, 14 Nov 2019 19:14:11 +0000 (16:14 -0300)]
Merge pull request #5300 from ton31337/feature/add_a_test_case_for_sender-as-path-loop-detection

tests: Add a test case for `sender-as-path-loop-detection`

4 years agoMerge pull request #5345 from mjstapp/fix_bfd_packet_sa
Rafael Zalamena [Thu, 14 Nov 2019 19:10:38 +0000 (16:10 -0300)]
Merge pull request #5345 from mjstapp/fix_bfd_packet_sa

bfdd: remove unused initialization sa warning

4 years agoMerge pull request #5276 from donaldsharp/pim_double
Jafar Al-Gharaibeh [Thu, 14 Nov 2019 15:38:44 +0000 (09:38 -0600)]
Merge pull request #5276 from donaldsharp/pim_double

pimd: No need to add then remove the oif if not DR

4 years agobfdd: remove unused initialization sa warning
Mark Stapp [Thu, 14 Nov 2019 13:29:09 +0000 (08:29 -0500)]
bfdd: remove unused initialization sa warning

There's a variable initialization that's triggering an SA
warning - don't do that.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoospfd: Adding Debugs to dump OSPF DD Seqnumber
Satheesh Kumar K [Fri, 8 Nov 2019 06:00:33 +0000 (22:00 -0800)]
ospfd: Adding Debugs to dump OSPF DD Seqnumber

Recently Lot of issues are seen in  OSPF adjacnecy establishements,
sessions was tear down because of DD Sequence Number mismatch.

adding Debugs to capture Master & slave generated sequence numbers.

Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
4 years agoMerge pull request #5309 from donaldsharp/install_nhg_kernel
Sri Mohana Singamsetty [Thu, 14 Nov 2019 01:00:51 +0000 (17:00 -0800)]
Merge pull request #5309 from donaldsharp/install_nhg_kernel

zebra: Allow zebra to install nexthop groups into linux kernel

4 years agoldpd: add missing sanity check in the parsing of label messages
Renato Westphal [Thu, 14 Nov 2019 00:51:06 +0000 (21:51 -0300)]
ldpd: add missing sanity check in the parsing of label messages

Validate that the FEC prefix length is within the allowed limit
(depending on the FEC address family) in order to prevent possible
buffer overflows.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoMerge pull request #5321 from sworleys/Zebra-Dplane-Thread-Cancel-Async
Mark Stapp [Wed, 13 Nov 2019 21:46:36 +0000 (16:46 -0500)]
Merge pull request #5321 from sworleys/Zebra-Dplane-Thread-Cancel-Async

zebra: dplane cancel update thread from correct pthread

4 years agoMerge pull request #5315 from sworleys/SR-Zebra-NHG-Fixes
Mark Stapp [Wed, 13 Nov 2019 16:54:02 +0000 (11:54 -0500)]
Merge pull request #5315 from sworleys/SR-Zebra-NHG-Fixes

zebra: Some Zebra_NHG fixes found with the ISIS-SR topotests

4 years agotools: stop repeating lines to delete for multiple bfd timer changes
Don Slice [Mon, 11 Nov 2019 20:45:32 +0000 (15:45 -0500)]
tools: stop repeating lines to delete for multiple bfd timer changes

Problem reported with tracebacks seen when making multiple bfd timer
changes in frr.conf and applying via frr-reload.py.  Found that when
multiple bfd timer changes are made, the same line can be added for
deletion more than once, causing the traceback when the deletion is
performed.  This fix verifies the correct line is being appended for
deletion.

Ticket: CM-27233
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
4 years agotests: Add a test case for `sender-as-path-loop-detection`
Donatas Abraitis [Fri, 8 Nov 2019 14:18:12 +0000 (16:18 +0200)]
tests: Add a test case for `sender-as-path-loop-detection`

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Bug fix in "show bgp l2vpn evpn ... advertised-routes'
Lakshman Krishnamoorthy [Tue, 12 Nov 2019 22:02:05 +0000 (14:02 -0800)]
bgpd: Bug fix in "show bgp l2vpn evpn ... advertised-routes'

The bug:
As part of displaying advertised routes to a peer, in the outer loop, we
iterate through all prefixes in the evpn table. In the inner loop,
we iterate through adj_out of each prefix.

If a prefix which is present in the evpn table is not advertised to a peer,
its corresponding attr == NULL. Checking for this condition is the fix.

Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
4 years agozebra: dplane cancel update thread from correct pthread
Stephen Worley [Tue, 12 Nov 2019 19:56:56 +0000 (14:56 -0500)]
zebra: dplane cancel update thread from correct pthread

This code is called from the zebra main pthread during shutdown
but the thread event is scheduled via the zebra dplane pthread.

Hence, we should be using the `thread_cancel_async()` API to
cancel the thread event on a different pthread.

This is only ever hit in the rare case that we still have work left
to do on the update queue during shutdown.

Found via zebra crash:

```
(gdb) bt
\#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
\#1  0x00007f4e4d3f7535 in __GI_abort () at abort.c:79
\#2  0x00007f4e4d3f740f in __assert_fail_base (fmt=0x7f4e4d559ee0 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x7f4e4d9071d0 "master->owner == pthread_self()",
    file=0x7f4e4d906cf8 "lib/thread.c", line=1185, function=<optimized out>) at assert.c:92
\#3  0x00007f4e4d405102 in __GI___assert_fail (assertion=assertion@entry=0x7f4e4d9071d0 "master->owner == pthread_self()", file=file@entry=0x7f4e4d906cf8 "lib/thread.c",
    line=line@entry=1185, function=function@entry=0x7f4e4d906b68 <__PRETTY_FUNCTION__.15817> "thread_cancel") at assert.c:101
\#4  0x00007f4e4d8d095a in thread_cancel (thread=0x55b40d01a640) at lib/thread.c:1185
\#5  0x000055b40c291845 in zebra_dplane_shutdown () at zebra/zebra_dplane.c:3274
\#6  0x000055b40c27ee13 in zebra_finalize (dummy=<optimized out>) at zebra/main.c:202
\#7  0x00007f4e4d8d1416 in thread_call (thread=thread@entry=0x7ffcbbc08870) at lib/thread.c:1599
\#8  0x00007f4e4d8a1ef8 in frr_run (master=0x55b40ce35510) at lib/libfrr.c:1024
\#9  0x000055b40c270916 in main (argc=8, argv=0x7ffcbbc08c78) at zebra/main.c:483
(gdb) down
\#4  0x00007f4e4d8d095a in thread_cancel (thread=0x55b40d01a640) at lib/thread.c:1185
1185 assert(master->owner == pthread_self());
(gdb)
```

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agoMerge pull request #5307 from ton31337/fix/bgp_dampening_per_afi_safi
Donald Sharp [Tue, 12 Nov 2019 20:11:27 +0000 (15:11 -0500)]
Merge pull request #5307 from ton31337/fix/bgp_dampening_per_afi_safi

bgpd: Rework BGP dampening to be per AFI/SAFI

4 years agoMerge pull request #5209 from ton31337/feature/banner_motd_from_input
Renato Westphal [Tue, 12 Nov 2019 16:39:46 +0000 (13:39 -0300)]
Merge pull request #5209 from ton31337/feature/banner_motd_from_input

vtysh: Add an option to set banner motd from an input

4 years agoMerge pull request #5302 from qlyoung/static-stnradsjfsacasecmppnullLLL000
Renato Westphal [Tue, 12 Nov 2019 16:21:19 +0000 (13:21 -0300)]
Merge pull request #5302 from qlyoung/static-stnradsjfsacasecmppnullLLL000

staticd: exact match on magic interface names

4 years agoMerge pull request #5296 from qlyoung/vtysh-be-helpful-and-kind
Renato Westphal [Tue, 12 Nov 2019 16:07:45 +0000 (13:07 -0300)]
Merge pull request #5296 from qlyoung/vtysh-be-helpful-and-kind

vtysh: be helpful and kind to unprivileged users

4 years agoMerge pull request #5313 from mjstapp/fix_bsd_addr_of_packed
Donald Sharp [Tue, 12 Nov 2019 15:08:50 +0000 (10:08 -0500)]
Merge pull request #5313 from mjstapp/fix_bsd_addr_of_packed

ospfd,eigrpd: don't take address of packed struct member

4 years agodoc: Append documentation for `bgp dampening` command
Donatas Abraitis [Tue, 12 Nov 2019 11:23:24 +0000 (13:23 +0200)]
doc: Append documentation for `bgp dampening` command

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agopimd: Cleanup igmp debugs a tiny bit
Donald Sharp [Tue, 12 Nov 2019 14:15:57 +0000 (09:15 -0500)]
pimd: Cleanup igmp debugs a tiny bit

When receiving igmp packets we are spitting out a lot of
debugs.  Attempt to clean this up to allow us to understand
what is going on a bit better by just being able to look
at the log file.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agopimd: `debug igmp trace` turns on non igmp debugs
Donald Sharp [Tue, 12 Nov 2019 13:02:06 +0000 (08:02 -0500)]
pimd: `debug igmp trace` turns on non igmp debugs

When you turn on `debug igmp trace` we are seeing a bunch
of debugs associated with pim processing.  This is because we were
using PIM_DEBUG_TRACE which is both `debug igmp trace` and `debug pim trace`
when tracing igmp code it would be nice to only see igmp work.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agopimd: Ignore igmp queries from itself
Donald Sharp [Tue, 12 Nov 2019 01:29:06 +0000 (20:29 -0500)]
pimd: Ignore igmp queries from itself

We are seeing situations where PIM is sending a IGMP v3 query
and immediately receiving back up the pim kernel interface the
query from itself:

from `show int brief`:
swp7 up default 192.168.202.1/24

We are also receiving these debugs:
2019-11-11T20:52:40.452307+00:00 leaf02 pimd[1592]: Send IGMPv3 query to 224.4.0.8 on swp7 for group 224.4.0.8, sources=0 msg_size=12 s_flag=0 QRV=2 QQI=125 QQIC=7d
2019-11-11T20:52:40.452430+00:00 leaf02 pimd[1592]: pim_mroute_msg(default): igmp kernel upcall on swp7(0x55eaa7dc7dc0) for 192.168.202.1 -> 224.4.11.123
2019-11-11T20:52:40.452574+00:00 leaf02 pimd[1592]: Recv IP packet from 192.168.202.1 to 224.4.11.123 on swp7: size=40 ip_header_size=24 ip_proto=2
2019-11-11T20:52:40.452699+00:00 leaf02 pimd[1592]: Recv IGMP packet from 192.168.202.1 to 224.4.11.123 on swp7: ttl=1 msg_type=17 msg_size=16
2019-11-11T20:52:40.452824+00:00 leaf02 pimd[1592]: Recv IGMP query v3 from 192.168.202.1 on swp7 for group 224.4.11.123

This query is causing us to do some weird gyrations around the IGMP state machine for handling
queries.  Let's just prevent it from happening.

Ticket: CM-27247
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: zebra_nhg check each nexthop for active, not just number
Stephen Worley [Mon, 11 Nov 2019 23:32:13 +0000 (18:32 -0500)]
zebra: zebra_nhg check each nexthop for active, not just number

We were only checking that two nhg_hash_entry's were equal
based on the active nexthop NUMBER. This is not sufficient in
special cases where whats active with one route using it,
might not be active with the other. We can see this with
routes trying to resolve to themselves.

Ex)

1.1.1.0/24
-> 1.1.1.1 dummy1 (inactive)
-> 1.1.1.2 dummy2

1.1.2.0/24
-> 1.1.1.1 dummy1
-> 1.1.1.2 dummy1 (inactive)

Without checking each nexthop individually, they will
hash to the same group since they have the same number of
active nexthops.

Fix this by looping over every nexthop for each nhe (they should
be sorted) and checking if the NEXTHOP_FLAG_ACTIVE flag's match.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Don't clear nexthop fib flag on rib_install
Stephen Worley [Mon, 11 Nov 2019 23:28:29 +0000 (18:28 -0500)]
zebra: Don't clear nexthop fib flag on rib_install

We cannot clear the NEXTHOP_FLAG_FIB nexthop flag
when sending routes to the dataplane anymore since
nexthops are now shared.

We were seeing a situation where if we delete a route
using a nexthop group that is still active with another
route, the fib flag was being unset by this code
path despite them still being valid fib nexthops with the
other route.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: mpls_ftn_uninstall handle nhg hash label change
Stephen Worley [Mon, 11 Nov 2019 23:22:59 +0000 (18:22 -0500)]
zebra: mpls_ftn_uninstall handle nhg hash label change

We were crashing due to a missed label change code path
in mpls_ftn_uninstall() with the zebra_nhg hashing code.

Add a static handler function for label changing everywhere
in that code and use it in mpls_ftn_uninstall().

The crash was found in the ISIS-SR tests:

==23== Thread 1:
==23== Invalid read of size 4
==23==    at 0x15B20E: zebra_nhg_hash_equal (zebra_nhg.c:365)
==23==    by 0x489A2FD: hash_get (hash.c:143)
==23==    by 0x489A4BC: hash_lookup (hash.c:183)
==23==    by 0x15B5A3: zebra_nhg_find (zebra_nhg.c:494)
==23==    by 0x15C536: zebra_nhg_rib_find (zebra_nhg.c:1070)
==23==    by 0x1573E8: mpls_ftn_update (zebra_mpls.c:2661)
==23==    by 0x1A2554: zread_mpls_labels_replace (zapi_msg.c:1890)
==23==    by 0x1A41CD: zserv_handle_commands (zapi_msg.c:2613)
==23==    by 0x199B17: zserv_process_messages (zserv.c:517)
==23==    by 0x48EE6B7: thread_call (thread.c:1549)
==23==    by 0x48A8AD5: frr_run (libfrr.c:1064)
==23==    by 0x1391B7: main (main.c:468)
==23==  Address 0x5839330 is 0 bytes inside a block of size 80 free'd
==23==    at 0x48369AB: free (vg_replace_malloc.c:530)
==23==    by 0x48AEE6C: qfree (memory.c:129)
==23==    by 0x15C5F8: zebra_nhg_free (zebra_nhg.c:1095)
==23==    by 0x15BC8C: zebra_nhg_handle_uninstall (zebra_nhg.c:734)
==23==    by 0x15DCFA: zebra_nhg_uninstall_kernel (zebra_nhg.c:1826)
==23==    by 0x15C666: zebra_nhg_decrement_ref (zebra_nhg.c:1106)
==23==    by 0x15D9D7: zebra_nhg_re_update_ref (zebra_nhg.c:1711)
==23==    by 0x15D8B1: nexthop_active_update (zebra_nhg.c:1660)
==23==    by 0x167072: rib_process (zebra_rib.c:1154)
==23==    by 0x168D72: process_subq_route (zebra_rib.c:2039)
==23==    by 0x168E92: process_subq (zebra_rib.c:2078)
==23==    by 0x168F5B: meta_queue_process (zebra_rib.c:2112)
==23==  Block was alloc'd at
==23==    at 0x4837B65: calloc (vg_replace_malloc.c:752)
==23==    by 0x48AED56: qcalloc (memory.c:110)
==23==    by 0x15B07B: zebra_nhg_copy (zebra_nhg.c:307)
==23==    by 0x15B13E: zebra_nhg_hash_alloc (zebra_nhg.c:329)
==23==    by 0x489A339: hash_get (hash.c:148)
==23==    by 0x15B6CA: zebra_nhg_find (zebra_nhg.c:532)
==23==    by 0x15C536: zebra_nhg_rib_find (zebra_nhg.c:1070)
==23==    by 0x15D89A: nexthop_active_update (zebra_nhg.c:1658)
==23==    by 0x167072: rib_process (zebra_rib.c:1154)
==23==    by 0x168D72: process_subq_route (zebra_rib.c:2039)
==23==    by 0x168E92: process_subq (zebra_rib.c:2078)
==23==    by 0x168F5B: meta_queue_process (zebra_rib.c:2112)

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agoMerge pull request #5311 from chiragshah6/mdev
Sri Mohana Singamsetty [Tue, 12 Nov 2019 00:34:26 +0000 (16:34 -0800)]
Merge pull request #5311 from chiragshah6/mdev

bgpd: fix rd output in show commands for evpn routs

4 years agoMerge pull request #5310 from donaldsharp/ospf_use_after_free
Sri Mohana Singamsetty [Mon, 11 Nov 2019 21:29:28 +0000 (13:29 -0800)]
Merge pull request #5310 from donaldsharp/ospf_use_after_free

ospfd: Function order caused use after free.

4 years agoospfd,eigrpd: don't take address of packed struct member
Mark Stapp [Mon, 11 Nov 2019 17:22:38 +0000 (12:22 -0500)]
ospfd,eigrpd: don't take address of packed struct member

Use a local variable to avoid trying to take the address
of a packed struct member - an address from the ip header
in these cases.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #5259 from mjstapp/dplane_sample_plugin
Quentin Young [Mon, 11 Nov 2019 16:56:42 +0000 (11:56 -0500)]
Merge pull request #5259 from mjstapp/dplane_sample_plugin

zebra: Add a sample dataplane plugin module

4 years agobgpd: fix memory leak in vrf inst for evpn route
Chirag Shah [Thu, 7 Nov 2019 23:09:23 +0000 (15:09 -0800)]
bgpd: fix memory leak in vrf inst for evpn route

There is a memory leak of the bgp node (route node)
in bgp vrf rib table while processing evpn remote routes.

During the remote evpn route processing, a new route
is imported and created in per vrf bgp rib route table,
the refcount for the route node is incremented multiple
times.

Post evpn route creation, the bgp (route) node refcount needs
to be decremented.

Ticket:CM-26838,CM-27169
Reviewed By:CCR-9477
Testing Done:

Before fix:
----------
initial state:
TORC1#vtysh -c "show memory"
BGP node                      :      515    184
BGP route                     :      568    112

with 1 mac-ip route:
TORC1#vtysh -c "show memory"
BGP node                      :      524    184
BGP route                     :      583    112

withdraw 1 mac-ip route:
TORC1#vtysh -c "show memory"
BGP node                      :      520    184
BGP route                     :      568    112

After fix:
withdra 1 mac-ip route
TORC1#vtysh -c "show memory"
BGP node                      :      515    184
BGP route                     :      568    112

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agobgpd: fix memory leak in vni table for evpn routes
Chirag Shah [Wed, 6 Nov 2019 02:30:56 +0000 (18:30 -0800)]
bgpd: fix memory leak in vni table for evpn routes

There is a memory leak of the bgp node (route node)
in vni table while processing evpn remote route(s).

During the remote evpn route processing, a new route
is created in per vni route table, the refcount for
the route node is incremented twice. First refcount
is incremented during the node creation and the second
one when the bgp_info_add is added.

Post evpn route creation, the bgp node refcount needs
to be decremented.

Ticket:CM-26898,CM-26838,CM-27169
Reviewed By:CCR-9474
Testing Done:
In EVPN topology send 1K MAC routes then check the memory footprint
at the remote VTEP before sending 1K type-2 routes
and after flushing/withdrawal of the routes.

Before fix:
-----------
Initial memory footprint:
root@TOR1:~# vtysh -c "show memory" | grep "Hash Bucket \|BGP node \|BGP route"
Hash Bucket                   :       2008      32
BGP node                      :        182     152
BGP route                     :         96     112

With 1K MAC (type-2 routes)
root@TOR1:~# vtysh -c "show memory" | grep "Hash Bucket \|BGP node \|BGP route"
Hash Bucket                   :       6008      32
BGP node                      :       4182     152
BGP route                     :       2096     112

After cleaning up 1K MAC entries from source VTEP which triggers BGP withdraw
at the remote VTEP.
root@TOR1:~# vtysh -c "show memory" | grep "Hash Bucket \|BGP node \|BGP route"
Hash Bucket                   :       4008      32
BGP node                      :       2182     152   <-- Here 2K delta from initial count.
BGP route                     :         96     112

With fix:
---------

After 1K MAC entries cleaned up at the remote VTEP, the memory footprint
(BGP Node and Hash Bucket count) is equilibrium to start of the test.
root@TOR1:~# vtysh -c "show memory" | grep "Hash Bucket \|BGP node \|BGP route"
Hash Bucket                   :       2008      32
BGP node                      :        182     152
BGP route                     :         96     112

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agobgpd: fix json output for show cmd for evpn routes
Chirag Shah [Mon, 4 Nov 2019 19:15:02 +0000 (11:15 -0800)]
bgpd: fix json output for show cmd for evpn routes

Fix json output where show command displayed
"Route Distinguisher: " string in json output because
NULL json object passed to bgp_evpn_show_route_rd_header()

Testing Done:
Route Distinguisher: ip 27.0.0.11:3
Route Distinguisher: ip 27.0.0.11:4
Route Distinguisher: ip 27.0.0.16:3
Route Distinguisher: ip 27.0.0.16:5
Route Distinguisher: ip 27.0.0.16:9
{
  "27.0.0.11:3":{
    "rd":"27.0.0.11:3",
    "[2]:[0]:[48]:[00:02:00:00:00:02]":{
      "prefix":"[2]:[0]:[48]:[00:02:00:00:00:02]",
      "prefixLen":288,
 ...
}

Post fix:
{
  "27.0.0.11:3":{
    "rd":"27.0.0.11:3",
    "[2]:[0]:[48]:[00:02:00:00:00:02]":{
      "prefix":"[2]:[0]:[48]:[00:02:00:00:00:02]",
      "prefixLen":288,
  ...
}
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agobgpd: fix rd printing in show commands for evpn rts
Chirag Shah [Mon, 4 Nov 2019 19:15:02 +0000 (11:15 -0800)]
bgpd: fix rd printing in show commands for evpn rts

PR 5118 introduce additional (prepend) keywords
like 'ip' to Route Distinguisher output which
breaks existing evpn route show commands parsing.

Restore to original behavior.

Testing Done:

vtysh -c 'show bgp l2vpn evpn route'

Before fix:
Route Distinguisher: ip 27.0.0.15:44

Post fix:
Route Distinguisher: 27.0.0.15:44

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agoospfd: Function order caused use after free.
Donald Sharp [Mon, 11 Nov 2019 15:17:31 +0000 (10:17 -0500)]
ospfd: Function order caused use after free.

The opaque lsa that we are storing is stored on various
lists depending on it's type.  This removal from the
list was being done *after* the pointer was freed.  This
is not a good idea.  Since the use after free was just
removal from a linked list and the freeing function does
not do anything other than free data, than just switching the function
order should be sufficient.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Allow zebra to install nexthop groups into linux kernel
Donald Sharp [Mon, 11 Nov 2019 14:34:46 +0000 (09:34 -0500)]
zebra: Allow zebra to install nexthop groups into linux kernel

This reverts commit 7d5bb02b1adf4b0e11c6e27590e0b5b3ab841baa.

Allow zebra to actually maintain the nexthop group in the
linux kernel.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5299 from ton31337/fix/remove_dead_code
Donald Sharp [Mon, 11 Nov 2019 12:57:09 +0000 (07:57 -0500)]
Merge pull request #5299 from ton31337/fix/remove_dead_code

bgpd: Remove not used bgp_find_nexthop() function

4 years agoMerge pull request #5306 from ton31337/fix/replace_subcode_static_value_to_const_name
Donald Sharp [Mon, 11 Nov 2019 12:56:42 +0000 (07:56 -0500)]
Merge pull request #5306 from ton31337/fix/replace_subcode_static_value_to_const_name

bgpd: Use BGP_NOTIFY_SUBCODE_UNSPECIFIC value for bgp_notify_send() where 0

4 years agobgpd: Rework BGP dampening to be per AFI/SAFI
Donatas Abraitis [Sun, 10 Nov 2019 18:13:20 +0000 (20:13 +0200)]
bgpd: Rework BGP dampening to be per AFI/SAFI

Before we had:

!
router bgp 65031
 bgp dampening 1 2 3 4
!

exit2-debian-9(config)# router bgp 65031
exit2-debian-9(config-router)# address-family ipv4 multicast
exit2-debian-9(config-router-af)# bgp dampening 5 6 7 8
exit2-debian-9(config-router-af)# end
exit2-debian-9# show running-config

!
router bgp 65031
 bgp dampening 1 2 3 4
!

After fix:

!
router bgp 65031
 neighbor 192.168.1.2 remote-as 100
 !
 address-family ipv4 unicast
  bgp dampening 1 2 3 4
 exit-address-family
 !
 address-family ipv4 multicast
  bgp dampening 5 6 7 8
 exit-address-family
!

exit2-debian-9# show ip bgp ipv4 unicast dampening parameters
Half-life time: 1 min
Reuse penalty: 2
Suppress penalty: 3
Max suppress time: 4 min
Max suppress penalty: 32

exit2-debian-9# show ip bgp ipv4 multicast dampening parameters
Half-life time: 5 min
Reuse penalty: 6
Suppress penalty: 7
Max suppress time: 8 min
Max suppress penalty: 18

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Use BGP_NOTIFY_SUBCODE_UNSPECIFIC value for bgp_notify_send() where 0
Donatas Abraitis [Sun, 10 Nov 2019 15:54:37 +0000 (17:54 +0200)]
bgpd: Use BGP_NOTIFY_SUBCODE_UNSPECIFIC value for bgp_notify_send() where 0

Just a code cleanup to keep the code consistent.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #5298 from donaldsharp/bgp_prefix_rpki
Russ White [Fri, 8 Nov 2019 20:29:05 +0000 (15:29 -0500)]
Merge pull request #5298 from donaldsharp/bgp_prefix_rpki

bgpd: Fix missed prefix_free conversion in rpki code

4 years agostaticd: exact match on magic interface names
Quentin Young [Fri, 8 Nov 2019 19:32:11 +0000 (19:32 +0000)]
staticd: exact match on magic interface names

Don't do a substring match on magic interface names - do an exact match.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agobgpd: Remove not used bgp_find_nexthop() function
Donatas Abraitis [Fri, 8 Nov 2019 13:04:29 +0000 (15:04 +0200)]
bgpd: Remove not used bgp_find_nexthop() function

Seems like a dead code.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Fix missed prefix_free conversion in rpki code
Donald Sharp [Fri, 8 Nov 2019 12:51:57 +0000 (07:51 -0500)]
bgpd: Fix missed prefix_free conversion in rpki code

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agovtysh: be helpful and kind to unprivileged users
Quentin Young [Thu, 7 Nov 2019 22:59:13 +0000 (22:59 +0000)]
vtysh: be helpful and kind to unprivileged users

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #5278 from slankdev/slankdev-bgpd-fix-prefix-sid-fetch-error
Donald Sharp [Thu, 7 Nov 2019 15:36:47 +0000 (10:36 -0500)]
Merge pull request #5278 from slankdev/slankdev-bgpd-fix-prefix-sid-fetch-error

bgpd: skip unsupported PREFIX_SID sub-type

4 years agoMerge pull request #5283 from donaldsharp/bgp_vrf_stuff
Donatas Abraitis [Thu, 7 Nov 2019 15:21:48 +0000 (17:21 +0200)]
Merge pull request #5283 from donaldsharp/bgp_vrf_stuff

bgpd: Have Nexthop Tracking specify vrf we are in for debugs

4 years agobgpd: use bgp->name_pretty in debugs and add vrf to some output
Donald Sharp [Tue, 5 Nov 2019 12:35:36 +0000 (07:35 -0500)]
bgpd: use bgp->name_pretty in debugs and add vrf to some output

Recently had a case where I was attempting to debug a nexthop tracking
issue across multiple bgp vrf's and since the setup vrf's in it with
overlapping address ranges, it became real fun real fast to track
vrf data associated.  Add a bit of code to allow us to figure out
what vrf we are in when we print out debug messages.

Look through the rest of the code and find debugs where we are
not using bgp->name_pretty and switch it over.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5269 from sworleys/Zebra-VRF-Lookup-Not-Get
Russ White [Wed, 6 Nov 2019 19:10:59 +0000 (14:10 -0500)]
Merge pull request #5269 from sworleys/Zebra-VRF-Lookup-Not-Get

zebra: separate zebra_vrf_lookup_table_with_id()

4 years agoMerge pull request #5281 from bisdhdh/bgpv4-over-v6-1
Russ White [Wed, 6 Nov 2019 19:03:52 +0000 (14:03 -0500)]
Merge pull request #5281 from bisdhdh/bgpv4-over-v6-1

BGPD: Prevent IPv6-LL being fwd to IBGP peers not on same link.

4 years agoMerge pull request #5196 from kuldeepkash/testcases
Martin Winter [Wed, 6 Nov 2019 12:18:04 +0000 (07:18 -0500)]
Merge pull request #5196 from kuldeepkash/testcases

tests: Enhance bgp-path-attributes-topo1 test suite

4 years agoMerge pull request #5280 from qlyoung/doc-clean-topotest-json
Donatas Abraitis [Tue, 5 Nov 2019 18:15:37 +0000 (20:15 +0200)]
Merge pull request #5280 from qlyoung/doc-clean-topotest-json

doc: clean up && index topotest json docs

4 years agoMerge pull request #5253 from opensourcerouting/update-vpls-topotest
Donald Sharp [Tue, 5 Nov 2019 16:36:33 +0000 (11:36 -0500)]
Merge pull request #5253 from opensourcerouting/update-vpls-topotest

Fix the LDP VPLS topotest

4 years agoMerge pull request #5261 from donaldsharp/pointer_fun
Lou Berger [Tue, 5 Nov 2019 16:32:20 +0000 (11:32 -0500)]
Merge pull request #5261 from donaldsharp/pointer_fun

Convert some XXX_free lib functions to a double pointer

4 years agoBGPD: Prevent IPv6-LL being fwd to IBGP peers not on same link.
bisdhdh [Tue, 5 Nov 2019 05:29:58 +0000 (10:59 +0530)]
BGPD: Prevent IPv6-LL being fwd to IBGP peers not on same link.

Prevent IPv6 Link-local address being forward to IBGP peer,
which are not directly connected.

R1----IPV6-unnumbered-EBGP-------R2-----IPV6-IBGP-----R3

Configure route-map to set preferred global address on and apply
route-map-IN on R2 for R1-R2 session. Now check on R3's BGP and
RIB table has route nexthop as R1 link-local address, which is
not correct.

As of now we clear link-local address info from mp_nexthop_global,
only if mp_nexthop_global is populated with link-local address.

We should do it even if route-map is configured boz forwarding
link-local address from one link scope to another is violation of
the standards.

Signed-off-by: Biswajit Sadhu sadhub@vmware.com
4 years agobgpd: skip unsupported PREFIX_SID sub-type
Hiroki Shirokura [Mon, 4 Nov 2019 17:33:50 +0000 (17:33 +0000)]
bgpd: skip unsupported PREFIX_SID sub-type

This commit make bgpd to skip and ignore unsupported
sub-type of PREFIX_SID. (especially new defined sub-type)
Current bgpd can't parase unsupported sub-type of PREFIX_SID.
PREFIX_SID is drafted on draft-ietf-idr-bgp-prefix-sid-27.
There are already new sub-type drafted on
draft-dawra-idr-srv6-vpn-05. (Type5,6 is new defined.)
This commit fix the problem reported as #5277 on GitBub.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
4 years agodoc: clean up && index topotest json docs
Quentin Young [Mon, 4 Nov 2019 18:51:31 +0000 (18:51 +0000)]
doc: clean up && index topotest json docs

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #5275 from opensourcerouting/emacs-conf
Jafar Al-Gharaibeh [Mon, 4 Nov 2019 17:01:25 +0000 (11:01 -0600)]
Merge pull request #5275 from opensourcerouting/emacs-conf

tools: fix emacs configuration file

4 years agotopotest: update the LDP VPLS test
Renato Westphal [Wed, 30 Oct 2019 22:28:56 +0000 (19:28 -0300)]
topotest: update the LDP VPLS test

The final test case of this topotest wasn't really testing
anything. Do the following changes to fix this:
* Remove "no link-detect" from the zebra configs so that link down
  failures are detected immediately;
* After shutting down the interface between r1 and r2, wait five
  seconds before testing if the pseudowires reconverged through
  the r3 router.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agotopotest: enable MPLS processing on all interfaces by default
Renato Westphal [Wed, 30 Oct 2019 22:23:41 +0000 (19:23 -0300)]
topotest: enable MPLS processing on all interfaces by default

This is necessary to make some tests work correctly. Only topologies
created using the topogen framework benefit from this change.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agopimd: No need to add then remove the oif if not DR
Donald Sharp [Mon, 4 Nov 2019 15:55:52 +0000 (10:55 -0500)]
pimd: No need to add then remove the oif if not DR

When adding an OIF to the OIL, if we are not the DR
there is no need to install it then remove it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5265 from Jafaral/deb-changes
Donatas Abraitis [Mon, 4 Nov 2019 15:06:40 +0000 (17:06 +0200)]
Merge pull request #5265 from Jafaral/deb-changes

tools: generate .changes file required for deb pkg upload

4 years agotools: fix emacs configuration file
Rafael Zalamena [Mon, 4 Nov 2019 13:56:42 +0000 (10:56 -0300)]
tools: fix emacs configuration file

It was missing a set of parentheses and a dot before
`indent-tabs-mode'.

More information here:
https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html#Directory-Variables

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #5272 from vincentbernat/fix/debian-copyright
Donald Sharp [Sun, 3 Nov 2019 20:05:22 +0000 (15:05 -0500)]
Merge pull request #5272 from vincentbernat/fix/debian-copyright

debian: update debian/copyright

4 years agodebian: update debian/copyright
Vincent Bernat [Sun, 3 Nov 2019 17:32:07 +0000 (18:32 +0100)]
debian: update debian/copyright

Some authors are added in the "GPL-2+" section, notably Alexandre
Cassen for the code in `vrrpd/`, and Cumulus Networks and Open Source
Routing which were uncredited despite many occurrence in the headers.

Signed-off-by: Vincent Bernat <vincent@bernat.ch>
4 years agolib, ospfd, zebra: Convert interface_delete to take double pointer
Donald Sharp [Wed, 30 Oct 2019 00:24:10 +0000 (20:24 -0400)]
lib, ospfd, zebra: Convert interface_delete to take double pointer

When free'ing the interface pointer, set it to NULL.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years ago*: Convert connected_free to a double pointer
Donald Sharp [Wed, 30 Oct 2019 00:16:28 +0000 (20:16 -0400)]
*: Convert connected_free to a double pointer

Set the connected pointer to set the pointer to NULL.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years ago*: Convert prefix_free to double pointer
Donald Sharp [Wed, 30 Oct 2019 00:05:27 +0000 (20:05 -0400)]
*: Convert prefix_free to double pointer

Have the prefix_free code take a double pointer to free the data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: separate zebra_vrf_lookup_table_with_id()
Stephen Worley [Fri, 1 Nov 2019 19:52:47 +0000 (15:52 -0400)]
zebra: separate zebra_vrf_lookup_table_with_id()

We were creating `other` tables in rib_del(), vty commands, and
dataplane return callback via the zebra_vrf_table_with_table_id()
API.

Seperate the API into only a lookup, never create
and added another with `get` in the name (following the standard
we use in other table APIs).

Then changed the rib_del(), rib_find_rn_from_ctx(), and show route
summary vty command to use the lookup API instead.

This was found via a crash where two different vrfs though they owned
the table. On delete, one free'd all the nodes, and then the other tried
to use them. It required specific timing of a VRF existing, going away,
and coming back again to cause the crash.

=23464== Invalid read of size 8
==23464==    at 0x179EA4: rib_dest_from_rnode (rib.h:433)
==23464==    by 0x17ACB1: zebra_vrf_delete (zebra_vrf.c:253)
==23464==    by 0x48F3D45: vrf_delete (vrf.c:243)
==23464==    by 0x48F4468: vrf_terminate (vrf.c:532)
==23464==    by 0x13D8C5: sigint (main.c:172)
==23464==    by 0x48DD25C: quagga_sigevent_process (sigevent.c:105)
==23464==    by 0x48F0502: thread_fetch (thread.c:1417)
==23464==    by 0x48AC82B: frr_run (libfrr.c:1023)
==23464==    by 0x13DD02: main (main.c:483)
==23464==  Address 0x5152788 is 104 bytes inside a block of size 112 free'd
==23464==    at 0x48369AB: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==23464==    by 0x48B25B8: qfree (memory.c:129)
==23464==    by 0x48EA335: route_node_destroy (table.c:500)
==23464==    by 0x48E967F: route_node_free (table.c:90)
==23464==    by 0x48E9742: route_table_free (table.c:124)
==23464==    by 0x48E9599: route_table_finish (table.c:60)
==23464==    by 0x170CEA: zebra_router_free_table (zebra_router.c:165)
==23464==    by 0x170DB4: zebra_router_release_table (zebra_router.c:188)
==23464==    by 0x17AAD2: zebra_vrf_disable (zebra_vrf.c:222)
==23464==    by 0x48F3F0C: vrf_disable (vrf.c:313)
==23464==    by 0x48F3CCF: vrf_delete (vrf.c:223)
==23464==    by 0x48F4468: vrf_terminate (vrf.c:532)
==23464==  Block was alloc'd at
==23464==    at 0x4837B65: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==23464==    by 0x48B24A2: qcalloc (memory.c:110)
==23464==    by 0x48EA2FE: route_node_create (table.c:488)
==23464==    by 0x48E95C7: route_node_new (table.c:66)
==23464==    by 0x48E95E5: route_node_set (table.c:75)
==23464==    by 0x48E9EA9: route_node_get (table.c:326)
==23464==    by 0x48E1EDB: srcdest_rnode_get (srcdest_table.c:244)
==23464==    by 0x16EA4B: rib_add_multipath (zebra_rib.c:2730)
==23464==    by 0x1A5310: zread_route_add (zapi_msg.c:1592)
==23464==    by 0x1A7B8E: zserv_handle_commands (zapi_msg.c:2579)
==23464==    by 0x19D689: zserv_process_messages (zserv.c:523)
==23464==    by 0x48F09F8: thread_call (thread.c:1599)

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agotools: generate .changes file required for deb pkg upload
Jafar Al-Gharaibeh [Fri, 1 Nov 2019 16:23:25 +0000 (11:23 -0500)]
tools: generate .changes file required for deb pkg upload

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
4 years agoMerge pull request #5263 from donaldsharp/pim_excessive_warnings
Mark Stapp [Fri, 1 Nov 2019 16:13:00 +0000 (12:13 -0400)]
Merge pull request #5263 from donaldsharp/pim_excessive_warnings

pimd: Do not spew a million warnings

4 years agoMerge pull request #5258 from dslicenc/ospf-bfd
Rafael Zalamena [Fri, 1 Nov 2019 14:22:56 +0000 (11:22 -0300)]
Merge pull request #5258 from dslicenc/ospf-bfd

ospf: BFD down not tearing down OSPF adjacency for point-to-point net…

4 years agopimd: Do not spew a million warnings
Donald Sharp [Fri, 1 Nov 2019 14:10:10 +0000 (10:10 -0400)]
pimd: Do not spew a million warnings

We have a zlog_warn that is unguarded ( and really is a debug message )
as that there is nothing the end user can do and nothing to note
here other than a debug message to track refcounts.  Change
to an appropriate debug and zlog_debug it instead.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5168 from donaldsharp/dev_workflow
Martin Winter [Fri, 1 Nov 2019 14:09:00 +0000 (10:09 -0400)]
Merge pull request #5168 from donaldsharp/dev_workflow

doc: Update documentation to talk about development branches

4 years agodoc: Update documentation to talk about development branches
Donald Sharp [Wed, 16 Oct 2019 15:24:21 +0000 (11:24 -0400)]
doc: Update documentation to talk about development branches

As per weekly meeting this is an attempt to document about
how we as a community will work together on development
branches.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Add a sample dataplane plugin module
Mark Stapp [Thu, 31 Oct 2019 18:41:13 +0000 (14:41 -0400)]
zebra: Add a sample dataplane plugin module

Add a dataplane plugin module as a sample or reference for
folks who might like to integrate with the zebra dataplane
subsystem. This isn't part of the FRR build or product; there
are some simple build and load-at-runtime instructions in
comments in the file.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agodoc: Add `banner motd <file|line>` sections
Donatas Abraitis [Mon, 28 Oct 2019 14:14:24 +0000 (16:14 +0200)]
doc: Add `banner motd <file|line>` sections

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agovtysh: Add an option to set banner motd from an input
Donatas Abraitis [Tue, 22 Oct 2019 15:06:03 +0000 (18:06 +0300)]
vtysh: Add an option to set banner motd from an input

This allows to set motd from an input instead of creating a file.

Example:

root@exit2-debian-9:~/frr# telnet 127.0.0.1 2605
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Hello, this is bgpd
User Access Verification

Password:
exit2-debian-9> enable
exit2-debian-9# sh run

Current configuration:
!
frr version 7.3-dev-MyOwnFRRVersion
frr defaults traditional
!
hostname exit2-debian-9
password belekas
log file /var/log/frr/labas.log
log syslog informational
banner motd line Hello, this is bgpd
!
!
!
line vty
!
end
exit2-debian-9#

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoospf: BFD down not tearing down OSPF adjacency for point-to-point network
Radhika Mahankali [Mon, 9 Apr 2018 22:30:32 +0000 (15:30 -0700)]
ospf: BFD down not tearing down OSPF adjacency for point-to-point network

Root Cause:
Lookup for the point-to-point neighbor was failing because the neighbor
lookup was based on neighbor interface IP address. But, for point-to-point
neighbor the key is router-id for lookup. Lookup failure was causing the
BFD updates from PTM to get dropped.

Fix:
Added walk of the neighbor list if the network type is point-to-point to
find the appropriate neighbor. The match is based on source IP address of
the neighbor since that’s the address registered with BFD for monitoring.

Ticket: CM-20411
Signed-off-by: Radhika Mahankali <radhika@cumulusnetworks.com>
4 years agoMerge pull request #5248 from opensourcerouting/bgp-sender-as-path-loop-detection
Donatas Abraitis [Thu, 31 Oct 2019 06:36:33 +0000 (08:36 +0200)]
Merge pull request #5248 from opensourcerouting/bgp-sender-as-path-loop-detection

bgpd: sender side AS path loop detection

4 years agoMerge pull request #5237 from ton31337/fix/doc_bgp_redistribute_vpn
Renato Westphal [Wed, 30 Oct 2019 23:47:04 +0000 (20:47 -0300)]
Merge pull request #5237 from ton31337/fix/doc_bgp_redistribute_vpn

doc: Add redistribute vnc-direct command and fix typo in redistribute vnc

4 years agoMerge pull request #5251 from qlyoung/vrrp-startup-logs-more
Mark Stapp [Wed, 30 Oct 2019 18:00:33 +0000 (14:00 -0400)]
Merge pull request #5251 from qlyoung/vrrp-startup-logs-more

vrrpd: some more error logging fixes

4 years agoMerge pull request #5186 from opensourcerouting/nb-cbs-reorg
Quentin Young [Wed, 30 Oct 2019 17:59:13 +0000 (13:59 -0400)]
Merge pull request #5186 from opensourcerouting/nb-cbs-reorg

northbound callbacks reorganization

4 years agotools: update the northbound callbacks generator
Renato Westphal [Thu, 17 Oct 2019 20:26:02 +0000 (17:26 -0300)]
tools: update the northbound callbacks generator

Add a new '-s' option which controls whether the generated northbound
callbacks are declared with the 'static' specifier or not. If not
(the default), a prototype is generated for each callback before
their declarations.

It's suggested that daemons shouldn't use the '-s' option so that
their northbound callbacks can be implemented in different files
according to their class (config, state, rpc or notification).

libfrr commands, on the other hand, can use the '-s' option when
their associated YANG module is too small and putting all callbacks
in the same file is desirable.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agobfdd: split northbound callbacks into multiple files
Renato Westphal [Thu, 17 Oct 2019 20:11:17 +0000 (17:11 -0300)]
bfdd: split northbound callbacks into multiple files

Rearrange the bfdd northbound callbacks as following:
* bfd_nb.h: prototypes of all northbound callbacks.
* bfd_nb.c: definition of all northbound callbacks and their
  associated YANG data paths.
* bfd_nb_config.c: implementation of YANG configuration nodes.
* bfd_nb_state.c: implementation of YANG state nodes.

This should help to keep to code more organized and easier to
maintain.

No behavior changes intended.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agodoc: bgp sender side as path loop detection
Rafael Zalamena [Tue, 29 Oct 2019 19:39:40 +0000 (16:39 -0300)]
doc: bgp sender side as path loop detection

Document the new command that does sender side AS path loop detection
and filtering.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #5249 from donaldsharp/pim_duplicate
Donatas Abraitis [Wed, 30 Oct 2019 10:59:45 +0000 (12:59 +0200)]
Merge pull request #5249 from donaldsharp/pim_duplicate

pimd: Duplicate config is not a CMD_WARNING_CONFIG_FAILED

4 years agoMerge pull request #5246 from sworleys/README-Frr-Chicken
Donatas Abraitis [Wed, 30 Oct 2019 07:08:04 +0000 (09:08 +0200)]
Merge pull request #5246 from sworleys/README-Frr-Chicken

Add FRR Icon to README

4 years agovrrpd: some more error logging fixes
Quentin Young [Tue, 29 Oct 2019 18:47:04 +0000 (18:47 +0000)]
vrrpd: some more error logging fixes

- Give the correct log message when refusing to start because the vr is
  already started
- Fix a couple other : whynot; cases missed

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>