Go to file
Philippe Guibert 7bae48960e zebra: handle nexthop vrf_id in ZEBRA_MPLS_LABELS messages
This commit addresses the case where a service wants to install
an LSP entry to a next-hop located in a VRF instance. The incoming
MPLS packet is on the namespace and has to be directed to a nexthop
located behind an interface that sits in a specific VRF instance.
The below iproute command can illustrate:

  > ip link add vrf1 type vrf table 10
  > ip link set dev vrf1 up
  > ip link set dev eth0 master vrf1
  > ip a a 192.0.2.1/24 dev eth0
  > ip -f mpls route add 105 via inet 192.0.2.45 dev eth0

If a service uses the ZEBRA_MPLS_LABELS messages, then the LSP
message is ignored: from zebra perspective, the MPLS entries are
visible via the 'show mpls table' command, but no LSP entry is
installed in the kernel.

The issue is in the nhlfe_nexthop_active_ipv[4/6] function: the
outgoing interface mentioned in the nexthop is searched in the
main VRF, whereas the interface is in a separate VRF. The interface
is not found, and the nhlfe to install is considered not active.

To address this issue, reuse the incoming vrf_id parameter transmitted
in the nexthop structure from the ZEBRA_MPLS_LABELS message. When
creating an NHLFE entry, the vrf_id is used instead of the DEFAULT_VRF.
And the nhlfe entry can be considered as active.

One alternate solution to reuse the vrf_id parameter in the mpls network
context would be to modify the search function in nhlfe_nexthop_active..()
function: looking for an existing ifindex in the zns. However, this
solution may not fit later when netns backend would be used.

Note that some changes have not been done yet and are considered
sufficient for now:
- The 'nhlfe_find' API: the assumption is done that only the linux vrf
backend is used for now.

- The 'mpls_lsp_install()' API: It is currently used by the CLI command
which does not handle the interface parameter, and the SRTE service, whih
always sends LSPs towards a nexthop located in the VRF_DEFAULT.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-05-09 21:00:57 +02:00
.github github: Add rebase label on PR if it's > 50 commits behind 2023-05-09 09:37:23 +03:00
alpine docker: Enable Lua (scripting) for Alpine images 2023-04-08 21:04:07 +03:00
babeld Merge pull request #13354 from zmw12306/parse_request_subtlv 2023-05-02 10:28:20 -04:00
bfdd *: Convert event.h to frrevent.h 2023-03-24 08:32:17 -04:00
bgpd Merge pull request #13437 from raja-rajasekar/raja-rajasekar/show_cmd_fix 2023-05-09 12:51:16 +03:00
debian mgmtd: nb library for client front-end code 2023-03-21 22:08:32 -04:00
doc doc: add documentation for show [ip] bgp [vrf] [afi] [safi] detail [json] 2023-05-08 13:17:47 -07:00
docker Merge pull request #12797 from jvidalallende/ubi8_minimal_dockerfile 2023-04-12 05:47:38 +00:00
eigrpd *: Convert event.h to frrevent.h 2023-03-24 08:32:17 -04:00
fpm *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
gdb *: Rename thread.[ch] to event.[ch] 2023-03-24 08:32:16 -04:00
grpc *: manual SPDX License ID conversions 2023-02-09 14:09:07 +01:00
include Merge pull request #12780 from opensourcerouting/spdx-license-id 2023-02-17 09:43:05 -05:00
isisd Merge pull request #13376 from louis-6wind/fix-flex-algo-mem-leak 2023-05-02 11:33:38 -04:00
ldpd ldpd: changes for code maintainability 2023-05-09 18:45:27 +05:30
lib Merge pull request #13413 from chiragshah6/fdev2 2023-05-08 14:36:07 -04:00
m4 build: fix sed regex in Lua macro 2022-12-08 12:39:17 +01:00
mgmtd mgmtd: simplify commit id to just be a timeval string 2023-05-04 14:47:55 -04:00
mlag build: fix AM_LDFLAGS usage (and gcov) 2021-07-21 17:10:08 +02:00
nhrpd nhrpd: Fix nhrpd memory leak 2023-04-24 11:18:39 +04:00
ospf6d ospf6d: missing ECMP NHs in certain topologies 2023-04-13 07:55:03 -04:00
ospfclient *: Convert event.h to frrevent.h 2023-03-24 08:32:17 -04:00
ospfd ospfd: Fix memory leaks w/ show ip ospf int X json commands 2023-05-04 12:56:13 -04:00
pathd Merge pull request #12933 from Orange-OpenSource/link_state 2023-04-20 18:33:21 +02:00
pbrd *: Convert event.h to frrevent.h 2023-03-24 08:32:17 -04:00
pceplib *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
pimd pimd: replace CPP_NOTICE lines with TODO comments 2023-05-04 10:26:33 -04:00
pkgsrc mgmtd: Bringup MGMTD daemon and datastore module support 2023-03-21 22:08:32 -04:00
python mgmtd: fully implement debug flags for mgmtd and clients 2023-05-01 13:47:12 -04:00
qpb mgmtd: Bringup MGMTD daemon and datastore module support 2023-03-21 22:08:32 -04:00
redhat mgmtd: Bringup MGMTD daemon and datastore module support 2023-03-21 22:08:32 -04:00
ripd ripd: fix another memtype mismatch 2023-05-08 12:30:50 -03:00
ripngd lib: convert if_rmap config output to northbound 2023-04-12 17:17:03 +03:00
sharpd Merge pull request #12933 from Orange-OpenSource/link_state 2023-04-20 18:33:21 +02:00
snapcraft snapcraft: Add pim6 daemon for PIM IPv6 to snap package 2022-11-19 12:52:36 +01:00
staticd mgmtd: fully implement debug flags for mgmtd and clients 2023-05-01 13:47:12 -04:00
tests Merge pull request #13438 from gpnaveen/vrf_on_loopback 2023-05-09 13:39:18 -04:00
tools style: add format checker config that matches FRR style standards 2023-04-18 05:18:26 -04:00
vrrpd lib: Remove getopt.c and getopt1.c 2023-03-28 10:07:38 -04:00
vtysh lib,vtysh,isisd,yang: algo cli/yang/callbacks 2023-04-18 10:13:59 +02:00
watchfrr *: Convert event.h to frrevent.h 2023-03-24 08:32:17 -04:00
yang Merge pull request #13246 from opensourcerouting/rip-bfd 2023-04-25 11:54:32 -04:00
zebra zebra: handle nexthop vrf_id in ZEBRA_MPLS_LABELS messages 2023-05-09 21:00:57 +02:00
.clang-format mgmtd: Add MGMT Transaction Framework 2023-03-21 22:08:32 -04: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 style: add format checker config that matches FRR style standards 2023-04-18 05:18:26 -04: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 *: manual SPDX License ID conversions 2023-02-09 14:09:07 +01:00
config.version.in build: carry --with-pkg-extra-version into tarballs 2018-10-24 15:11:50 +02:00
configure.ac lib: add build option to set startup log timestemp precision 2023-04-29 02:36:06 -04:00
COPYING *: sort out & explain licenses used in FRR 2023-02-09 12:46:13 +01:00
Makefile.am build: clean up mgmtd lib protobuf make syntax 2023-03-27 16:44:27 -04: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