Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet Adapt previous, reintroduce MH_ALIGN. It's used ...
details: https://anonhg.NetBSD.org/src/rev/80689344199b
branches: trunk
changeset: 358903:80689344199b
user: maxv <maxv%NetBSD.org@localhost>
date: Mon Jan 22 06:56:25 2018 +0000
description:
Adapt previous, reintroduce MH_ALIGN. It's used as an optimization - we
can later prepend something to the current mbuf without having to allocate
a new mbuf.
diffstat:
sys/netinet/ip_icmp.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r c1e685c3a1c3 -r 80689344199b sys/netinet/ip_icmp.c
--- a/sys/netinet/ip_icmp.c Mon Jan 22 01:34:42 2018 +0000
+++ b/sys/netinet/ip_icmp.c Mon Jan 22 06:56:25 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_icmp.c,v 1.163 2018/01/19 13:17:29 maxv Exp $ */
+/* $NetBSD: ip_icmp.c,v 1.164 2018/01/22 06:56:25 maxv Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -94,7 +94,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.163 2018/01/19 13:17:29 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.164 2018/01/22 06:56:25 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_ipsec.h"
@@ -345,6 +345,9 @@
panic("icmp_error");
ICMP_STATINC(ICMP_STAT_OUTHIST + type);
+ if ((m->m_flags & M_EXT) == 0)
+ MH_ALIGN(m, m->m_len);
+
/*
* Get pointers on the IP header and the ICMP header.
*/
Home |
Main Index |
Thread Index |
Old Index