]> git.proxmox.com Git - mirror_frr.git/commit - lib/prefix.c
bgpd: Allow peering via 127.0.0.0/8
authorDonatas Abraitis <donatas@opensourcerouting.org>
Mon, 20 Feb 2023 15:34:26 +0000 (17:34 +0200)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Tue, 21 Mar 2023 11:19:44 +0000 (13:19 +0200)
commit8eb09e64d205ccb24223be5de254167ec96f61b6
tree8039bb19077055703486c6ec046db5c48d4a8762
parentc8cba1b88c952517ebe7f2ab2262a6ffb5499c0a
bgpd: Allow peering via 127.0.0.0/8

There are some specific edge-cases when is a need to run FRR and another FRR
and/or another BGP implementation on the same box. Relaxing 127.0.0.0/8 for
this case might be reasonable.

An example below peering via 127.0.0.0/8 between FRR and GoBGP:

```
% ss -ntlp | grep 179
LISTEN   0         4096              127.0.0.1:179              0.0.0.0:*
LISTEN   0         128               127.0.0.2:179              0.0.0.0:*

% grep 127.0.0.2 /etc/frr/daemons
bgpd_options="   -A 127.0.0.1 -l 127.0.0.2"

% grep local /etc/gobgp/config.toml
    local-address-list = ["127.0.0.1"]

donatas-pc# sh ip bgp summary

IPv4 Unicast Summary (VRF default):
BGP router identifier 192.168.10.17, local AS number 65001 vrf-id 0
BGP table version 0
RIB entries 0, using 0 bytes of memory
Peers 1, using 725 KiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
127.0.0.1       4      65002         7         7        0    0    0 00:02:02            0        0 N/A

Total number of neighbors 1
donatas-pc#
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd/bgp_zebra.c
doc/user/basic.rst
lib/prefix.c
lib/prefix.h