The FRRouting Protocol Suite
Find a file
Louis Scalbert db7cf73a33 bgpd: fix interface on leaks from redistribute connected
In the target VRF's Routing Information Base (RIB), routes that are
leaked and originate from the 'redistribute connected' command have
their next-hop interface set as the interface from the source VRF.
This prevents the IP address of the connected interface from being
reachable from the target VRF.

> router bgp 5227 vrf r1-cust1
>  address-family ipv4 unicast
>   redistribute connected
>   rd vpn export 10:1
>   rt vpn import 52:100
>   rt vpn export 52:101
>   export vpn
>   import vpn
>  exit-address-family
> exit
> !
> router bgp 5227 vrf r1-cust4
>  address-family ipv4 unicast
>   network 192.0.2.0/24
>   rd vpn export 10:1
>   rt vpn import 52:101
>   rt vpn export 52:100
>   export vpn
>   import vpn
>  exit-address-family
> exit
> !
> vrf r1-cust1
>  ip route 192.0.2.0/24 r1-cust4 nexthop-vrf r1-cust4

Extract from the routing table:
> VRF r1-cust1:
> C>* 172.16.29.0/24 is directly connected, r1-eth4, 00:44:15
> S>* 192.0.2.0/24 [1/0] is directly connected, r1-cust4 (vrf r1-cust4), weight 1, 00:00:30
>
> VRF r1-cust4:
> B>* 172.16.29.0/24 [20/0] is directly connected, r1-eth4 (vrf r1-cust1), weight 1, 00:00:02

In r1-cust4 VRF, the nexthop interface of 172.16.29.0/24 is r1-eth4,
which is unknown in the context. The following ping does not work:

> # tcpdump -lnni r1-cust1 'icmp' &
> # ip vrf exec r1-cust4 ping -c1 -I 192.0.2.1 172.16.29.1
> PING 172.16.29.1 (172.16.29.1) 56(84) bytes of data.
PING 172.16.29.1 (172.16.29.1) from 192.0.2.1 : 56(84) bytes of data.
18:49:20.635638 IP 192.0.2.1 > 172.16.29.1: ICMP echo request, id 15897, seq 1, length 64
18:49:27.113827 IP 192.0.2.1 > 192.0.2.1: ICMP host 172.16.29.1 unreachable, length 92

Fix the issue by setting nh_ifindex to the index of the VRF master
interface of the incoming BGP instance. The result is:

> VRF r1-cust4:
> C>* 192.0.2.0/24 is directly connected, r1-cust5, 00:27:40
> B>* 172.16.29.0/24 [20/0] is directly connected, r1-cust1 (vrf r1-cust1), weight 1, 00:00:08

> # tcpdump -lnni r1-cust1 'icmp' &
> # ping -c1 172.16.29.1 -I 192.0.2.1
> PING 172.16.29.1 (172.16.29.1) from 192.0.2.1 : 56(84) bytes of data.
> 18:48:32.506281 IP 192.0.2.1 > 172.16.29.1: ICMP echo request, id 15870, seq 1, length 64
> 64 bytes from 172.16.29.1: icmp_seq=1 ttl=64 time=0.050 ms
> 18:48:32.506304 IP 172.16.29.1 > 192.0.2.1: ICMP echo reply, id 15870, seq 1, length 64

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-02-01 10:21:43 +01:00
.github github: Mark the build as failed if 'do not merge' label is set 2023-12-22 10:29:52 +02:00
alpine build: update packaging & docs for dir changes 2024-01-27 19:01:19 +01:00
babeld babeld: remove bogus config path print 2024-01-27 19:02:52 +01:00
bfdd *: fix frr_daemon_info indentation 2024-01-27 19:02:51 +01:00
bgpd bgpd: fix interface on leaks from redistribute connected 2024-02-01 10:21:43 +01:00
debian Merge pull request #15163 from opensourcerouting/fix/pam_account 2024-01-30 10:24:57 -06:00
doc Merge pull request #15251 from qlyoung/fix-doc-nbcli-numlist 2024-01-31 15:06:25 +02:00
docker build: update packaging & docs for dir changes 2024-01-27 19:01:19 +01:00
eigrpd *: fix frr_daemon_info indentation 2024-01-27 19:02:51 +01:00
fpm *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
gdb lib: add simplified native msg support 2023-12-26 08:34:56 -05:00
grpc *: manual SPDX License ID conversions 2023-02-09 14:09:07 +01:00
include bgpd,lib,sharpd,zebra: srv6 introduce multiple segs/SIDs in nexthop 2023-09-20 15:07:15 +02:00
isisd isisd: fix overload state location 2024-01-27 19:02:52 +01:00
ldpd *: fix frr_daemon_info indentation 2024-01-27 19:02:51 +01:00
lib Merge pull request #15268 from LabNConsulting/chopps/quieter-code 2024-02-01 10:54:30 +02:00
m4 build: add recursion limit for AX_RECURSIVE_EVAL 2024-01-27 19:01:19 +01:00
mgmtd Merge pull request #15268 from LabNConsulting/chopps/quieter-code 2024-02-01 10:54:30 +02:00
mlag build: fix AM_LDFLAGS usage (and gcov) 2021-07-21 17:10:08 +02:00
nhrpd *: fix frr_daemon_info indentation 2024-01-27 19:02:51 +01:00
ospf6d ospf6d: fix GR & auth seqno state location 2024-01-27 19:02:52 +01:00
ospfclient *: Convert event.h to frrevent.h 2023-03-24 08:32:17 -04:00
ospfd ospfd: fix GR state location 2024-01-27 19:02:52 +01:00
pathd *: fix frr_daemon_info indentation 2024-01-27 19:02:51 +01:00
pbrd *: fix frr_daemon_info indentation 2024-01-27 19:02:51 +01:00
pceplib Merge pull request #15215 from donaldsharp/pceplib_fixup 2024-01-25 09:59:59 +02:00
pimd *: fix frr_daemon_info indentation 2024-01-27 19:02:51 +01:00
pkgsrc build: homologize path handling 2024-01-27 19:02:52 +01:00
python build: remove mgmtd exception from xref2vtysh 2024-01-28 23:28:40 +02:00
qpb mgmtd: Bringup MGMTD daemon and datastore module support 2023-03-21 22:08:32 -04:00
redhat Merge pull request #15163 from opensourcerouting/fix/pam_account 2024-01-30 10:24:57 -06:00
ripd *: fix frr_daemon_info indentation 2024-01-27 19:02:51 +01:00
ripngd *: fix frr_daemon_info indentation 2024-01-27 19:02:51 +01:00
sharpd *: fix frr_daemon_info indentation 2024-01-27 19:02:51 +01:00
snapcraft zebra, build: disable irdp by default 2024-01-28 23:50:40 +02:00
staticd build: remove mgmtd exception from xref2vtysh 2024-01-28 23:28:40 +02:00
tests tests: add tests for mgmt get-data with-defaults parameter 2024-01-31 02:20:13 +02:00
tools tools: add config-write callbacks to nb templates 2024-01-30 08:09:25 -05:00
vrrpd *: fix frr_daemon_info indentation 2024-01-27 19:02:51 +01:00
vtysh vtysh: un-hide the show configuration nb cli 2024-01-30 08:09:25 -05:00
watchfrr build: homologize path handling 2024-01-27 19:02:52 +01:00
yang yang: add more ietf models 2024-01-31 02:20:13 +02:00
zebra zebra: fix compiler warning about truncation. 2024-01-29 08:35:56 -05:00
.clang-format tools: add more libyang iter macros to .clang-format 2023-12-28 17:52:57 +00:00
.dockerignore docker: Make docker image on CentOS 7 2019-11-26 19:29:30 +00:00
.flake8 style: add format checker config that matches FRR style standards 2023-04-18 05:18:26 -04:00
.git-blame-ignore-revs tools: Ignore mass renaming of topotests for git blame 2021-05-11 14:14:26 +03:00
.gitignore tests: add YANG notification test 2024-01-30 14:54:47 -05:00
.isort.cfg style: add format checker config that matches FRR style standards 2023-04-18 05:18:26 -04:00
.pylintrc style: add format checker config that matches FRR style standards 2023-04-18 05:18:26 -04:00
.travis.yml lib: libyang2 add missed conversion 2021-05-17 22:13:59 -04:00
bootstrap.sh build: turn on automake warnings (& symlinks) 2021-04-21 15:42:37 +02:00
buildtest.sh build: update packaging & docs for dir changes 2024-01-27 19:01:19 +01:00
config.version.in build: carry --with-pkg-extra-version into tarballs 2018-10-24 15:11:50 +02:00
configure.ac build: build: make mgmtd test client build conditional 2024-01-30 15:41:26 -05:00
COPYING *: sort out & explain licenses used in FRR 2023-02-09 12:46:13 +01:00
Makefile.am build: homologize path handling 2024-01-27 19:02:52 +01:00
README.md doc: Fix the link that points to Slack invitation in README 2022-03-24 13:13:37 +02:00
stamp-h.in Initial revision 2002-12-13 20:15:29 +00:00
version.h build: make builddir include path consistent 2021-04-21 15:42:33 +02:00

Icon

FRRouting

FRR is free software that implements and manages various IPv4 and IPv6 routing protocols. It runs on nearly all distributions of Linux and BSD and supports all modern CPU architectures.

FRR currently supports the following protocols:

  • BGP
  • OSPFv2
  • OSPFv3
  • RIPv1
  • RIPv2
  • RIPng
  • IS-IS
  • PIM-SM/MSDP
  • LDP
  • BFD
  • Babel
  • PBR
  • OpenFabric
  • VRRP
  • EIGRP (alpha)
  • NHRP (alpha)

Installation & Use

For source tarballs, see the releases page.

For Debian and its derivatives, use the APT repository at https://deb.frrouting.org/.

Instructions on building and installing from source for supported platforms may be found in the developer docs.

Once installed, please refer to the user guide for instructions on use.

Community

The FRRouting email list server is located here and offers the following public lists:

Topic List
Development dev@lists.frrouting.org
Users & Operators frog@lists.frrouting.org
Announcements announce@lists.frrouting.org

For chat, we currently use Slack. You can join by clicking the "Slack" link under the Participate section of our website.

Contributing

FRR maintains developer's documentation which contains the project workflow and expectations for contributors. Some technical documentation on project internals is also available.

We welcome and appreciate all contributions, no matter how small!

Security

To report security issues, please use our security mailing list:

security [at] lists.frrouting.org