Deleted Added
full compact
ip6.h (148176) ip6.h (181803)
1/* $FreeBSD: head/sys/netinet/ip6.h 148176 2005-07-20 10:30:52Z ume $ */
1/* $FreeBSD: head/sys/netinet/ip6.h 181803 2008-08-17 23:27:27Z bz $ */
2/* $KAME: ip6.h,v 1.18 2001/03/29 05:34:30 itojun Exp $ */
3
4/*-
5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

--- 260 unchanged lines hidden (view full) ---

270 */
271
272#define IP6_EXTHDR_CHECK(m, off, hlen, ret) \
273do { \
274 if ((m)->m_next != NULL) { \
275 if (((m)->m_flags & M_LOOP) && \
276 ((m)->m_len < (off) + (hlen)) && \
277 (((m) = m_pullup((m), (off) + (hlen))) == NULL)) { \
2/* $KAME: ip6.h,v 1.18 2001/03/29 05:34:30 itojun Exp $ */
3
4/*-
5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

--- 260 unchanged lines hidden (view full) ---

270 */
271
272#define IP6_EXTHDR_CHECK(m, off, hlen, ret) \
273do { \
274 if ((m)->m_next != NULL) { \
275 if (((m)->m_flags & M_LOOP) && \
276 ((m)->m_len < (off) + (hlen)) && \
277 (((m) = m_pullup((m), (off) + (hlen))) == NULL)) { \
278 ip6stat.ip6s_exthdrtoolong++; \
278 V_ip6stat.ip6s_exthdrtoolong++; \
279 return ret; \
280 } else if ((m)->m_flags & M_EXT) { \
281 if ((m)->m_len < (off) + (hlen)) { \
279 return ret; \
280 } else if ((m)->m_flags & M_EXT) { \
281 if ((m)->m_len < (off) + (hlen)) { \
282 ip6stat.ip6s_exthdrtoolong++; \
282 V_ip6stat.ip6s_exthdrtoolong++; \
283 m_freem(m); \
284 return ret; \
285 } \
286 } else { \
287 if ((m)->m_len < (off) + (hlen)) { \
283 m_freem(m); \
284 return ret; \
285 } \
286 } else { \
287 if ((m)->m_len < (off) + (hlen)) { \
288 ip6stat.ip6s_exthdrtoolong++; \
288 V_ip6stat.ip6s_exthdrtoolong++; \
289 m_freem(m); \
290 return ret; \
291 } \
292 } \
293 } else { \
294 if ((m)->m_len < (off) + (hlen)) { \
289 m_freem(m); \
290 return ret; \
291 } \
292 } \
293 } else { \
294 if ((m)->m_len < (off) + (hlen)) { \
295 ip6stat.ip6s_tooshort++; \
295 V_ip6stat.ip6s_tooshort++; \
296 in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_truncated); \
297 m_freem(m); \
298 return ret; \
299 } \
300 } \
301} while (/*CONSTCOND*/ 0)
302
303/*

--- 48 unchanged lines hidden ---
296 in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_truncated); \
297 m_freem(m); \
298 return ret; \
299 } \
300 } \
301} while (/*CONSTCOND*/ 0)
302
303/*

--- 48 unchanged lines hidden ---