Commit Graph

1142 Commits

Author SHA1 Message Date
Donatas Abraitis
3ccddc2566 bgpd: Use autocomplete for route-map under conditional advertisements CLI
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-08 16:54:22 +03:00
Nobuhiro MIKI
1c21a23453 bgpd: refactor type of srv6_locator_chunks list
Since additional information such as block_bits_length is needed to
generate SIDs properly, the type of elements in srv6_locator_chunks
list is extended from "struct prefix_ipv6 *" to
"struct srv6_locator_chunk *". Even in terms of variable name,
"struct srv6_locator_chunk *" is appropriate.

Signed-off-by: Nobuhiro MIKI <nmiki@yahoo-corp.jp>
2022-04-06 13:40:14 +09:00
Donald Sharp
17be83bf99 *: Fix spelling of Gracefull
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-02 07:46:19 -04:00
anlan_cs
664b6f1851 bgpd: add whitespace after "%%" for prompt
Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-04-01 03:27:27 -04:00
Donatas Abraitis
aa24a36a2d bgpd: Add BGP configuration start/end markers
Delay BGP configuration until we receive end-configuration hook to make sure
we don't send partial updates to peer which leads to broken Graceful-Restart.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-03-22 09:04:46 +02:00
anlan_cs
be125e6fe5 bgpd: add new line for prompt of "no router bgp"
Simple prompt issue.
"no router bgp <ASN>" is ok, but "no router bgp" without <ASN> missed "\n".

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-03-15 09:55:28 -04:00
anlan_cs
4d4c404bf6 *: Add necessary new line for output of vty_out()
Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-02-27 10:59:19 +08:00
Donald Sharp
4b7e23e9f2 bgpd: Convert bgp error codes for cli input to an enum
Conversion of bgp error codes returned for cli input into
an enum and then properly handling all the error cases
in bgp_vty_return.

Because not all error codes returned were properly handled
in this function there existed configuration examples that
were accepted on the cli without an error message but not
saved.

Fixes: #10589
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-15 16:38:32 -05:00
Donald Sharp
6dcea6fe05 bgpd: Move some error codes to bgp_vty_return handling
BGP_ERR_PEER_GROUP_MEMBER and BGP_ERR_PEER_GROUP_PEER_TYPE_DIFFERENT
both are not handled by bgp_vty_return, but both can be handled by
this function as that there is nothing special going on here.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-15 16:38:32 -05:00
Donatas Abraitis
3d2a2725f3 bgpd: Do not check for status from str2sockunion()
Coverity pass.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-02-02 13:28:26 +02:00
Iqra Siddiqui
cb93e0a2df bgpd: Fix expected type from format string to unsigned int
Co-authored-by: Kantesh Mundaragi <kmundaragi@vmware.com>
Signed-off-by: Iqra Siddiqui <imujeebsiddi@vmware.com>
2022-02-01 00:25:43 -08:00
Iqra Siddiqui
3756b9aceb bgpd: Fixing dead code
Description:
-Removing break statements which will never be executed.
-Adding missing 'cmd' variable.

Co-authored-by: Kantesh Mundaragi <kmundaragi@vmware.com>
Signed-off-by: Iqra Siddiqui <imujeebsiddi@vmware.com>
2022-01-31 21:50:50 -08:00
Russ White
80dae7afbe
Merge pull request #10357 from ton31337/fix/peer_address_self_check_relax
bgpd: Relax peer to be on the same host
2022-01-28 11:12:45 -05:00
Donatas Abraitis
7a90d91586
Merge pull request #10408 from idryzhov/no-opaque-by-default
*: do not send opaque data to zebra by default
2022-01-28 12:54:16 +02:00
Donatas Abraitis
6766acddbf
Merge pull request #9880 from louis-oui/maximum-prefix-out
bgpd: fixes maximum prefix out
2022-01-27 08:49:31 +02:00
Louis Scalbert
80444d30ce bgpd: fix peer-group with maximum-prefix-out
When setting maximum-prefix-out on peer-group, the applied value on
member is 0.

Fix usage of maximum-prefix-out on peer-group.

The peer_maximum_prefix_out_(un)set functions are derived from
peer_maximum_prefix_(un)set.

Fixes: fde246e835 ("bgpd: Add an option to limit outgoing prefixes")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-01-26 16:49:31 +01:00
Louis Scalbert
bc03c622e1 bgpd: allow no neighbor X.X.X.X maximum-prefix-out [(1-4294967295)]
Specifying a number is not possible with command no neighbor X.X.X.X
maximum-prefix-out

> frr(config-router-af)# no neighbor 192.168.1.2 maximum-prefix-out 1
> % Unknown command: no neighbor 192.168.1.2 maximum-prefix-out 1

This patch allows it.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-01-26 16:38:14 +01:00
Igor Ryzhov
870791a3b5 *: do not send opaque data to zebra by default
Opaque data takes up a lot of memory when there are a lot of routes on
the box. Given that this is just a cosmetic info, I propose to disable
it by default to not shock people who start using FRR for the first time
or upgrades from an old version.

Fixes #10101.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2022-01-24 22:18:46 +03:00
Russ White
5b05ce9ff5
Merge pull request #10374 from opensourcerouting/bgp-reset-counters
bgpd: Reset message statistics with clear command
2022-01-24 07:52:11 -05:00
Russ White
bbc9f23e0c
Merge pull request #10402 from ton31337/fix/capability_extended-nexthop_cli_hidden
bgpd: Show negative form of capability extended-nexthop for interface…
2022-01-24 07:35:21 -05:00
Donatas Abraitis
843770f609 bgpd: Show negative form of capability extended-nexthop for interface peers
```
exit1-debian-11(config-router)# neighbor 192.168.100.3 remote-as external
exit1-debian-11(config-router)# do sh run | include extended
exit1-debian-11(config-router)# neighbor 192.168.100.3 capability extended-nexthop
exit1-debian-11(config-router)# do sh run | include extended
 neighbor 192.168.100.3 capability extended-nexthop
exit1-debian-11(config-router)# no neighbor 192.168.100.3 capability extended-nexthop
exit1-debian-11(config-router)# do sh run | include extended
exit1-debian-11(config-router)# neighbor eth0 interface remote-as external
exit1-debian-11(config-router)# do sh run | include extended
exit1-debian-11(config-router)# neighbor eth0 capability extended-nexthop
exit1-debian-11(config-router)# do sh run | include extended
exit1-debian-11(config-router)# no neighbor eth0 capability extended-nexthop
exit1-debian-11(config-router)# do sh run | include extended
 no neighbor eth0 capability extended-nexthop
exit1-debian-11(config-router)#
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-01-21 23:36:37 +02:00
Louis Scalbert
d0bf49ecd5 bgpd: apply maximum-prefix-out without clearing the neighbor
Abstract:
- The command "neighbor PEER maximum-prefix-out NUMBER" cannot be applied
  without clearing the BGP neighbor.
- Apply the maximum-prefix-out value as soon as it is modified without
  clearing the neighbor.

subgroup_update_packet() and subgroup_withdraw_packet() respectively
manages the announcement and withdrawal BGP message to the peer.
subgrp->scount counter counts the number of sent prefixes.

Before the patch, the maximum out prefix limitation was applied in
subgroup_update_packet() in order that subgrp->scount never exceeds the
limit. Setting a limit inferior to the effective number of sent prefix
did not result in sending any withdrawal message to reduce the number of
sent prefixes. Without clearing the BGP neighbor, the limitation only
applied to the announcement of new prefixes when the limitation was
over.

With the patch, the limitation is checked in subgroup_announce_check().
The function is intended to say whether a prefix has to be announced in
regards to the prefix-list, route-map... Now when a maximum-prefix-out
value is changed/removed, the neighbor AFI/SAFI table is re-parsed in
the same way as for the application of route-map, prefix-lists...

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-01-20 18:19:37 +01:00
David Schweizer
3cb14f2605
bgpd: Reset message statistics with clear command
Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2022-01-19 14:24:18 +01:00
Donatas Abraitis
84de148355 bgpd: List peer-group as neighbor once and not for IPv4/IPv6/WORD
Before:

```
exit1-debian-11(config-router)# neighbor ?
  A.B.C.D   Neighbor address
     192.168.0.2 PEER PG
  WORD      Interface name or neighbor tag
     PEER PG
  X:X::X:X  Neighbor IPv6 address
     2a02🔤:17 2a02:bbd::2 PEER PG
```

After:

```
exit1-debian-11(config-router)# neighbor ?
  A.B.C.D   Neighbor address
     192.168.0.2
  WORD      Interface name or neighbor tag
     PEER PG
  X:X::X:X  Neighbor IPv6 address
     2a02🔤:17 2a02:bbd::2
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-01-18 11:09:48 +02:00
Donatas Abraitis
4122b697bb bgpd: Relax peer to be on the same host
If the existing listener is the same as the peer, treat as self and reject.

```
exit1-debian-11# sh bgp listeners
Name             fd Address
---------------------------
default          24 192.168.10.123
exit1-debian-11# con
exit1-debian-11(config)# router bgp
exit1-debian-11(config-router)# neighbor 192.168.10.123 remote-as external
% Can not configure the local system as neighbor

exit1-debian-11# sh bgp listeners
Name             fd Address
---------------------------
default          24 0.0.0.0
default          25 ::
exit1-debian-11# con
exit1-debian-11(config)# router bgp
exit1-debian-11(config-router)# neighbor 192.168.10.123 remote-as external
% Can not configure the local system as neighbor
exit1-debian-11(config-router)#

exit1-debian-11# sh bgp listeners
Name             fd Address
---------------------------
default          24 192.168.0.1
exit1-debian-11# con
exit1-debian-11(config)# router bgp
exit1-debian-11(config-router)# neighbor 192.168.10.123 remote-as external
exit1-debian-11(config-router)#
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-01-17 18:44:57 +02:00
Donatas Abraitis
8c20061f40 bgpd: Add peer-groups to neighbor autocomplete
```
exit1-debian-11(config-router)# neighbor PGTEST peer-group
exit1-debian-11(config-router)# neighbor PEER peer-group
exit1-debian-11(config-router)# neighbor ?
  A.B.C.D   Neighbor address
     192.168.0.2 PEER PGTEST
  WORD      Interface name or neighbor tag
     PEER PGTEST
  X:X::X:X  Neighbor IPv6 address
     2a02🔤:17 2a02:bbd::2 PEER PGTEST
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-01-16 22:08:57 +02:00
Donald Sharp
cce7c33396
Merge pull request #10335 from ton31337/fix/reduce_nesting_show_neighbor_bgp
bgpd: Reduce nesting for bgp_show_peer()
2022-01-14 08:11:48 -05:00
Donatas Abraitis
107115632a bgpd: Reduce nesting for bgp_show_peer()
It's hard to read sometimes or even add something more.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-01-13 17:23:03 +02:00
Donatas Abraitis
df8d723c5f *: Add FOREACH_AFI_SAFI_NSF(afi, safi) macro to reduce nesting
Used for graceful-restart mostly.

Especially for bgp_show_neighbor_graceful_restart_capability_per_afi_safi()

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-01-13 14:29:54 +02:00
Donald Sharp
0edd8e4714
Merge pull request #10288 from ton31337/fix/rfc7300
bgpd: Add a warning if we try to use the last reserved ASN
2022-01-08 08:42:19 -05:00
Donatas Abraitis
b776f48c36 bgpd: Limit shutdown message size to max 255 characters
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-01-07 22:35:38 +02:00
Donatas Abraitis
cc413e2ade bgpd: Add a warning if we try to use the last reserved ASN
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-01-07 22:35:04 +02:00
Donatas Abraitis
dcbebfd3ff bgpd: Graceful Restart restart-time can be 0
Using with LLGR, this should be allowed setting GR restart-time timer to 0,
to immediately start LLGR timers.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-01-06 11:24:48 +02:00
Donatas Abraitis
7f8a9a24a9 bgpd: Change default long-lived graceful restart stale timer to 0 seconds
That means the feature is off by default.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-12-28 16:08:00 +02:00
Russ White
5c24a442d9
Merge pull request #10105 from ton31337/feature/rfc9072
bgpd: Implement rfc9072
2021-11-29 10:46:58 -05:00
Igor Ryzhov
cb3fa0a612
Merge pull request #10124 from ton31337/feature/vty_json 2021-11-29 02:11:29 +03:00
Donatas Abraitis
c48349e346 *: Remove redundand braces for single statement blocks
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-27 11:20:59 +02:00
Donatas Abraitis
75eeda9323 bgpd: Convert vty_out to vty_json for JSON
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-25 17:51:12 +02:00
Donatas Abraitis
67d7e256a3 bgpd: Replace prefix2str for JSON to %pFX
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-25 17:34:17 +02:00
Donatas Abraitis
d08c0c8077 bgpd: Implement rfc9072
Related: https://datatracker.ietf.org/doc/html/rfc9072

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-22 15:34:46 +02:00
Igor Ryzhov
0609190219
Merge pull request #10074 from opensourcerouting/assorted-20211116
lib/vtysh/ospf6d: assorted small bits
2021-11-19 15:43:10 +03:00
Donatas Abraitis
4e9a98636f *: Remove unused variables
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-18 18:45:41 +02:00
Donatas Abraitis
c949c77101 bgpd: Replace inet_ntop to %pI4/6 for JSON outputs
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-18 11:35:29 +02:00
David Lamparter
dd2c81b8c0 lib: rework vty_check_node_for_xpath_decrement
...by having a flag in struct cmd_node rather than hardcoding it in
`lib/command.c`.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-11-16 18:51:22 +01:00
Russ White
b761cb131a
Merge pull request #9864 from ton31337/feature/access_list_autocomplete
lib: Add autocomplete for access-lists
2021-11-11 08:03:33 -05:00
Donatas Abraitis
c60dec369a lib: Add autocomplete for access-lists
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-10-31 20:26:06 +02:00
Donatas Abraitis
8606be8779 bgpd: Add Long-lived Graceful Restart capability (restarter)
Restart Router mode.

FRRouting (Restarter):
```
 bgp long-lived-graceful-restart stale-time 10
 bgp graceful-restart restart-time 1
```

Tested with GoBGP (Helper):
```
    long-lived-graceful-restart:	advertised and received
        Local:
	    ipv4-unicast, restart time 100000 sec
        Remote:
	    ipv4-unicast, restart time 10 sec, forward flag set
```

Logs:

```
{"Key":"192.168.10.123","Reason":"graceful-restart","State":"BGP_FSM_ESTABLISHED","Topic":"Peer","level":"info","msg":"Peer Down","time":"2021-10-25T17:48:36+03:00"}
{"Key":"192.168.10.123","State":"BGP_FSM_IDLE","Topic":"Peer","level":"warning","msg":"graceful restart timer expired","time":"2021-10-25T17:48:37+03:00"}
{"Family":65537,"Key":"192.168.10.123","Topic":"Peer","level":"info","msg":"start LLGR restart timer (10 sec) for ipv4-unicast","time":"2021-10-25T17:48:37+03:00"}
{"Family":65537,"Key":"192.168.10.123","Topic":"Peer","level":"info","msg":"LLGR restart timer (10 sec) for ipv4-unicast expired","time":"2021-10-25T17:48:47+03:00"}

% ./gobgp global rib
   Network              Next Hop             AS_PATH              Age        Attrs
S*>10.0.2.0/24          192.168.10.123       174                  00:12:08   [{Origin: ?} {Med: 0} {Communities: llgr-stale} {Extcomms: [174:1282304808]}]
```

Helper mode will be added with upcoming PRs.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-10-31 20:25:42 +02:00
Donatas Abraitis
95bbb5e652
Merge pull request #9873 from bhinin/dynamic_peer_count_reset
bgpd: Reset dynamic peer counter
2021-10-26 08:59:39 +03:00
Igor Ryzhov
16e2b641fa
Merge pull request #9847 from ton31337/feature/prefix-list_autocomplete
bgpd: Add autocomplete for set/match community/large/ext lists
2021-10-20 18:45:07 +03:00
Donatas Abraitis
a2099c1d64 bgpd: Add autocomplete for community/large/extcommunity stuff
```
exit1-debian-9(config)# route-map test1 permit 10
exit1-debian-9(config-route-map)# match community ?
  (1-99)               Community-list number (standard)
  (100-500)            Community-list number (expanded)
  COMMUNITY_LIST_NAME  Community-list name
     testas
exit1-debian-9(config-route-map)# match large-community ?
  (1-99)                Large Community-list number (standard)
  (100-500)             Large Community-list number (expanded)
  LCOMMUNITY_LIST_NAME  Large Community-list name
     LCL-ORIGINATED-ALL
exit1-debian-9(config-route-map)#
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-10-20 14:41:24 +03:00
Abhishek Naik
800867d85e bgpd: Reset dynamic peer counter
Dynamic peer count is inconsistent in
"show bgp summary json" and "show bgp summary failed json" due to
dynamic peer counter 'dn_count' being reused without resetting

Signed-off-by: Abhishek Naik <bhini@amazon.com>
2021-10-19 23:50:42 +00:00
Donatas Abraitis
de71d43e04 bgpd: Add autocomplete for filter-list
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-10-19 18:03:54 +03:00
Igor Ryzhov
7e86999140 *: cleanup number-named access-lists in CLI
There's no more difference between number-named and word-named access-lists.
This commit removes separate arguments for number-named ACLs from CLI.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-10-08 19:25:41 +03:00
Donald Sharp
0e5cdd59eb bgpd: Don't lookup paf structure get straight to the point
The paf data structure is stored based upon an internal
bgp enum.  The code is looking over all AFI/SAFI's and
doing a paf_af_find which then calls afindex to find
the right paf structure.  Let's just loop over the
peer->peer_af_array[] and cut straight to the chase.
Under some loads the paf_af_find was taking up 6%
of the run time.  This removes it entirely.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-09-26 20:17:40 -04:00
Igor Ryzhov
b8c01bba53
Merge pull request #9486 from slankdev/slankdev-srv6-no-cli-1
CLI to delete SRv6 locator
2021-09-14 19:04:03 +03:00
Hiroki Shirokura
0249b8b612 bgpd: add no-cli for srv6 on bgpd-side
(1) Implement zapi wrapper func to release srv6-locator-chunk

(2) Implement no locator NAME command
router bgp 1
 segment-routing srv6
  no locator loc1

(3) Implement no segment-routing srv6 command
router bgp 1
 no segment-routing srv6

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
2021-09-13 22:38:25 +00:00
Donatas Abraitis
565e9ddded bgpd: Do not strip peer's description by whitespace in show bgp summary
```
~/frr# vtysh -c 'show run' | grep description
 neighbor 192.168.0.2 description test 1 2 3
~/frr# vtysh -c 'show ip bgp summary' | grep -E "Desc|192.168.0.2"
Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
192.168.0.2     4          0         0         0        0    0    0    never      Connect        0 test 1 2 3
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-09-09 14:15:48 +03:00
Russ White
dd786181cc
Merge pull request #9539 from ton31337/fix/floating_point_cli
bgpd: Replace `Enable` to `Disable` for floating-point bw encoding CLI
2021-09-07 10:57:24 -04:00
Donatas Abraitis
53ca9cc9d9
Merge pull request #9561 from idryzhov/bgp-no-router-vrf-default
bgpd: fix "no router bgp X vrf default"
2021-09-06 12:41:20 +03:00
Igor Ryzhov
5c2ef87104
Merge pull request #9547 from ton31337/fix/addpath_non_json_broken
bgpd: Drop afi/safi duplicate string notation for AddPath capability
2021-09-06 12:33:01 +03:00
Igor Ryzhov
1ca42c8d84 bgpd: fix "no router bgp X vrf default"
Currently, "vrf default" modifier is not processed correctly and we get
the `% Can't find BGP instance` error.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-09-03 19:39:53 +03:00
Donatas Abraitis
7c0e43123d bgpd: Add disable-addpath-rx knob
The idea is to disable addpath-rx capability to avoid unnecessary additional
routes installed.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-09-03 15:05:02 +03:00
Donatas Abraitis
34c71a4da8 bgpd: Drop afi/safi duplicate string notation for AddPath capability
Before:

```
    AddPath:
      IPv4 Unicast: TX advertised IPv4 Unicast and received
      IPv4 Unicast: RX advertised IPv4 Unicast and received
      IPv6 Unicast: TX advertised IPv6 Unicast
      IPv6 Unicast: RX advertised IPv6 Unicast
```

After:

```
    AddPath:
      IPv4 Unicast: TX advertised and received
      IPv4 Unicast: RX advertised and received
      IPv6 Unicast: TX advertised
      IPv6 Unicast: RX advertised
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-09-03 14:01:44 +03:00
Donatas Abraitis
7ab294ea05 bgpd: Replace Enable to Disable for floating-point bw encoding CLI
At the begining there was a command to enable floating-point encoding,
but now it's default and can be disabled. Documentation was updated, but
CLI - missed, sorry, fixing.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-09-02 09:16:14 +03:00
Russ White
8811ce0beb
Merge pull request #9469 from ton31337/fix/extcommunity_bandwidth_floating_to_hex
bgpd: Use IEEE-754 Floating Point for storing extcommunity bandwidth
2021-09-01 12:56:45 -04:00
Donatas Abraitis
e5fbfe01ae
Merge pull request #9318 from Prerana-GB/ibgp_knob
bgp: BGP knob for faster convergence of bgp sessions
2021-09-01 10:45:27 +03:00
Donatas Abraitis
419db184af
Merge pull request #9397 from tkms1122/master
bgpd: minimum-holdtime knob to prevent session establishment with BGP peer with low holdtime.
2021-09-01 10:33:59 +03:00
Donatas Abraitis
294d842565 bgpd: Drop redundand WORD for no_neighbor_interface_cmd
Just to be consistent with neighbor_interface_cmd.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-08-30 19:07:47 +03:00
Donatas Abraitis
27aa23a43b bgpd: Add neighbor PEER link-bw-encoding-ieee
This is to avoid breaking changes between existing deployments of
extended community for bandwidth encoding. By default FRR uses uint32
to encode bandwidth, which is not as the draft requires (IEEE floating-point).

This switch enables the required encoding per-peer.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-08-30 14:21:49 +03:00
Sri Mohana Singamsetty
8930d8d75b
Merge pull request #9473 from ton31337/fix/BGP_STR_unified
bgpd: Use BGP_STR for CLI definitions everywhere for BGP CLI
2021-08-27 13:28:57 -07:00
Donatas Abraitis
e92739870d bgpd: Use BGP_STR for CLI definitions everywhere for BGP CLI
Just have some cleanup.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-08-24 17:38:39 +03:00
Prerana-GB
f852eb9833 bgpd: BGP knob to teardown session immediately when peer is unreachable
When BGP is notified by RIB that peer address is unreachable then BGP session must be brought
down immediately and not wait for the hold-timer expiry. Today single-hop EBGP already behaves
this way but need to change for iBGP and multi-hop EBGP sessions.

Signed-off-by: Prerana G.B <prerana@vmware.com>, Pushpasis Sarkar <spushpasis@vmware.com>
2021-08-24 12:23:38 +00:00
Igor Ryzhov
07679ad98a *: explicitly print "exit" at the end of every node config
There is a possibility that the same line can be matched as a command in
some node and its parent node. In this case, when reading the config,
this line is always executed as a command of the child node.

For example, with the following config:
```
router ospf
 network 193.168.0.0/16 area 0
!
mpls ldp
 discovery hello interval 111
!
```
Line `mpls ldp` is processed as command `mpls ldp-sync` inside the
`router ospf` node. This leads to a complete loss of `mpls ldp` node
configuration.

To eliminate this issue and all possible similar issues, let's print an
explicit "exit" at the end of every node config.

This commit also changes indentation for a couple of existing exit
commands so that all existing commands are on the same level as their
corresponding node-entering commands.

Fixes #9206.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-08-23 22:08:20 +03:00
Ryoga Saito
53970de3c2 bpgd: add missing sid setting in address-family
current bgpd doesn't write sid setting, resulting to fail to save
configuration correctly.

Signed-off-by: Ryoga Saito <contact@proelbtn.com>
2021-08-19 05:59:32 +00:00
Ryoga Saito
ff7c3ee1cc bpgd: add "exit" at the end of bgp srv6 setting
without "exit", when frr is starting up, frr fails to load
address-family setting correctly.

Signed-off-by: Ryoga Saito <contact@proelbtn.com>
2021-08-19 05:47:20 +00:00
Takemasa Imada
b042667a3d bgpd: minimum-holdtime knob to prevent session establishment with BGP peer with low holdtime.
Signed-off-by: Takemasa Imada <takemasa.imada@gmail.com>
2021-08-15 06:08:08 +09:00
Donatas Abraitis
225096bcd1 bgpd: Auto-complete for community lists
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-08-10 10:56:26 +03:00
Donald Sharp
883da9f5ec
Merge pull request #9256 from idryzhov/dampening-revert
BGP per-peer dampening revert
2021-08-06 10:46:09 -04:00
Igor Ryzhov
1ca2fd1175 Revert "bgpd: convert global config to transactional cli"
This reverts commit ff8a8a7ac1.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-08-03 23:36:31 +03:00
Igor Ryzhov
66d2a8553b Revert "bgpd: correct bgp global context"
This reverts commit 87ce25646b.
2021-08-03 23:36:31 +03:00
Igor Ryzhov
56648eab39 Revert "bgpd: move router bgp nb callback"
This reverts commit 5e42cb2fb0.
2021-08-03 23:36:31 +03:00
Igor Ryzhov
8382083a8f Revert "bgpd: no router bgp check candidate config"
This reverts commit 4b63e358bc.
2021-08-03 23:36:31 +03:00
Igor Ryzhov
31acf04aa4 Revert "bgpd: Use default VRF name if using router bgp command"
This reverts commit 5ce106b72b.
2021-08-03 23:36:31 +03:00
Igor Ryzhov
2fc82a12fb Revert "bgpd: fix crash in bgp instance creation"
This reverts commit a5ab756f24.
2021-08-03 23:36:31 +03:00
Igor Ryzhov
585f1adc4f Revert "bgpd: convert addr-family clis to transactional clis"
This reverts commit 37a87b8f98.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-08-03 23:36:30 +03:00
Igor Ryzhov
28c6e24701 Revert "bgpd: neighbor peergrp config to transactional cli"
This reverts commit f4b8ec0721.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-08-03 22:29:13 +03:00
Igor Ryzhov
7e62b79286 Revert "bgpd: convert max prefix clis to transactional"
This reverts commit 04261decb9.
2021-08-03 22:20:53 +03:00
Igor Ryzhov
c36bc05fcd Revert "bgpd: convert neighbor peer config to transactional"
This reverts commit 8611c7f3b6.
2021-08-03 22:20:53 +03:00
Igor Ryzhov
56ceae8462 Revert "bgpd: fix compiler warnings in nbr cmd"
This reverts commit 555c8ab7ad.
2021-08-03 22:20:52 +03:00
Igor Ryzhov
1d80f243b4 Revert "bgpd: convert to yang modeled nbr cmds"
This reverts commit 232c75cd03.
2021-08-03 22:20:52 +03:00
Igor Ryzhov
642ef66443 Revert "bgpd: convert neighbor plist to transactional cli"
This reverts commit d9986d26c0.
2021-08-03 22:20:52 +03:00
Igor Ryzhov
0ea8d871c5 Revert "bgpd: convert nbr rmap transactional cli"
This reverts commit c668557533.
2021-08-03 22:20:52 +03:00
Igor Ryzhov
2373db75f7 Revert "bgpd: Temp fix to allow numbered peers to be part of a peer group"
This reverts commit 2a059a5448.
2021-08-03 22:20:52 +03:00
Igor Ryzhov
d6d7ed37c9 Revert "bgpd: Remove hidden neighbor X route-map Y <in|out> command"
This reverts commit 4c3e9f072a.
2021-08-03 22:20:51 +03:00
Igor Ryzhov
f63d4054d1 Revert "bgpd: convert send-community to transactional cli"
This reverts commit e48a9a90e0.
2021-08-03 22:20:51 +03:00
Igor Ryzhov
4fd9919ecf Revert "bgpd: remove duplicated checks from CLI"
This reverts commit 45d1d7c9a2.
2021-08-03 22:20:51 +03:00
Igor Ryzhov
1abef40fb3 Revert "bgpd: don't use operational state in "router bgp" command"
This reverts commit 4062b455a6.
2021-08-03 22:14:19 +03:00
Igor Ryzhov
cfb37710bc Revert "bgpd: forbid modification of bgp instance type"
This reverts commit d3e3677096.
2021-08-03 22:14:06 +03:00
Igor Ryzhov
9c605264e9 Revert "bgpd: don't return error for GR no-op commands"
This reverts commit 895b0d0ad6.
2021-08-03 22:14:06 +03:00
Igor Ryzhov
6c75f4b3c7 Revert "bgpd: vtysh commands for peer/group dampening profiles"
This reverts commit 0221327c75.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-08-03 21:54:47 +03:00