diff options
author | Jeremy Kerr <jk@codeconstruct.com.au> | 2025-07-02 14:20:13 +0800 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2025-07-08 12:39:24 +0200 |
commit | ad39c12fcee34b8980a80ad5c803bca9906fbd4e (patch) | |
tree | 04175b4b2a82e46cccb30145637c3677e7de710f /net/unix/af_unix.c | |
parent | 28ddbb2abe13776d3835f4bda535edd46336870a (diff) |
net: mctp: add gateway routing support
This change allows for gateway routing, where a route table entry
may reference a routable endpoint (by network and EID), instead of
routing directly to a netdevice.
We add support for a RTM_GATEWAY attribute for netlink route updates,
with an attribute format of:
struct mctp_fq_addr {
unsigned int net;
mctp_eid_t eid;
}
- we need the net here to uniquely identify the target EID, as we no
longer have the device reference directly (which would provide the net
id in the case of direct routes).
This makes route lookups recursive, as a route lookup that returns a
gateway route must be resolved into a direct route (ie, to a device)
eventually. We provide a limit to the route lookups, to prevent infinite
loop routing.
The route lookup populates a new 'nexthop' field in the dst structure,
which now specifies the key for the neighbour table lookup on device
output, rather than using the packet destination address directly.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Link: https://patch.msgid.link/20250702-dev-forwarding-v5-13-1468191da8a4@codeconstruct.com.au
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions