]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fix up sctp patch for 4.4 and 4.9
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 28 Dec 2019 11:49:39 +0000 (06:49 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 28 Dec 2019 11:49:39 +0000 (06:49 -0500)
queue-4.4/sctp-fully-initialize-v4-addr-in-some-functions.patch
queue-4.9/sctp-fully-initialize-v4-addr-in-some-functions.patch

index c14d11ab4cc60fa9fcdc3da255a85bc0e70f4e60..b48205f0773cfbcc93c11ebaebb58e8e45261255 100644 (file)
@@ -60,20 +60,12 @@ Acked-by: Neil Horman <nhorman@tuxdriver.com>
 Signed-off-by: David S. Miller <davem@davemloft.net>
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 ---
- net/sctp/protocol.c |    5 +++++
- 1 file changed, 5 insertions(+)
+ net/sctp/protocol.c |    ++++
+ 1 file changed, 4 insertions(+)
 
 --- a/net/sctp/protocol.c
 +++ b/net/sctp/protocol.c
-@@ -191,6 +191,7 @@ static void sctp_free_local_addr_list(st
-               list_del(pos);
-               kfree(addr);
-       }
-+      memset(sa->sin_zero, 0, sizeof(sa->sin_zero));
- }
- /* Copy the local addresses which are valid for 'scope' into 'bp'.  */
-@@ -255,6 +256,7 @@ static void sctp_v4_from_sk(union sctp_a
+@@ -255,6 +255,7 @@ static void sctp_v4_from_sk(union sctp_a
        addr->v4.sin_family = AF_INET;
        addr->v4.sin_port = 0;
        addr->v4.sin_addr.s_addr = inet_sk(sk)->inet_rcv_saddr;
@@ -81,7 +73,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  }
  
  /* Initialize sk->sk_rcv_saddr from sctp_addr. */
-@@ -277,6 +279,7 @@ static void sctp_v4_from_addr_param(unio
+@@ -277,6 +278,7 @@ static void sctp_v4_from_addr_param(unio
        addr->v4.sin_family = AF_INET;
        addr->v4.sin_port = port;
        addr->v4.sin_addr.s_addr = param->v4.addr.s_addr;
@@ -89,7 +81,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  }
  
  /* Initialize an address parameter from a sctp_addr and return the length
-@@ -301,6 +304,7 @@ static void sctp_v4_dst_saddr(union sctp
+@@ -301,6 +303,7 @@ static void sctp_v4_dst_saddr(union sctp
        saddr->v4.sin_family = AF_INET;
        saddr->v4.sin_port = port;
        saddr->v4.sin_addr.s_addr = fl4->saddr;
@@ -97,7 +89,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  }
  
  /* Compare two addresses exactly. */
-@@ -323,6 +327,7 @@ static void sctp_v4_inaddr_any(union sct
+@@ -323,6 +326,7 @@ static void sctp_v4_inaddr_any(union sct
        addr->v4.sin_family = AF_INET;
        addr->v4.sin_addr.s_addr = htonl(INADDR_ANY);
        addr->v4.sin_port = port;
index 1057efa4691fc018fcebc7affbdf14afe8476637..dead44c5b1e38566f0728c0c96449b9cb8fac33a 100644 (file)
@@ -60,20 +60,12 @@ Acked-by: Neil Horman <nhorman@tuxdriver.com>
 Signed-off-by: David S. Miller <davem@davemloft.net>
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 ---
- net/sctp/protocol.c |    5 +++++
- 1 file changed, 5 insertions(+)
+ net/sctp/protocol.c |    ++++
+ 1 file changed, 4 insertions(+)
 
 --- a/net/sctp/protocol.c
 +++ b/net/sctp/protocol.c
-@@ -191,6 +191,7 @@ static void sctp_free_local_addr_list(st
-               list_del(pos);
-               kfree(addr);
-       }
-+      memset(sa->sin_zero, 0, sizeof(sa->sin_zero));
- }
- /* Copy the local addresses which are valid for 'scope' into 'bp'.  */
-@@ -257,6 +258,7 @@ static void sctp_v4_from_sk(union sctp_a
+@@ -257,6 +257,7 @@ static void sctp_v4_from_sk(union sctp_a
        addr->v4.sin_family = AF_INET;
        addr->v4.sin_port = 0;
        addr->v4.sin_addr.s_addr = inet_sk(sk)->inet_rcv_saddr;
@@ -81,7 +73,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  }
  
  /* Initialize sk->sk_rcv_saddr from sctp_addr. */
-@@ -279,6 +281,7 @@ static void sctp_v4_from_addr_param(unio
+@@ -279,6 +280,7 @@ static void sctp_v4_from_addr_param(unio
        addr->v4.sin_family = AF_INET;
        addr->v4.sin_port = port;
        addr->v4.sin_addr.s_addr = param->v4.addr.s_addr;
@@ -89,7 +81,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  }
  
  /* Initialize an address parameter from a sctp_addr and return the length
-@@ -303,6 +306,7 @@ static void sctp_v4_dst_saddr(union sctp
+@@ -303,6 +305,7 @@ static void sctp_v4_dst_saddr(union sctp
        saddr->v4.sin_family = AF_INET;
        saddr->v4.sin_port = port;
        saddr->v4.sin_addr.s_addr = fl4->saddr;
@@ -97,7 +89,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  }
  
  /* Compare two addresses exactly. */
-@@ -325,6 +329,7 @@ static void sctp_v4_inaddr_any(union sct
+@@ -325,6 +328,7 @@ static void sctp_v4_inaddr_any(union sct
        addr->v4.sin_family = AF_INET;
        addr->v4.sin_addr.s_addr = htonl(INADDR_ANY);
        addr->v4.sin_port = port;