Skip to content

Commit 70c2196

Browse files
mctpd: fix route creation for bridged gatewayed endpoints
if ifindex is zero and mctp_fq_addr is valid then only gateway routes are created. Fix: update ifindex as zero for gateway route. Signed-off-by: Faizan Ali <[email protected]>
1 parent 3c15e0c commit 70c2196

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/mctpd.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4988,8 +4988,7 @@ static int endpoint_allocate_eids(struct peer *peer)
49884988
gw_addr.net = peer->net;
49894989
gw_addr.eid = peer->eid;
49904990
rc = mctp_nl_route_add(peer->ctx->nl, peer->pool_start,
4991-
peer->pool_size - 1, peer->phys.ifindex,
4992-
&gw_addr, peer->mtu);
4991+
peer->pool_size - 1, 0, &gw_addr, peer->mtu);
49934992
if (rc < 0 && rc != -EEXIST) {
49944993
warnx("Failed to add gateway route for EID %d: %s", gw_addr.eid,
49954994
strerror(-rc));

0 commit comments

Comments
 (0)