Re: [PATCH net-next 10/15] sctp: allow changing transport encap_port by peer packets

2020-10-02 Thread Marcelo Ricardo Leitner
On Tue, Sep 29, 2020 at 09:49:02PM +0800, Xin Long wrote: > static int sctp_udp_rcv(struct sock *sk, struct sk_buff *skb) > { > + memset(skb->cb, 0, sizeof(skb->cb)); > + SCTP_INPUT_CB(skb)->encap_port = ntohs(udp_hdr(skb)->source); Here it's in host order already. The fact that is does

[PATCH net-next 10/15] sctp: allow changing transport encap_port by peer packets

2020-09-29 Thread Xin Long
As rfc6951#section-5.4 says: "After finding the SCTP association (which includes checking the verification tag), the UDP source port MUST be stored as the encapsulation port for the destination address the SCTP packet is received from (see Section 5.1). When a non-encapsulated SCTP