ng_vjc.c (97685) | ng_vjc.c (109623) |
---|---|
1 2/* 3 * ng_vjc.c 4 * 5 * Copyright (c) 1996-1999 Whistle Communications, Inc. 6 * All rights reserved. 7 * 8 * Subject to the following obligations and disclaimer of warranty, use and --- 22 unchanged lines hidden (view full) --- 31 * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY 32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 35 * OF SUCH DAMAGE. 36 * 37 * Author: Archie Cobbs <archie@freebsd.org> 38 * | 1 2/* 3 * ng_vjc.c 4 * 5 * Copyright (c) 1996-1999 Whistle Communications, Inc. 6 * All rights reserved. 7 * 8 * Subject to the following obligations and disclaimer of warranty, use and --- 22 unchanged lines hidden (view full) --- 31 * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY 32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 35 * OF SUCH DAMAGE. 36 * 37 * Author: Archie Cobbs <archie@freebsd.org> 38 * |
39 * $FreeBSD: head/sys/netgraph/ng_vjc.c 97685 2002-05-31 23:48:03Z archie $ | 39 * $FreeBSD: head/sys/netgraph/ng_vjc.c 109623 2003-01-21 08:56:16Z alfred $ |
40 * $Whistle: ng_vjc.c,v 1.17 1999/11/01 09:24:52 julian Exp $ 41 */ 42 43/* 44 * This node performs Van Jacobson IP header (de)compression. 45 * You must have included net/slcompress.c in your kernel compilation. 46 */ 47 --- 423 unchanged lines hidden (view full) --- 471 if (vjlen <= 0) { 472 NG_FREE_M(m); 473 NG_FREE_ITEM(item); 474 return (EINVAL); 475 } 476 m_adj(m, vjlen); 477 478 /* Copy the reconstructed TCP/IP headers into a new mbuf */ | 40 * $Whistle: ng_vjc.c,v 1.17 1999/11/01 09:24:52 julian Exp $ 41 */ 42 43/* 44 * This node performs Van Jacobson IP header (de)compression. 45 * You must have included net/slcompress.c in your kernel compilation. 46 */ 47 --- 423 unchanged lines hidden (view full) --- 471 if (vjlen <= 0) { 472 NG_FREE_M(m); 473 NG_FREE_ITEM(item); 474 return (EINVAL); 475 } 476 m_adj(m, vjlen); 477 478 /* Copy the reconstructed TCP/IP headers into a new mbuf */ |
479 MGETHDR(hm, M_DONTWAIT, MT_DATA); | 479 MGETHDR(hm, M_NOWAIT, MT_DATA); |
480 if (hm == NULL) { 481 priv->slc.sls_errorin++; 482 NG_FREE_M(m); 483 NG_FREE_ITEM(item); 484 return (ENOBUFS); 485 } 486 hm->m_len = 0; 487 hm->m_pkthdr.rcvif = NULL; 488 if (hlen > MHLEN) { /* unlikely, but can happen */ | 480 if (hm == NULL) { 481 priv->slc.sls_errorin++; 482 NG_FREE_M(m); 483 NG_FREE_ITEM(item); 484 return (ENOBUFS); 485 } 486 hm->m_len = 0; 487 hm->m_pkthdr.rcvif = NULL; 488 if (hlen > MHLEN) { /* unlikely, but can happen */ |
489 MCLGET(hm, M_DONTWAIT); | 489 MCLGET(hm, M_NOWAIT); |
490 if ((hm->m_flags & M_EXT) == 0) { 491 m_freem(hm); 492 priv->slc.sls_errorin++; 493 NG_FREE_M(m); 494 NG_FREE_ITEM(item); 495 return (ENOBUFS); 496 } 497 } --- 120 unchanged lines hidden --- | 490 if ((hm->m_flags & M_EXT) == 0) { 491 m_freem(hm); 492 priv->slc.sls_errorin++; 493 NG_FREE_M(m); 494 NG_FREE_ITEM(item); 495 return (ENOBUFS); 496 } 497 } --- 120 unchanged lines hidden --- |