| Age | Commit message (Collapse) | Author | 
 | 
Add a new debugging command:
  debug bgp aggregate [prefix <A.B.C.D/M|X:X::X:X/M>]
Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
 | 
 | 
8 bits are sufficient to store the number of labels because the current
maximum is 2.
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
 | 
 | 
bgpd: Put BGP_DEBUG/CONF_BGP_DEBUG under ulikely() optimization
 | 
 | 
The debug command was removed in 17e9298e47 ("bgpd: Remove 'debug bgp
allow-martian'")
Cleanup all references to the debug command.
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
 | 
 | 
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
 | 
 | 
when a plugin is attached, some debugs may be attached to that plugin.
For that, add one hook that is interacting with vty: a boolean indicates
what the usage is for: either for impacting the 'show running-config',
or for impacting the 'show debugging' command.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
 | 
 | 
bgpd: Change printing format show debugging for debug bgp updates
 | 
 | 
Not used anywhere.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
 | 
 | 
When filtering with `debug bgp updates in x.x.x.x prefix-list plist`, we want
to filter out unnecessary messages like:
```
127.0.0.1(Unknown) rcvd UPDATE wlen 0 attrlen 20 alen 5
```
Such a line as above will be repeated for all the paths received and it's useless
without knowing the prefix (because NLRIs are not parsed yet).
But want to see only relevant ones:
```
127.0.0.1(Unknown) rcvd UPDATE w/ attr: nexthop 127.0.0.1, origin i, path 65002
127.0.0.1(Unknown) rcvd 10.255.255.1/32 IPv4 unicast
```
With `debug bgp updates detail` we can combine this to something like:
```
127.0.0.1(Unknown) rcvd UPDATE w/ attr: nexthop 127.0.0.1, origin i, path 65002
127.0.0.1(Unknown) rcvd UPDATE wlen 0 attrlen 20 alen 5
127.0.0.1(Unknown) rcvd 10.255.255.1/32 IPv4 unicast
```
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
 | 
 | 
Pass prefix-list pointers at configuration time.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
 | 
 | 
Before this patch we didn't have an option to filter debug UPDATE messages
by specifying an arbitrary prefix, prefix-list or so. We had/have only an option
to specify:
```
* debug bgp updates in 10.0.0.1
* debug bgp updates prefix 10.0.1.0/24
```
Now adding:
```
* debug bgp updates <in|out> 10.0.0.1 prefix-list plist
```
CLI output:
```
r2# show debugging
MGMT debugging status:
Zebra debugging status:
BGP debugging status:
  BGP updates debugging is on (inbound) for 192.168.2.6 with prefix-list debug
Staticd debugging status
r2# show running-config | include prefix-list debug
debug bgp updates in 192.168.2.6 prefix-list debug
r2#
```
Logs:
```
BGP: [PCFFM-WMARW] 192.168.2.3(r3) rcvd UPDATE wlen 0 attrlen 28 alen 5
BGP: [PCFFM-WMARW] 192.168.2.3(r3) rcvd UPDATE wlen 0 attrlen 28 alen 4
BGP: [PCFFM-WMARW] 192.168.2.3(r3) rcvd UPDATE wlen 0 attrlen 0 alen 0
BGP: [M59KS-A3ZXZ] bgp_update_receive: rcvd End-of-RIB for IPv4 Unicast from 192.168.2.3 in vrf default
BGP: [PCFFM-WMARW] 192.168.2.4(r4) rcvd UPDATE wlen 0 attrlen 28 alen 5
BGP: [PCFFM-WMARW] 192.168.2.4(r4) rcvd UPDATE wlen 0 attrlen 28 alen 4
BGP: [PCFFM-WMARW] 192.168.2.4(r4) rcvd UPDATE wlen 0 attrlen 0 alen 0
BGP: [M59KS-A3ZXZ] bgp_update_receive: rcvd End-of-RIB for IPv4 Unicast from 192.168.2.4 in vrf default
BGP: [PCFFM-WMARW] 192.168.1.1(r1) rcvd UPDATE wlen 0 attrlen 29 alen 5
BGP: [PCFFM-WMARW] 192.168.2.6(r6) rcvd UPDATE wlen 0 attrlen 28 alen 5
BGP: [XXWBM-V772F] 192.168.2.6(r6) rcvd UPDATE w/ attr: nexthop 192.168.2.6, origin ?, metric 0, path 65006
BGP: [YCKEM-GB33T] 192.168.2.6(r6) rcvd 172.16.16.254/32 IPv4 unicast <<<<<<<<<<<<
BGP: [PCFFM-WMARW] 192.168.2.6(r6) rcvd UPDATE wlen 0 attrlen 28 alen 4
BGP: [PCFFM-WMARW] 192.168.2.6(r6) rcvd UPDATE wlen 0 attrlen 0 alen 0
BGP: [M59KS-A3ZXZ] bgp_update_receive: rcvd End-of-RIB for IPv4 Unicast from 192.168.2.6 in vrf default
BGP: [PCFFM-WMARW] 192.168.2.5(r5) rcvd UPDATE wlen 0 attrlen 28 alen 5
BGP: [PCFFM-WMARW] 192.168.2.5(r5) rcvd UPDATE wlen 0 attrlen 28 alen 4
BGP: [PCFFM-WMARW] 192.168.2.5(r5) rcvd UPDATE wlen 0 attrlen 0 alen 0
BGP: [M59KS-A3ZXZ] bgp_update_receive: rcvd End-of-RIB for IPv4 Unicast from 192.168.2.5 in vrf default
BGP: [PCFFM-WMARW] 192.168.1.1(r1) rcvd UPDATE wlen 0 attrlen 29 alen 5
BGP: [PCFFM-WMARW] 192.168.7.7(r7) rcvd UPDATE wlen 0 attrlen 0 alen 0
BGP: [M59KS-A3ZXZ] bgp_update_receive: rcvd End-of-RIB for IPv4 Unicast from 192.168.7.7 in vrf default
```
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
 | 
 | 
This reverts commit de38eada9c0527758bca34984d2f018670d74c9a.
 | 
 | 
Add the "debug bgp linkstate" command to display incoming link-states
prefixes.
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
 | 
 | 
Done with a combination of regex'ing and banging my head against a wall.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
 | 
 | 
This reverts commit 70cd87ca02125616e9f61f97ab504248c935bd83.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
 | 
 | 
Signed-off-by: Madhuri Kuruganti <maduri111@gmail.com>
 | 
 | 
Signed-off-by: Madhuri Kuruganti <maduri111@gmail.com>
 | 
 | 
Several functions in bgp_debug.[ch] take a const struct peer *
and also return a bool instead of an int.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
 | 
 | 
bgp_debug.h has function declarations that are
not properly aligned with our standard on how
to do so.  Fix.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
 | 
 | 
Also, add N-Bit (Notification) flag for Graceful Restart.
This is a preparation for RFC8538.
More information: https://datatracker.ietf.org/doc/html/rfc8538
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
 | 
 | 
Gateway IP overlay index is generated for EVPN RT-5 when following CLI is
configured.
router bgp 100 vrf vrf-blue
 address-family l2vpn evpn
  advertise ipv4 unicast gateway-ip
  advertise ipv6 unicast gateway-ip
BGP nexthop of the VRF IP/IPv6 route is set as the gateway IP of the
corresponding EVPN RT-5
Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
 | 
 | 
Add new BGP debug option to enable BFD related debugging messages.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
 | 
 | 
Filters for MH debug logs
Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
 | 
 | 
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
 | 
 | 
when a plugin is attached, some debugs may be attached to that plugin.
For that, add one hook that is interacting with vty: a boolean indicates
what the usage is for: either for impacting the 'show running-config',
or for impacting the 'show debugging' command.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
 | 
 | 
This is the bulk part extracted from "bgpd: Convert from `struct
bgp_node` to `struct bgp_dest`".  It should not result in any functional
change.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
 | 
 | 
Cleanup another set of functions that need to respect the
const'ness of a prefix.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
Defer the grabbing of the prefix for as long as is possible.
This is a long term rework of how we access the `struct bgp_node`
to only use accessor functions.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
Some were converted to bool, where true/false status is needed.
Converted to void only those, where the return status was only false or true.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
 | 
 | 
* Added FSM for peer and global configuration for graceful restart
 * Added debug option BGP_GRACEFUL_RESTART for logs specific to
 graceful restart processing
Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
 | 
 | 
This pr contains all the header files changes for BGP GR per Neighbour(BGPN)
feature.
Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
 | 
 | 
const const const your boat, merrily down the stream...
Signed-off-by: David Lamparter <equinox@diac24.net>
 | 
 | 
This function was not used anywhere, remove it from the system.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
Some errors messages were not guarded. now those log messages
are guarded.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
 | 
 | 
This command is used to troubleshoot the routes that are installed inbgp
pbr fib, before being injected in zebra.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
 | 
 | 
MPLS label pool backed by allocations from the zebra label manager.
A caller requests a label (e.g., in support of an "auto" label
specification in the CLI) via lp_get(), supplying a unique ID and
a callback function. The callback function is invoked at a later
time with the unique ID and a label value to inform the requestor
of the assigned label.
Requestors may release their labels back to the pool via lp_release().
The label pool is stocked with labels allocated by the zebra label
manager. The interaction with zebra is asynchronous so that bgpd
is not blocked while awaiting a label allocation from zebra.
The label pool implementation allows for bgpd operation before (or
without) zebra, and gracefully handles loss and reconnection of
zebra. Of course, before initial connection with zebra, no labels
are assigned to requestors. If the zebra connection is lost and
regained, callbacks to requestors will invalidate old assignments
and then assign new labels.
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
 | 
 | 
It is possible to enhance debug bgp flowspec feature by using vty
command. This command, if enabled, will dump the match/set couple of
information received on NLRI.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
 | 
 | 
The following types are nonstandard:
- u_char
- u_short
- u_int
- u_long
- u_int8_t
- u_int16_t
- u_int32_t
Replace them with the C99 standard types:
- uint8_t
- unsigned short
- unsigned int
- unsigned long
- uint8_t
- uint16_t
- uint32_t
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
 | 
 | 
 | 
 | 
- add "debug bgp vpn label" CLI
    - improved debug messages for "debug bgp bestpath"
    - send vrf label to zebra after zebra informs bgpd of vrf_id
    - withdraw vrf_label from zebra if zebra informs bgpd that vrf_id is disabled
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
 | 
 | 
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
 | 
 | 
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
 | 
 | 
When doing symmetric routing,
EVPN type-2 (MACIP) routes need to be advertised with two labels (VNIs)
the first being the L2 VNI (identifying the VLAN) and
the second being the L3 VNI (identifying the VRF).
The receive processing needs to handle one or two labels too.
Ticket: CM-18489
Review: CCR-6949
Testing: manual and bgp/evpn/mpls smoke
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
 | 
 | 
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'`
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
 | 
 | 
Ensure VNI and EVPN nexthops are logged in debug logs.
Updates: "bgpd: labeled unicast processing"
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
 | 
 | 
log.c provides functionality for associating a constant (typically a
protocol constant) with a string and finding the string given the
constant. However this is highly delicate code that is extremely prone
to stack overflows and off-by-one's due to requiring the developer to
always remember to update the array size constant and to do so correctly
which, as shown by example, is never a good idea.b
The original goal of this code was to try to implement lookups in O(1)
time without a linear search through the message array. Since this code
is used 99% of the time for debugs, it's worth the 5-6 additional cmp's
worst case if it means we avoid explitable bugs due to oversights...
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
 | 
 | 
The FSF's address changed, and we had a mixture of comment styles for
the GPL file header.  (The style with * at the beginning won out with
580 to 141 in existing files.)
Note: I've intentionally left intact other "variations" of the copyright
header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
 | 
 | 
Originally we used the 'peer' parameter for this:
  if (peer_sort (peer) == BGP_PEER_IBGP)
    snprintf (buf + strlen (buf), size - strlen (buf), ", localpref %d",
              attr->local_pref);
Now we have this:
  if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_LOCAL_PREF)))
    snprintf (buf + strlen (buf), size - strlen (buf), ", localpref %u",
              attr->local_pref);
Remove the now useless 'peer' parameter.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
 | 
 | 
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
 |