linux-next: manual merge of the net-next tree with the kspp-gustavo tree

From: Stephen Rothwell
Date: Tue Jun 22 2021 - 22:30:27 EST


Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

net/sctp/input.c

between commit:

0572b37b27f4 ("sctp: Fix fall-through warnings for Clang")

from the kspp-gustavo tree and commit:

d83060759a65 ("sctp: extract sctp_v4_err_handle function from sctp_v4_err")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc net/sctp/input.c
index 5ceaf75105ba,fe6429cc012f..000000000000
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@@ -554,6 -556,49 +556,50 @@@ void sctp_err_finish(struct sock *sk, s
sctp_transport_put(t);
}

+ static void sctp_v4_err_handle(struct sctp_transport *t, struct sk_buff *skb,
+ __u8 type, __u8 code, __u32 info)
+ {
+ struct sctp_association *asoc = t->asoc;
+ struct sock *sk = asoc->base.sk;
+ int err = 0;
+
+ switch (type) {
+ case ICMP_PARAMETERPROB:
+ err = EPROTO;
+ break;
+ case ICMP_DEST_UNREACH:
+ if (code > NR_ICMP_UNREACH)
+ return;
+ if (code == ICMP_FRAG_NEEDED) {
+ sctp_icmp_frag_needed(sk, asoc, t, SCTP_TRUNC4(info));
+ return;
+ }
+ if (code == ICMP_PROT_UNREACH) {
+ sctp_icmp_proto_unreachable(sk, asoc, t);
+ return;
+ }
+ err = icmp_err_convert[code].errno;
+ break;
+ case ICMP_TIME_EXCEEDED:
+ if (code == ICMP_EXC_FRAGTIME)
+ return;
+
+ err = EHOSTUNREACH;
+ break;
+ case ICMP_REDIRECT:
+ sctp_icmp_redirect(sk, t, skb);
++ return;
+ default:
+ return;
+ }
+ if (!sock_owned_by_user(sk) && inet_sk(sk)->recverr) {
+ sk->sk_err = err;
+ sk->sk_error_report(sk);
+ } else { /* Only an error on timeout */
+ sk->sk_err_soft = err;
+ }
+ }
+
/*
* This routine is called by the ICMP module when it gets some
* sort of error condition. If err < 0 then the socket should

Attachment: pgpDpOI29binY.pgp
Description: OpenPGP digital signature