Page MenuHomeFreeBSD

mpls: Add the MPLS routing family and per-FIB label tables
Needs ReviewPublic

Authored by hikmat2337_gmail.com on Sun, Sep 13, 12:22 PM.

Details

Reviewers
melifaro
Summary

Define AF_MPLS, label-stack entry constants, and a canonical exact-match
routing key. Register per-FIB/VNET MPLS radix tables, install the public
headers, and add the kernel option and routing feature declaration.

Validate key lengths, families, padding, reserved labels, and non-label
bits. Propagate prefix-setup failures and release nexthop references on
early prefix-insertion errors. Keep MPLS nexthops in the MPLS table even
when they use IP neighbors, and validate upper-family changes against
the actual neighbor family.

Exclude label routes from routing-socket notifications and dumps and
from non-VNET jail exports. Let a routing family provide locked lookup
before it has a registered FIB algorithm.

Add ktests for key validation, table ownership, creation, replacement,
and withdrawal. Label operations, Netlink configuration, and packet
forwarding follow in separate changes.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 76833
Build 73716: arc lint + arc unit