Skip to content

Commit b3e528a

Browse files
jk-ozlabsPaolo Abeni
authored andcommitted
net: mctp: unconditionally set skb->dev on dst output
On transmit, we are currently relying on skb->dev being set by mctp_local_output() when we first set up the skb destination fields. However, forwarded skbs do not use the local_output path, so will retain their incoming netdev as their ->dev on tx. This does not work when we're forwarding between interfaces. Set skb->dev unconditionally in the transmit path, to allow for proper forwarding. We keep the skb->dev initialisation in mctp_local_output(), as we use it for fragmentation. Fixes: 269936d ("net: mctp: separate routing database from routing operations") Suggested-by: Vince Chang <vince_chang@aspeedtech.com> Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Link: https://patch.msgid.link/20251125-dev-forward-v1-1-54ecffcd0616@codeconstruct.com.au Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 8ec205e commit b3e528a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

net/mctp/route.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,7 @@ static int mctp_dst_output(struct mctp_dst *dst, struct sk_buff *skb)
623623

624624
skb->protocol = htons(ETH_P_MCTP);
625625
skb->pkt_type = PACKET_OUTGOING;
626+
skb->dev = dst->dev->dev;
626627

627628
if (skb->len > dst->mtu) {
628629
kfree_skb(skb);

0 commit comments

Comments
 (0)