Skip to content

Commit 773ece4

Browse files
lxingregkh
authored andcommitted
sctp: fix missing encap_port propagation for GSO fragments
[ Upstream commit bf6f95a ] encap_port in SCTP_INPUT_CB(skb) is used by sctp_vtag_verify() for SCTP-over-UDP processing. In the GSO case, it is only set on the head skb, while fragment skbs leave it 0. This results in fragment skbs seeing encap_port == 0, breaking SCTP-over-UDP connections. Fix it by propagating encap_port from the head skb cb when initializing fragment skbs in sctp_inq_pop(). Fixes: 046c052 ("sctp: enable udp tunneling socks") Signed-off-by: Xin Long <lucien.xin@gmail.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Link: https://patch.msgid.link/ea65ed61b3598d8b4940f0170b9aa1762307e6c3.1776017631.git.lucien.xin@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 3e45b1c commit 773ece4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

net/sctp/inqueue.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ struct sctp_chunk *sctp_inq_pop(struct sctp_inq *queue)
201201

202202
cb->chunk = head_cb->chunk;
203203
cb->af = head_cb->af;
204+
cb->encap_port = head_cb->encap_port;
204205
}
205206
}
206207

0 commit comments

Comments
 (0)