Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6]: src/sys/netinet6 Ooops, remainder of Ticket #1523, accidently...



details:   https://anonhg.NetBSD.org/src/rev/0a3b40b2ec50
branches:  netbsd-6
changeset: 777272:0a3b40b2ec50
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Jan 30 22:10:20 2018 +0000

description:
Ooops, remainder of Ticket #1523, accidently not commited previously

diffstat:

 sys/netinet6/ah_input.c     |  7 ++++---
 sys/netinet6/esp_input.c    |  7 ++++---
 sys/netinet6/ipcomp_input.c |  7 ++++---
 3 files changed, 12 insertions(+), 9 deletions(-)

diffs (84 lines):

diff -r 17ae2d61fd20 -r 0a3b40b2ec50 sys/netinet6/ah_input.c
--- a/sys/netinet6/ah_input.c   Tue Jan 30 18:45:16 2018 +0000
+++ b/sys/netinet6/ah_input.c   Tue Jan 30 22:10:20 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ah_input.c,v 1.59 2011/07/17 20:54:53 joerg Exp $      */
+/*     $NetBSD: ah_input.c,v 1.59.8.1 2018/01/30 22:10:20 martin Exp $ */
 /*     $KAME: ah_input.c,v 1.64 2001/09/04 08:43:19 itojun Exp $       */
 
 /*
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ah_input.c,v 1.59 2011/07/17 20:54:53 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ah_input.c,v 1.59.8.1 2018/01/30 22:10:20 martin Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -858,7 +858,8 @@
                 * next header field of the previous header.
                 * This is necessary because AH will be stripped off below.
                 */
-               prvnxtp = ip6_get_prevhdr(m, off); /* XXX */
+               const int prvnxt = ip6_get_prevhdr(m, off);
+               prvnxtp = (mtod(m, u_int8_t *) + prvnxt); /* XXX */
                *prvnxtp = nxt;
 
                ip6 = mtod(m, struct ip6_hdr *);
diff -r 17ae2d61fd20 -r 0a3b40b2ec50 sys/netinet6/esp_input.c
--- a/sys/netinet6/esp_input.c  Tue Jan 30 18:45:16 2018 +0000
+++ b/sys/netinet6/esp_input.c  Tue Jan 30 22:10:20 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: esp_input.c,v 1.50 2011/07/17 20:54:53 joerg Exp $     */
+/*     $NetBSD: esp_input.c,v 1.50.8.1 2018/01/30 22:10:20 martin Exp $        */
 /*     $KAME: esp_input.c,v 1.60 2001/09/04 08:43:19 itojun Exp $      */
 
 /*
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: esp_input.c,v 1.50 2011/07/17 20:54:53 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esp_input.c,v 1.50.8.1 2018/01/30 22:10:20 martin Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -834,7 +834,8 @@
                /*
                 * Set the next header field of the previous header correctly.
                 */
-               prvnxtp = ip6_get_prevhdr(m, off); /* XXX */
+               const int prvnxt = ip6_get_prevhdr(m, off);
+               prvnxtp = (mtod(m, u_int8_t *) + prvnxt); /* XXX */
                *prvnxtp = nxt;
 
                stripsiz = esplen + ivlen;
diff -r 17ae2d61fd20 -r 0a3b40b2ec50 sys/netinet6/ipcomp_input.c
--- a/sys/netinet6/ipcomp_input.c       Tue Jan 30 18:45:16 2018 +0000
+++ b/sys/netinet6/ipcomp_input.c       Tue Jan 30 22:10:20 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ipcomp_input.c,v 1.38 2011/07/17 20:54:53 joerg Exp $  */
+/*     $NetBSD: ipcomp_input.c,v 1.38.8.1 2018/01/30 22:10:20 martin Exp $     */
 /*     $KAME: ipcomp_input.c,v 1.29 2001/09/04 08:43:19 itojun Exp $   */
 
 /*
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipcomp_input.c,v 1.38 2011/07/17 20:54:53 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipcomp_input.c,v 1.38.8.1 2018/01/30 22:10:20 martin Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -352,7 +352,8 @@
        m->m_flags |= M_DECRYPTED;
 
        /* update next header field */
-       prvnxtp = ip6_get_prevhdr(m, off);
+       const int prvnxt = ip6_get_prevhdr(m, off);
+       prvnxtp = (mtod(m, u_int8_t *) + prvnxt); /* XXX */
        *prvnxtp = nxt;
 
        /*



Home | Main Index | Thread Index | Old Index