summaryrefslogtreecommitdiff
path: root/sys/netinet6/frag6.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2014-07-12 18:44:44 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2014-07-12 18:44:44 +0000
commit48b6cac396e42c57b5037f5a67d6cd7afb1733d6 (patch)
tree29d721c60c102e5fb6ed78e8ad45bbda321c951f /sys/netinet6/frag6.c
parenta29a93ecbd0d69878182d5959b330ae5badcadc7 (diff)
add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.
Diffstat (limited to 'sys/netinet6/frag6.c')
-rw-r--r--sys/netinet6/frag6.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c
index f27ce57ffbb..049147ae563 100644
--- a/sys/netinet6/frag6.c
+++ b/sys/netinet6/frag6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frag6.c,v 1.52 2014/04/14 09:06:42 mpi Exp $ */
+/* $OpenBSD: frag6.c,v 1.53 2014/07/12 18:44:23 tedu Exp $ */
/* $KAME: frag6.c,v 1.40 2002/05/27 21:40:31 itojun Exp $ */
/*
@@ -348,7 +348,7 @@ frag6_input(struct mbuf **mp, int *offp, int proto)
/* dequeue the fragment. */
LIST_REMOVE(af6, ip6af_list);
- free(af6, M_FTABLE);
+ free(af6, M_FTABLE, 0);
/* adjust pointer. */
ip6err = mtod(merr, struct ip6_hdr *);
@@ -393,14 +393,14 @@ frag6_input(struct mbuf **mp, int *offp, int proto)
ecn0 = (ntohl(af6->ip6af_flow) >> 20) & IPTOS_ECN_MASK;
if (ecn == IPTOS_ECN_CE) {
if (ecn0 == IPTOS_ECN_NOTECT) {
- free(ip6af, M_FTABLE);
+ free(ip6af, M_FTABLE, 0);
goto dropfrag;
}
if (ecn0 != IPTOS_ECN_CE)
af6->ip6af_flow |= htonl(IPTOS_ECN_CE << 20);
}
if (ecn == IPTOS_ECN_NOTECT && ecn0 != IPTOS_ECN_NOTECT) {
- free(ip6af, M_FTABLE);
+ free(ip6af, M_FTABLE, 0);
goto dropfrag;
}
@@ -429,7 +429,7 @@ frag6_input(struct mbuf **mp, int *offp, int proto)
i,
inet_ntop(AF_INET6, &q6->ip6q_src, ip, sizeof(ip)));
#endif
- free(ip6af, M_FTABLE);
+ free(ip6af, M_FTABLE, 0);
goto flushfrags;
}
}
@@ -443,7 +443,7 @@ frag6_input(struct mbuf **mp, int *offp, int proto)
i,
inet_ntop(AF_INET6, &q6->ip6q_src, ip, sizeof(ip)));
#endif
- free(ip6af, M_FTABLE);
+ free(ip6af, M_FTABLE, 0);
goto flushfrags;
}
}
@@ -494,12 +494,12 @@ frag6_input(struct mbuf **mp, int *offp, int proto)
t = t->m_next;
t->m_next = IP6_REASS_MBUF(af6);
m_adj(t->m_next, af6->ip6af_offset);
- free(af6, M_FTABLE);
+ free(af6, M_FTABLE, 0);
}
/* adjust offset to point where the original next header starts */
offset = ip6af->ip6af_offset - sizeof(struct ip6_frag);
- free(ip6af, M_FTABLE);
+ free(ip6af, M_FTABLE, 0);
ip6 = mtod(m, struct ip6_hdr *);
ip6->ip6_plen = htons((u_short)next + offset - sizeof(struct ip6_hdr));
ip6->ip6_src = q6->ip6q_src;
@@ -510,7 +510,7 @@ frag6_input(struct mbuf **mp, int *offp, int proto)
if (frag6_deletefraghdr(m, offset) != 0) {
TAILQ_REMOVE(&frag6_queue, q6, ip6q_queue);
frag6_nfrags -= q6->ip6q_nfrag;
- free(q6, M_FTABLE);
+ free(q6, M_FTABLE, 0);
frag6_nfragpackets--;
goto dropfrag;
}
@@ -525,7 +525,7 @@ frag6_input(struct mbuf **mp, int *offp, int proto)
TAILQ_REMOVE(&frag6_queue, q6, ip6q_queue);
frag6_nfrags -= q6->ip6q_nfrag;
- free(q6, M_FTABLE);
+ free(q6, M_FTABLE, 0);
frag6_nfragpackets--;
if (m->m_flags & M_PKTHDR) { /* Isn't it always true? */
@@ -552,12 +552,12 @@ frag6_input(struct mbuf **mp, int *offp, int proto)
while ((af6 = LIST_FIRST(&q6->ip6q_asfrag)) != NULL) {
LIST_REMOVE(af6, ip6af_list);
m_freem(IP6_REASS_MBUF(af6));
- free(af6, M_FTABLE);
+ free(af6, M_FTABLE, 0);
}
ip6stat.ip6s_fragdropped += q6->ip6q_nfrag;
TAILQ_REMOVE(&frag6_queue, q6, ip6q_queue);
frag6_nfrags -= q6->ip6q_nfrag;
- free(q6, M_FTABLE);
+ free(q6, M_FTABLE, 0);
frag6_nfragpackets--;
dropfrag:
@@ -626,11 +626,11 @@ frag6_freef(struct ip6q *q6)
ICMP6_TIME_EXCEED_REASSEMBLY, 0);
} else
m_freem(m);
- free(af6, M_FTABLE);
+ free(af6, M_FTABLE, 0);
}
TAILQ_REMOVE(&frag6_queue, q6, ip6q_queue);
frag6_nfrags -= q6->ip6q_nfrag;
- free(q6, M_FTABLE);
+ free(q6, M_FTABLE, 0);
frag6_nfragpackets--;
}