Module Name: src
Committed By: maxv
Date: Thu Nov 15 10:23:57 UTC 2018
Modified Files:
src/share/man/man9: m_tag.9
src/sys/altq: altq_cbq.c altq_hfsc.c altq_priq.c altq_red.c
src/sys/dev/ieee1394: if_fwip.c
src/sys/dist/pf/net: pf_mtag.c
src/sys/kern: uipc_mbuf.c
src/sys/net: if.c if_ethersubr.c if_ieee1394subr.c
src/sys/net/npf: npf_mbuf.c
src/sys/netcan: can.c
src/sys/netinet: ip_icmp.c ip_input.c
src/sys/netinet6: ip6_input.c
src/sys/netipsec: ipsec.h ipsec_input.c ipsecif.c
src/sys/sys: mbuf.h
Log Message:
Remove the 't' argument from m_tag_find().
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/share/man/man9/m_tag.9
cvs rdiff -u -r1.31 -r1.32 src/sys/altq/altq_cbq.c
cvs rdiff -u -r1.27 -r1.28 src/sys/altq/altq_hfsc.c
cvs rdiff -u -r1.25 -r1.26 src/sys/altq/altq_priq.c
cvs rdiff -u -r1.30 -r1.31 src/sys/altq/altq_red.c
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/ieee1394/if_fwip.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dist/pf/net/pf_mtag.c
cvs rdiff -u -r1.222 -r1.223 src/sys/kern/uipc_mbuf.c
cvs rdiff -u -r1.440 -r1.441 src/sys/net/if.c
cvs rdiff -u -r1.270 -r1.271 src/sys/net/if_ethersubr.c
cvs rdiff -u -r1.63 -r1.64 src/sys/net/if_ieee1394subr.c
cvs rdiff -u -r1.21 -r1.22 src/sys/net/npf/npf_mbuf.c
cvs rdiff -u -r1.5 -r1.6 src/sys/netcan/can.c
cvs rdiff -u -r1.175 -r1.176 src/sys/netinet/ip_icmp.c
cvs rdiff -u -r1.386 -r1.387 src/sys/netinet/ip_input.c
cvs rdiff -u -r1.204 -r1.205 src/sys/netinet6/ip6_input.c
cvs rdiff -u -r1.84 -r1.85 src/sys/netipsec/ipsec.h
cvs rdiff -u -r1.72 -r1.73 src/sys/netipsec/ipsec_input.c
cvs rdiff -u -r1.10 -r1.11 src/sys/netipsec/ipsecif.c
cvs rdiff -u -r1.212 -r1.213 src/sys/sys/mbuf.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/share/man/man9/m_tag.9
diff -u src/share/man/man9/m_tag.9:1.7 src/share/man/man9/m_tag.9:1.8
--- src/share/man/man9/m_tag.9:1.7 Thu Nov 15 10:06:06 2018
+++ src/share/man/man9/m_tag.9 Thu Nov 15 10:23:55 2018
@@ -1,4 +1,4 @@
-.\" $NetBSD: m_tag.9,v 1.7 2018/11/15 10:06:06 maxv Exp $
+.\" $NetBSD: m_tag.9,v 1.8 2018/11/15 10:23:55 maxv Exp $
.\"
.\" Copyright (c)2004 YAMAMOTO Takashi,
.\" All rights reserved.
@@ -56,7 +56,7 @@
.Ft void
.Fn m_tag_delete_chain "struct mbuf *m"
.Ft struct m_tag *
-.Fn m_tag_find "struct mbuf *m" "int type" "struct m_tag *t"
+.Fn m_tag_find "struct mbuf *m" "int type"
.Ft struct m_tag *
.Fn m_tag_copy "struct m_tag *m"
.Ft int
@@ -121,18 +121,11 @@ followed by
Unlink and free mbuf tags from the mbuf
.Fa m .
.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-.It Fn m_tag_find "m" "type" "t"
+.It Fn m_tag_find "m" "type"
Find an mbuf tag with type
.Fa type
-after the mbuf tag
-.Fa t
in the tag chain associated with the mbuf
.Fa m .
-If
-.Fa t
-is
-.Dv NULL ,
-search from the first mbuf tag.
If an mbuf tag is found, return a pointer to it.
Otherwise return
.Dv NULL .
Index: src/sys/altq/altq_cbq.c
diff -u src/sys/altq/altq_cbq.c:1.31 src/sys/altq/altq_cbq.c:1.32
--- src/sys/altq/altq_cbq.c:1.31 Fri Jul 28 13:53:17 2017
+++ src/sys/altq/altq_cbq.c Thu Nov 15 10:23:55 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: altq_cbq.c,v 1.31 2017/07/28 13:53:17 riastradh Exp $ */
+/* $NetBSD: altq_cbq.c,v 1.32 2018/11/15 10:23:55 maxv Exp $ */
/* $KAME: altq_cbq.c,v 1.21 2005/04/13 03:44:24 suz Exp $ */
/*
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altq_cbq.c,v 1.31 2017/07/28 13:53:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_cbq.c,v 1.32 2018/11/15 10:23:55 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_altq.h"
@@ -514,7 +514,7 @@ cbq_enqueue(struct ifaltq *ifq, struct m
return (ENOBUFS);
}
cl = NULL;
- if ((t = m_tag_find(m, PACKET_TAG_ALTQ_QID, NULL)) != NULL)
+ if ((t = m_tag_find(m, PACKET_TAG_ALTQ_QID)) != NULL)
cl = clh_to_clp(cbqp, ((struct altq_tag *)(t+1))->qid);
#ifdef ALTQ3_COMPAT
else if (ifq->altq_flags & ALTQF_CLASSIFY)
Index: src/sys/altq/altq_hfsc.c
diff -u src/sys/altq/altq_hfsc.c:1.27 src/sys/altq/altq_hfsc.c:1.28
--- src/sys/altq/altq_hfsc.c:1.27 Fri Jul 28 13:53:17 2017
+++ src/sys/altq/altq_hfsc.c Thu Nov 15 10:23:55 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: altq_hfsc.c,v 1.27 2017/07/28 13:53:17 riastradh Exp $ */
+/* $NetBSD: altq_hfsc.c,v 1.28 2018/11/15 10:23:55 maxv Exp $ */
/* $KAME: altq_hfsc.c,v 1.26 2005/04/13 03:44:24 suz Exp $ */
/*
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altq_hfsc.c,v 1.27 2017/07/28 13:53:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_hfsc.c,v 1.28 2018/11/15 10:23:55 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_altq.h"
@@ -683,7 +683,7 @@ hfsc_enqueue(struct ifaltq *ifq, struct
return (ENOBUFS);
}
cl = NULL;
- if ((t = m_tag_find(m, PACKET_TAG_ALTQ_QID, NULL)) != NULL)
+ if ((t = m_tag_find(m, PACKET_TAG_ALTQ_QID)) != NULL)
cl = clh_to_clp(hif, ((struct altq_tag *)(t+1))->qid);
#ifdef ALTQ3_COMPAT
else if ((ifq->altq_flags & ALTQF_CLASSIFY))
Index: src/sys/altq/altq_priq.c
diff -u src/sys/altq/altq_priq.c:1.25 src/sys/altq/altq_priq.c:1.26
--- src/sys/altq/altq_priq.c:1.25 Fri Jun 15 08:34:18 2018
+++ src/sys/altq/altq_priq.c Thu Nov 15 10:23:55 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: altq_priq.c,v 1.25 2018/06/15 08:34:18 mrg Exp $ */
+/* $NetBSD: altq_priq.c,v 1.26 2018/11/15 10:23:55 maxv Exp $ */
/* $KAME: altq_priq.c,v 1.13 2005/04/13 03:44:25 suz Exp $ */
/*
* Copyright (C) 2000-2003
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altq_priq.c,v 1.25 2018/06/15 08:34:18 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_priq.c,v 1.26 2018/11/15 10:23:55 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_altq.h"
@@ -442,7 +442,7 @@ priq_enqueue(struct ifaltq *ifq, struct
return (ENOBUFS);
}
cl = NULL;
- if ((t = m_tag_find(m, PACKET_TAG_ALTQ_QID, NULL)) != NULL)
+ if ((t = m_tag_find(m, PACKET_TAG_ALTQ_QID)) != NULL)
cl = clh_to_clp(pif, ((struct altq_tag *)(t+1))->qid);
#ifdef ALTQ3_COMPAT
else if (ifq->altq_flags & ALTQF_CLASSIFY)
Index: src/sys/altq/altq_red.c
diff -u src/sys/altq/altq_red.c:1.30 src/sys/altq/altq_red.c:1.31
--- src/sys/altq/altq_red.c:1.30 Wed Apr 20 08:58:48 2016
+++ src/sys/altq/altq_red.c Thu Nov 15 10:23:55 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: altq_red.c,v 1.30 2016/04/20 08:58:48 knakahara Exp $ */
+/* $NetBSD: altq_red.c,v 1.31 2018/11/15 10:23:55 maxv Exp $ */
/* $KAME: altq_red.c,v 1.20 2005/04/13 03:44:25 suz Exp $ */
/*
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altq_red.c,v 1.30 2016/04/20 08:58:48 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_red.c,v 1.31 2018/11/15 10:23:55 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_altq.h"
@@ -527,7 +527,7 @@ mark_ecn(struct mbuf *m, struct altq_pkt
void *hdr;
int af;
- t = m_tag_find(m, PACKET_TAG_ALTQ_QID, NULL);
+ t = m_tag_find(m, PACKET_TAG_ALTQ_QID);
if (t != NULL) {
at = (struct altq_tag *)(t + 1);
if (at == NULL)
Index: src/sys/dev/ieee1394/if_fwip.c
diff -u src/sys/dev/ieee1394/if_fwip.c:1.28 src/sys/dev/ieee1394/if_fwip.c:1.29
--- src/sys/dev/ieee1394/if_fwip.c:1.28 Mon Sep 3 16:29:31 2018
+++ src/sys/dev/ieee1394/if_fwip.c Thu Nov 15 10:23:55 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: if_fwip.c,v 1.28 2018/09/03 16:29:31 riastradh Exp $ */
+/* $NetBSD: if_fwip.c,v 1.29 2018/11/15 10:23:55 maxv Exp $ */
/*-
* Copyright (c) 2004
* Doug Rabson
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_fwip.c,v 1.28 2018/09/03 16:29:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_fwip.c,v 1.29 2018/11/15 10:23:55 maxv Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -567,7 +567,7 @@ fwip_async_output(struct fwip_softc *sc,
* discovery. If we don't have a link-level address,
* just stick the thing on the broadcast channel.
*/
- mtag = m_tag_find(m, MTAG_FIREWIRE_HWADDR, 0);
+ mtag = m_tag_find(m, MTAG_FIREWIRE_HWADDR);
if (mtag == NULL)
destfw = 0;
else
Index: src/sys/dist/pf/net/pf_mtag.c
diff -u src/sys/dist/pf/net/pf_mtag.c:1.2 src/sys/dist/pf/net/pf_mtag.c:1.3
--- src/sys/dist/pf/net/pf_mtag.c:1.2 Wed Jun 18 09:06:27 2008
+++ src/sys/dist/pf/net/pf_mtag.c Thu Nov 15 10:23:55 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: pf_mtag.c,v 1.2 2008/06/18 09:06:27 yamt Exp $ */
+/* $NetBSD: pf_mtag.c,v 1.3 2018/11/15 10:23:55 maxv Exp $ */
/* $OpenBSD: pf.c,v 1.504 2005/10/17 08:43:35 henning Exp $ */
/*
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pf_mtag.c,v 1.2 2008/06/18 09:06:27 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pf_mtag.c,v 1.3 2018/11/15 10:23:55 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -51,7 +51,7 @@ pf_find_mtag(struct mbuf *m)
{
struct m_tag *mtag;
- if ((mtag = m_tag_find(m, PACKET_TAG_PF, NULL)) == NULL)
+ if ((mtag = m_tag_find(m, PACKET_TAG_PF)) == NULL)
return (NULL);
return ((struct pf_mtag *)(mtag + 1));
@@ -62,7 +62,7 @@ pf_get_mtag(struct mbuf *m)
{
struct m_tag *mtag;
- if ((mtag = m_tag_find(m, PACKET_TAG_PF, NULL)) == NULL) {
+ if ((mtag = m_tag_find(m, PACKET_TAG_PF)) == NULL) {
mtag = m_tag_get(PACKET_TAG_PF, sizeof(struct pf_mtag),
M_NOWAIT);
if (mtag == NULL)
Index: src/sys/kern/uipc_mbuf.c
diff -u src/sys/kern/uipc_mbuf.c:1.222 src/sys/kern/uipc_mbuf.c:1.223
--- src/sys/kern/uipc_mbuf.c:1.222 Thu Nov 15 10:06:07 2018
+++ src/sys/kern/uipc_mbuf.c Thu Nov 15 10:23:55 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_mbuf.c,v 1.222 2018/11/15 10:06:07 maxv Exp $ */
+/* $NetBSD: uipc_mbuf.c,v 1.223 2018/11/15 10:23:55 maxv Exp $ */
/*
* Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.222 2018/11/15 10:06:07 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.223 2018/11/15 10:23:55 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_mbuftrace.h"
@@ -2272,14 +2272,11 @@ m_tag_delete_chain(struct mbuf *m)
}
struct m_tag *
-m_tag_find(const struct mbuf *m, int type, struct m_tag *t)
+m_tag_find(const struct mbuf *m, int type)
{
struct m_tag *p;
- if (t == NULL)
- p = SLIST_FIRST(&m->m_pkthdr.tags);
- else
- p = SLIST_NEXT(t, m_tag_link);
+ p = SLIST_FIRST(&m->m_pkthdr.tags);
while (p != NULL) {
if (p->m_tag_id == type)
return p;
Index: src/sys/net/if.c
diff -u src/sys/net/if.c:1.440 src/sys/net/if.c:1.441
--- src/sys/net/if.c:1.440 Tue Oct 30 05:54:42 2018
+++ src/sys/net/if.c Thu Nov 15 10:23:56 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.440 2018/10/30 05:54:42 ozaki-r Exp $ */
+/* $NetBSD: if.c,v 1.441 2018/11/15 10:23:56 maxv Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.440 2018/10/30 05:54:42 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.441 2018/11/15 10:23:56 maxv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -2860,7 +2860,7 @@ if_tunnel_check_nesting(struct ifnet *if
struct m_tag *mtag;
int *count;
- mtag = m_tag_find(m, PACKET_TAG_TUNNEL_INFO, NULL);
+ mtag = m_tag_find(m, PACKET_TAG_TUNNEL_INFO);
if (mtag != NULL) {
count = (int *)(mtag + 1);
if (++(*count) > limit) {
Index: src/sys/net/if_ethersubr.c
diff -u src/sys/net/if_ethersubr.c:1.270 src/sys/net/if_ethersubr.c:1.271
--- src/sys/net/if_ethersubr.c:1.270 Thu Jun 14 07:54:57 2018
+++ src/sys/net/if_ethersubr.c Thu Nov 15 10:23:56 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ethersubr.c,v 1.270 2018/06/14 07:54:57 yamaguchi Exp $ */
+/* $NetBSD: if_ethersubr.c,v 1.271 2018/11/15 10:23:56 maxv Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.270 2018/06/14 07:54:57 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.271 2018/11/15 10:23:56 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -376,7 +376,7 @@ ether_output(struct ifnet * const ifp0,
#ifdef MPLS
{
struct m_tag *mtag;
- mtag = m_tag_find(m, PACKET_TAG_MPLS, NULL);
+ mtag = m_tag_find(m, PACKET_TAG_MPLS);
if (mtag != NULL) {
/* Having the tag itself indicates it's MPLS */
etype = htons(ETHERTYPE_MPLS);
Index: src/sys/net/if_ieee1394subr.c
diff -u src/sys/net/if_ieee1394subr.c:1.63 src/sys/net/if_ieee1394subr.c:1.64
--- src/sys/net/if_ieee1394subr.c:1.63 Tue Jun 26 06:48:02 2018
+++ src/sys/net/if_ieee1394subr.c Thu Nov 15 10:23:56 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ieee1394subr.c,v 1.63 2018/06/26 06:48:02 msaitoh Exp $ */
+/* $NetBSD: if_ieee1394subr.c,v 1.64 2018/11/15 10:23:56 maxv Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ieee1394subr.c,v 1.63 2018/06/26 06:48:02 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ieee1394subr.c,v 1.64 2018/11/15 10:23:56 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -118,8 +118,7 @@ ieee1394_output(struct ifnet *ifp, struc
*/
unicast = !(m0->m_flags & (M_BCAST | M_MCAST));
if (unicast) {
- mtag =
- m_tag_find(m0, MTAG_FIREWIRE_HWADDR, NULL);
+ mtag = m_tag_find(m0, MTAG_FIREWIRE_HWADDR);
if (!mtag) {
mtag = m_tag_get(MTAG_FIREWIRE_HWADDR,
sizeof (struct ieee1394_hwaddr), M_NOWAIT);
@@ -357,7 +356,7 @@ ieee1394_input(struct ifnet *ifp, struct
struct m_tag *mtag;
const struct ieee1394_hwaddr *myaddr;
- mtag = m_tag_find(m, MTAG_FIREWIRE_SENDER_EUID, 0);
+ mtag = m_tag_find(m, MTAG_FIREWIRE_SENDER_EUID);
if (mtag)
memcpy(h.ibh_shost, mtag + 1, 8);
else
Index: src/sys/net/npf/npf_mbuf.c
diff -u src/sys/net/npf/npf_mbuf.c:1.21 src/sys/net/npf/npf_mbuf.c:1.22
--- src/sys/net/npf/npf_mbuf.c:1.21 Sat Sep 29 14:41:36 2018
+++ src/sys/net/npf/npf_mbuf.c Thu Nov 15 10:23:56 2018
@@ -36,7 +36,7 @@
#ifdef _KERNEL
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf_mbuf.c,v 1.21 2018/09/29 14:41:36 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_mbuf.c,v 1.22 2018/11/15 10:23:56 maxv Exp $");
#include <sys/param.h>
#include <sys/mbuf.h>
@@ -338,7 +338,7 @@ nbuf_find_tag(nbuf_t *nbuf, uint32_t *va
KASSERT(m_flags_p(m, M_PKTHDR));
- mt = m_tag_find(m, PACKET_TAG_NPF, NULL);
+ mt = m_tag_find(m, PACKET_TAG_NPF);
if (mt == NULL) {
return EINVAL;
}
Index: src/sys/netcan/can.c
diff -u src/sys/netcan/can.c:1.5 src/sys/netcan/can.c:1.6
--- src/sys/netcan/can.c:1.5 Thu Nov 15 10:06:07 2018
+++ src/sys/netcan/can.c Thu Nov 15 10:23:56 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: can.c,v 1.5 2018/11/15 10:06:07 maxv Exp $ */
+/* $NetBSD: can.c,v 1.6 2018/11/15 10:23:56 maxv Exp $ */
/*-
* Copyright (c) 2003, 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: can.c,v 1.5 2018/11/15 10:06:07 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: can.c,v 1.6 2018/11/15 10:23:56 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -267,7 +267,7 @@ can_mbuf_tag_clean(struct mbuf *m)
{
struct m_tag *sotag;
- sotag = m_tag_find(m, PACKET_TAG_SO, NULL);
+ sotag = m_tag_find(m, PACKET_TAG_SO);
if (sotag)
m_tag_unlink(m, sotag);
@@ -330,7 +330,7 @@ canintr(void)
#if 0
m_claim(m, &can_rx_mowner);
#endif
- sotag = m_tag_find(m, PACKET_TAG_SO, NULL);
+ sotag = m_tag_find(m, PACKET_TAG_SO);
if (sotag) {
sender_canp = *(struct canpcb **)(sotag + 1);
m_tag_delete(m, sotag);
Index: src/sys/netinet/ip_icmp.c
diff -u src/sys/netinet/ip_icmp.c:1.175 src/sys/netinet/ip_icmp.c:1.176
--- src/sys/netinet/ip_icmp.c:1.175 Thu Nov 15 10:06:07 2018
+++ src/sys/netinet/ip_icmp.c Thu Nov 15 10:23:56 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_icmp.c,v 1.175 2018/11/15 10:06:07 maxv Exp $ */
+/* $NetBSD: ip_icmp.c,v 1.176 2018/11/15 10:23:56 maxv Exp $ */
/*
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -94,7 +94,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.175 2018/11/15 10:06:07 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.176 2018/11/15 10:23:56 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_ipsec.h"
@@ -382,7 +382,7 @@ icmp_error(struct mbuf *n, int type, int
nip->ip_src = oip->ip_src;
nip->ip_dst = oip->ip_dst;
/* move PF m_tag to new packet, if it exists */
- mtag = m_tag_find(n, PACKET_TAG_PF, NULL);
+ mtag = m_tag_find(n, PACKET_TAG_PF);
if (mtag != NULL) {
m_tag_unlink(n, mtag);
m_tag_prepend(m, mtag);
Index: src/sys/netinet/ip_input.c
diff -u src/sys/netinet/ip_input.c:1.386 src/sys/netinet/ip_input.c:1.387
--- src/sys/netinet/ip_input.c:1.386 Sun Sep 2 16:05:33 2018
+++ src/sys/netinet/ip_input.c Thu Nov 15 10:23:56 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_input.c,v 1.386 2018/09/02 16:05:33 maxv Exp $ */
+/* $NetBSD: ip_input.c,v 1.387 2018/11/15 10:23:56 maxv Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.386 2018/09/02 16:05:33 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.387 2018/11/15 10:23:56 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1221,7 +1221,7 @@ ip_srcroute(struct mbuf *m0)
struct ip_srcrt *isr;
struct m_tag *mtag;
- mtag = m_tag_find(m0, PACKET_TAG_SRCROUTE, NULL);
+ mtag = m_tag_find(m0, PACKET_TAG_SRCROUTE);
if (mtag == NULL)
return NULL;
isr = (struct ip_srcrt *)(mtag + 1);
Index: src/sys/netinet6/ip6_input.c
diff -u src/sys/netinet6/ip6_input.c:1.204 src/sys/netinet6/ip6_input.c:1.205
--- src/sys/netinet6/ip6_input.c:1.204 Sat May 19 06:44:08 2018
+++ src/sys/netinet6/ip6_input.c Thu Nov 15 10:23:56 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: ip6_input.c,v 1.204 2018/05/19 06:44:08 maxv Exp $ */
+/* $NetBSD: ip6_input.c,v 1.205 2018/11/15 10:23:56 maxv Exp $ */
/* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */
/*
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.204 2018/05/19 06:44:08 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.205 2018/11/15 10:23:56 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_gateway.h"
@@ -1483,7 +1483,7 @@ ip6_addaux(struct mbuf *m)
{
struct m_tag *mtag;
- mtag = m_tag_find(m, PACKET_TAG_INET6, NULL);
+ mtag = m_tag_find(m, PACKET_TAG_INET6);
if (!mtag) {
mtag = m_tag_get(PACKET_TAG_INET6, sizeof(struct ip6aux),
M_NOWAIT);
@@ -1500,7 +1500,7 @@ ip6_findaux(struct mbuf *m)
{
struct m_tag *mtag;
- mtag = m_tag_find(m, PACKET_TAG_INET6, NULL);
+ mtag = m_tag_find(m, PACKET_TAG_INET6);
return mtag;
}
@@ -1509,7 +1509,7 @@ ip6_delaux(struct mbuf *m)
{
struct m_tag *mtag;
- mtag = m_tag_find(m, PACKET_TAG_INET6, NULL);
+ mtag = m_tag_find(m, PACKET_TAG_INET6);
if (mtag)
m_tag_delete(m, mtag);
}
Index: src/sys/netipsec/ipsec.h
diff -u src/sys/netipsec/ipsec.h:1.84 src/sys/netipsec/ipsec.h:1.85
--- src/sys/netipsec/ipsec.h:1.84 Sat Oct 27 05:42:23 2018
+++ src/sys/netipsec/ipsec.h Thu Nov 15 10:23:56 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec.h,v 1.84 2018/10/27 05:42:23 maxv Exp $ */
+/* $NetBSD: ipsec.h,v 1.85 2018/11/15 10:23:56 maxv Exp $ */
/* $FreeBSD: ipsec.h,v 1.2.4.2 2004/02/14 22:23:23 bms Exp $ */
/* $KAME: ipsec.h,v 1.53 2001/11/20 08:32:38 itojun Exp $ */
@@ -248,7 +248,7 @@ extern int crypto_support;
#define ipsec_indone(m) \
((m->m_flags & M_AUTHIPHDR) || (m->m_flags & M_DECRYPTED))
#define ipsec_outdone(m) \
- (m_tag_find((m), PACKET_TAG_IPSEC_OUT_DONE, NULL) != NULL)
+ (m_tag_find((m), PACKET_TAG_IPSEC_OUT_DONE) != NULL)
void ipsec_pcbconn(struct inpcbpolicy *);
void ipsec_pcbdisconn(struct inpcbpolicy *);
Index: src/sys/netipsec/ipsec_input.c
diff -u src/sys/netipsec/ipsec_input.c:1.72 src/sys/netipsec/ipsec_input.c:1.73
--- src/sys/netipsec/ipsec_input.c:1.72 Sat Oct 27 05:42:23 2018
+++ src/sys/netipsec/ipsec_input.c Thu Nov 15 10:23:56 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec_input.c,v 1.72 2018/10/27 05:42:23 maxv Exp $ */
+/* $NetBSD: ipsec_input.c,v 1.73 2018/11/15 10:23:56 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.72 2018/10/27 05:42:23 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.73 2018/11/15 10:23:56 maxv Exp $");
/*
* IPsec input processing.
@@ -175,7 +175,7 @@ nat_t_ports_get(struct mbuf *m, uint16_t
{
struct m_tag *tag;
- if ((tag = m_tag_find(m, PACKET_TAG_IPSEC_NAT_T_PORTS, NULL))) {
+ if ((tag = m_tag_find(m, PACKET_TAG_IPSEC_NAT_T_PORTS))) {
*sport = ((uint16_t *)(tag + 1))[0];
*dport = ((uint16_t *)(tag + 1))[1];
} else
Index: src/sys/netipsec/ipsecif.c
diff -u src/sys/netipsec/ipsecif.c:1.10 src/sys/netipsec/ipsecif.c:1.11
--- src/sys/netipsec/ipsecif.c:1.10 Thu May 31 07:03:57 2018
+++ src/sys/netipsec/ipsecif.c Thu Nov 15 10:23:56 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsecif.c,v 1.10 2018/05/31 07:03:57 maxv Exp $ */
+/* $NetBSD: ipsecif.c,v 1.11 2018/11/15 10:23:56 maxv Exp $ */
/*
* Copyright (c) 2017 Internet Initiative Japan Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsecif.c,v 1.10 2018/05/31 07:03:57 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsecif.c,v 1.11 2018/11/15 10:23:56 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -257,7 +257,7 @@ ipsecif4_fragout(struct ipsec_variant *v
KASSERT(if_ipsec_heldref_variant(var));
- mtag = m_tag_find(m, PACKET_TAG_IPSEC_NAT_T_PORTS, NULL);
+ mtag = m_tag_find(m, PACKET_TAG_IPSEC_NAT_T_PORTS);
if (mtag)
m_tag_delete(m, mtag);
@@ -299,7 +299,7 @@ ipsecif4_encap_func(struct mbuf *m, stru
src = satosin(var->iv_psrc);
dst = satosin(var->iv_pdst);
- mtag = m_tag_find(m, PACKET_TAG_IPSEC_NAT_T_PORTS, NULL);
+ mtag = m_tag_find(m, PACKET_TAG_IPSEC_NAT_T_PORTS);
if (mtag) {
u_int16_t *ports;
@@ -423,7 +423,7 @@ ipsecif6_encap_func(struct mbuf *m, stru
src = satosin6(var->iv_psrc);
dst = satosin6(var->iv_pdst);
- mtag = m_tag_find(m, PACKET_TAG_IPSEC_NAT_T_PORTS, NULL);
+ mtag = m_tag_find(m, PACKET_TAG_IPSEC_NAT_T_PORTS);
if (mtag) {
u_int16_t *ports;
Index: src/sys/sys/mbuf.h
diff -u src/sys/sys/mbuf.h:1.212 src/sys/sys/mbuf.h:1.213
--- src/sys/sys/mbuf.h:1.212 Thu Nov 15 10:06:07 2018
+++ src/sys/sys/mbuf.h Thu Nov 15 10:23:56 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: mbuf.h,v 1.212 2018/11/15 10:06:07 maxv Exp $ */
+/* $NetBSD: mbuf.h,v 1.213 2018/11/15 10:23:56 maxv Exp $ */
/*
* Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc.
@@ -819,7 +819,7 @@ void m_tag_prepend(struct mbuf *, struct
void m_tag_unlink(struct mbuf *, struct m_tag *);
void m_tag_delete(struct mbuf *, struct m_tag *);
void m_tag_delete_chain(struct mbuf *);
-struct m_tag *m_tag_find(const struct mbuf *, int, struct m_tag *);
+struct m_tag *m_tag_find(const struct mbuf *, int);
struct m_tag *m_tag_copy(struct m_tag *);
int m_tag_copy_chain(struct mbuf *, struct mbuf *);