Source-Changes-HG archive

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

[src/trunk]: src/sys IP6_EXTHDR_GET -> M_REGION_GET, no function...



details:   https://anonhg.NetBSD.org/src/rev/8d6d46fccd79
branches:  trunk
changeset: 319133:8d6d46fccd79
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri May 18 18:58:51 2018 +0000

description:
IP6_EXTHDR_GET -> M_REGION_GET, no functional change.

diffstat:

 sys/netinet/dccp_usrreq.c  |  8 ++++----
 sys/netinet/ip_carp.c      |  6 +++---
 sys/netinet/tcp_input.c    |  9 ++++-----
 sys/netinet/tcp_sack.c     |  5 ++---
 sys/netinet/udp_usrreq.c   |  9 ++++-----
 sys/netipsec/ipsec_input.c |  8 ++++----
 sys/netipsec/xform_ah.c    |  6 +++---
 sys/netipsec/xform_esp.c   |  6 +++---
 8 files changed, 27 insertions(+), 30 deletions(-)

diffs (268 lines):

diff -r 43822943577d -r 8d6d46fccd79 sys/netinet/dccp_usrreq.c
--- a/sys/netinet/dccp_usrreq.c Fri May 18 18:52:17 2018 +0000
+++ b/sys/netinet/dccp_usrreq.c Fri May 18 18:58:51 2018 +0000
@@ -1,5 +1,5 @@
 /*     $KAME: dccp_usrreq.c,v 1.67 2005/11/03 16:05:04 nishida Exp $   */
-/*     $NetBSD: dccp_usrreq.c,v 1.18 2018/05/03 07:01:08 maxv Exp $ */
+/*     $NetBSD: dccp_usrreq.c,v 1.19 2018/05/18 18:58:51 maxv Exp $ */
 
 /*
  * Copyright (c) 2003 Joacim Häggmark, Magnus Erixzon, Nils-Erik Mattsson 
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dccp_usrreq.c,v 1.18 2018/05/03 07:01:08 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dccp_usrreq.c,v 1.19 2018/05/18 18:58:51 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -230,7 +230,7 @@
        if (isipv6) {
                DCCP_DEBUG((LOG_INFO, "Got DCCP ipv6 packet, iphlen = %u!\n", iphlen));
                ip6 = mtod(m, struct ip6_hdr *);
-               IP6_EXTHDR_GET(dh, struct dccphdr *, m, iphlen, sizeof(*dh));
+               M_REGION_GET(dh, struct dccphdr *, m, iphlen, sizeof(*dh));
                if (dh == NULL) {
                        dccpstat.dccps_badlen++;
                        return;
@@ -256,7 +256,7 @@
                 * Get IP and DCCP header together in first mbuf.
                 */
                ip = mtod(m, struct ip *);
-               IP6_EXTHDR_GET(dh, struct dccphdr *, m, iphlen, sizeof(*dh));
+               M_REGION_GET(dh, struct dccphdr *, m, iphlen, sizeof(*dh));
                if (dh == NULL) {
                        dccpstat.dccps_badlen++;
                        return;
diff -r 43822943577d -r 8d6d46fccd79 sys/netinet/ip_carp.c
--- a/sys/netinet/ip_carp.c     Fri May 18 18:52:17 2018 +0000
+++ b/sys/netinet/ip_carp.c     Fri May 18 18:58:51 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_carp.c,v 1.95 2018/03/21 15:33:25 maxv Exp $        */
+/*     $NetBSD: ip_carp.c,v 1.96 2018/05/18 18:58:51 maxv Exp $        */
 /*     $OpenBSD: ip_carp.c,v 1.113 2005/11/04 08:11:54 mcbride Exp $   */
 
 /*
@@ -33,7 +33,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_carp.c,v 1.95 2018/03/21 15:33:25 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_carp.c,v 1.96 2018/05/18 18:58:51 maxv Exp $");
 
 /*
  * TODO:
@@ -615,7 +615,7 @@
 
        /* verify that we have a complete carp packet */
        len = m->m_len;
-       IP6_EXTHDR_GET(ch, struct carp_header *, m, off, sizeof(*ch));
+       M_REGION_GET(ch, struct carp_header *, m, off, sizeof(*ch));
        if (ch == NULL) {
                CARP_STATINC(CARP_STAT_BADLEN);
                CARP_LOG(sc, ("packet size %u too small", len));
diff -r 43822943577d -r 8d6d46fccd79 sys/netinet/tcp_input.c
--- a/sys/netinet/tcp_input.c   Fri May 18 18:52:17 2018 +0000
+++ b/sys/netinet/tcp_input.c   Fri May 18 18:58:51 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcp_input.c,v 1.407 2018/05/03 07:13:48 maxv Exp $     */
+/*     $NetBSD: tcp_input.c,v 1.408 2018/05/18 18:58:51 maxv Exp $     */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -148,7 +148,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.407 2018/05/03 07:13:48 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.408 2018/05/18 18:58:51 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -200,7 +200,6 @@
 #endif
 
 #ifndef INET6
-/* always need ip6.h for IP6_EXTHDR_GET */
 #include <netinet/ip6.h>
 #endif
 
@@ -1238,7 +1237,7 @@
        }
 #endif
 
-       IP6_EXTHDR_GET(th, struct tcphdr *, m, toff, sizeof(struct tcphdr));
+       M_REGION_GET(th, struct tcphdr *, m, toff, sizeof(struct tcphdr));
        if (th == NULL) {
                TCP_STATINC(TCP_STAT_RCVSHORT);
                return;
@@ -1336,7 +1335,7 @@
        tlen -= off;
 
        if (off > sizeof(struct tcphdr)) {
-               IP6_EXTHDR_GET(th, struct tcphdr *, m, toff, off);
+               M_REGION_GET(th, struct tcphdr *, m, toff, off);
                if (th == NULL) {
                        TCP_STATINC(TCP_STAT_RCVSHORT);
                        return;
diff -r 43822943577d -r 8d6d46fccd79 sys/netinet/tcp_sack.c
--- a/sys/netinet/tcp_sack.c    Fri May 18 18:52:17 2018 +0000
+++ b/sys/netinet/tcp_sack.c    Fri May 18 18:58:51 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tcp_sack.c,v 1.35 2018/05/03 07:13:48 maxv Exp $ */
+/* $NetBSD: tcp_sack.c,v 1.36 2018/05/18 18:58:51 maxv Exp $ */
 
 /*
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -102,7 +102,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_sack.c,v 1.35 2018/05/03 07:13:48 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_sack.c,v 1.36 2018/05/18 18:58:51 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -144,7 +144,6 @@
 #endif
 
 #ifndef INET6
-/* always need ip6.h for IP6_EXTHDR_GET */
 #include <netinet/ip6.h>
 #endif
 
diff -r 43822943577d -r 8d6d46fccd79 sys/netinet/udp_usrreq.c
--- a/sys/netinet/udp_usrreq.c  Fri May 18 18:52:17 2018 +0000
+++ b/sys/netinet/udp_usrreq.c  Fri May 18 18:58:51 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: udp_usrreq.c,v 1.251 2018/05/13 18:39:06 maxv Exp $    */
+/*     $NetBSD: udp_usrreq.c,v 1.252 2018/05/18 18:58:51 maxv Exp $    */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.251 2018/05/13 18:39:06 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.252 2018/05/18 18:58:51 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -111,7 +111,6 @@
 #endif
 
 #ifndef INET6
-/* always need ip6.h for IP6_EXTHDR_GET */
 #include <netinet/ip6.h>
 #endif
 
@@ -337,7 +336,7 @@
         * Get IP and UDP header together in first mbuf.
         */
        ip = mtod(m, struct ip *);
-       IP6_EXTHDR_GET(uh, struct udphdr *, m, iphlen, sizeof(struct udphdr));
+       M_REGION_GET(uh, struct udphdr *, m, iphlen, sizeof(struct udphdr));
        if (uh == NULL) {
                UDP_STATINC(UDP_STAT_HDROPS);
                return;
@@ -403,7 +402,7 @@
        }
 
        ip = mtod(m, struct ip *);
-       IP6_EXTHDR_GET(uh, struct udphdr *, m, iphlen, sizeof(struct udphdr));
+       M_REGION_GET(uh, struct udphdr *, m, iphlen, sizeof(struct udphdr));
        if (uh == NULL) {
                UDP_STATINC(UDP_STAT_HDROPS);
                return;
diff -r 43822943577d -r 8d6d46fccd79 sys/netipsec/ipsec_input.c
--- a/sys/netipsec/ipsec_input.c        Fri May 18 18:52:17 2018 +0000
+++ b/sys/netipsec/ipsec_input.c        Fri May 18 18:58:51 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ipsec_input.c,v 1.69 2018/04/29 14:54:09 maxv Exp $    */
+/*     $NetBSD: ipsec_input.c,v 1.70 2018/05/18 19:02:49 maxv Exp $    */
 /*     $FreeBSD: ipsec_input.c,v 1.2.4.2 2003/03/28 20:32:53 sam Exp $ */
 /*     $OpenBSD: ipsec_input.c,v 1.63 2003/02/20 18:35:43 deraadt Exp $        */
 
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.69 2018/04/29 14:54:09 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.70 2018/05/18 19:02:49 maxv Exp $");
 
 /*
  * IPsec input processing.
@@ -139,7 +139,7 @@
 
        switch (ip->ip_p) {
        case IPPROTO_TCP:
-               IP6_EXTHDR_GET(th, struct tcphdr *, m, poff, sizeof(*th));
+               M_REGION_GET(th, struct tcphdr *, m, poff, sizeof(*th));
                if (th == NULL)
                        return NULL;
                off = th->th_off << 2;
@@ -151,7 +151,7 @@
                th->th_sum = in4_cksum(m, IPPROTO_TCP, poff, plen);
                break;
        case IPPROTO_UDP:
-               IP6_EXTHDR_GET(uh, struct udphdr *, m, poff, sizeof(*uh));
+               M_REGION_GET(uh, struct udphdr *, m, poff, sizeof(*uh));
                if (uh == NULL)
                        return NULL;
                off = sizeof(*uh);
diff -r 43822943577d -r 8d6d46fccd79 sys/netipsec/xform_ah.c
--- a/sys/netipsec/xform_ah.c   Fri May 18 18:52:17 2018 +0000
+++ b/sys/netipsec/xform_ah.c   Fri May 18 18:58:51 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xform_ah.c,v 1.100 2018/05/13 18:34:59 maxv Exp $      */
+/*     $NetBSD: xform_ah.c,v 1.101 2018/05/18 19:02:49 maxv Exp $      */
 /*     $FreeBSD: xform_ah.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $    */
 /*     $OpenBSD: ip_ah.c,v 1.63 2001/06/26 06:18:58 angelos Exp $ */
 /*
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.100 2018/05/13 18:34:59 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.101 2018/05/18 19:02:49 maxv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -530,7 +530,7 @@
        rplen = HDRSIZE(sav);
 
        /* XXX don't pullup, just copy header */
-       IP6_EXTHDR_GET(ah, struct newah *, m, skip, rplen);
+       M_REGION_GET(ah, struct newah *, m, skip, rplen);
        if (ah == NULL) {
                /* m already freed */
                return ENOBUFS;
diff -r 43822943577d -r 8d6d46fccd79 sys/netipsec/xform_esp.c
--- a/sys/netipsec/xform_esp.c  Fri May 18 18:52:17 2018 +0000
+++ b/sys/netipsec/xform_esp.c  Fri May 18 18:58:51 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xform_esp.c,v 1.88 2018/05/13 18:34:59 maxv Exp $      */
+/*     $NetBSD: xform_esp.c,v 1.89 2018/05/18 19:02:49 maxv Exp $      */
 /*     $FreeBSD: xform_esp.c,v 1.2.2.1 2003/01/24 05:11:36 sam Exp $   */
 /*     $OpenBSD: ip_esp.c,v 1.69 2001/06/26 06:18:59 angelos Exp $ */
 
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xform_esp.c,v 1.88 2018/05/13 18:34:59 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_esp.c,v 1.89 2018/05/18 19:02:49 maxv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -309,7 +309,7 @@
            skip, m->m_pkthdr.len);
 
        /* XXX don't pullup, just copy header */
-       IP6_EXTHDR_GET(esp, struct newesp *, m, skip, sizeof(struct newesp));
+       M_REGION_GET(esp, struct newesp *, m, skip, sizeof(struct newesp));
        if (esp == NULL) {
                /* m already freed */
                return ENOBUFS;



Home | Main Index | Thread Index | Old Index