frag6.c (160981) | frag6.c (165118) |
---|---|
1/* $FreeBSD: head/sys/netinet6/frag6.c 160981 2006-08-04 21:27:40Z brooks $ */ | 1/* $FreeBSD: head/sys/netinet6/frag6.c 165118 2006-12-12 12:17:58Z bz $ */ |
2/* $KAME: frag6.c,v 1.33 2002/01/07 11:34:48 kjc 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 --- 142 unchanged lines hidden (view full) --- 152#ifdef IN6_IFSTAT_STRICT 153 struct in6_ifaddr *ia; 154#endif 155 int offset = *offp, nxt, i, next; 156 int first_frag = 0; 157 int fragoff, frgpartlen; /* must be larger than u_int16_t */ 158 struct ifnet *dstifp; 159 u_int8_t ecn, ecn0; | 2/* $KAME: frag6.c,v 1.33 2002/01/07 11:34:48 kjc 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 --- 142 unchanged lines hidden (view full) --- 152#ifdef IN6_IFSTAT_STRICT 153 struct in6_ifaddr *ia; 154#endif 155 int offset = *offp, nxt, i, next; 156 int first_frag = 0; 157 int fragoff, frgpartlen; /* must be larger than u_int16_t */ 158 struct ifnet *dstifp; 159 u_int8_t ecn, ecn0; |
160#if 0 161 char ip6buf[INET6_ADDRSTRLEN]; 162#endif |
|
160 161 ip6 = mtod(m, struct ip6_hdr *); 162#ifndef PULLDOWN_TEST 163 IP6_EXTHDR_CHECK(m, offset, sizeof(struct ip6_frag), IPPROTO_DONE); 164 ip6f = (struct ip6_frag *)((caddr_t)ip6 + offset); 165#else 166 IP6_EXTHDR_GET(ip6f, struct ip6_frag *, m, offset, sizeof(*ip6f)); 167 if (ip6f == NULL) --- 260 unchanged lines hidden (view full) --- 428 */ 429 if (af6->ip6af_up != (struct ip6asfrag *)q6) { 430 i = af6->ip6af_up->ip6af_off + af6->ip6af_up->ip6af_frglen 431 - ip6af->ip6af_off; 432 if (i > 0) { 433#if 0 /* suppress the noisy log */ 434 log(LOG_ERR, "%d bytes of a fragment from %s " 435 "overlaps the previous fragment\n", | 163 164 ip6 = mtod(m, struct ip6_hdr *); 165#ifndef PULLDOWN_TEST 166 IP6_EXTHDR_CHECK(m, offset, sizeof(struct ip6_frag), IPPROTO_DONE); 167 ip6f = (struct ip6_frag *)((caddr_t)ip6 + offset); 168#else 169 IP6_EXTHDR_GET(ip6f, struct ip6_frag *, m, offset, sizeof(*ip6f)); 170 if (ip6f == NULL) --- 260 unchanged lines hidden (view full) --- 431 */ 432 if (af6->ip6af_up != (struct ip6asfrag *)q6) { 433 i = af6->ip6af_up->ip6af_off + af6->ip6af_up->ip6af_frglen 434 - ip6af->ip6af_off; 435 if (i > 0) { 436#if 0 /* suppress the noisy log */ 437 log(LOG_ERR, "%d bytes of a fragment from %s " 438 "overlaps the previous fragment\n", |
436 i, ip6_sprintf(&q6->ip6q_src)); | 439 i, ip6_sprintf(ip6buf, &q6->ip6q_src)); |
437#endif 438 free(ip6af, M_FTABLE); 439 goto dropfrag; 440 } 441 } 442 if (af6 != (struct ip6asfrag *)q6) { 443 i = (ip6af->ip6af_off + ip6af->ip6af_frglen) - af6->ip6af_off; 444 if (i > 0) { 445#if 0 /* suppress the noisy log */ 446 log(LOG_ERR, "%d bytes of a fragment from %s " 447 "overlaps the succeeding fragment", | 440#endif 441 free(ip6af, M_FTABLE); 442 goto dropfrag; 443 } 444 } 445 if (af6 != (struct ip6asfrag *)q6) { 446 i = (ip6af->ip6af_off + ip6af->ip6af_frglen) - af6->ip6af_off; 447 if (i > 0) { 448#if 0 /* suppress the noisy log */ 449 log(LOG_ERR, "%d bytes of a fragment from %s " 450 "overlaps the succeeding fragment", |
448 i, ip6_sprintf(&q6->ip6q_src)); | 451 i, ip6_sprintf(ip6buf, &q6->ip6q_src)); |
449#endif 450 free(ip6af, M_FTABLE); 451 goto dropfrag; 452 } 453 } 454#endif 455 456insert: --- 294 unchanged lines hidden --- | 452#endif 453 free(ip6af, M_FTABLE); 454 goto dropfrag; 455 } 456 } 457#endif 458 459insert: --- 294 unchanged lines hidden --- |