ng_mppc.c (90868) | ng_mppc.c (102244) |
---|---|
1 2/* 3 * ng_mppc.c 4 * 5 * Copyright (c) 1996-2000 Whistle Communications, Inc. 6 * All rights reserved. 7 * 8 * Subject to the following obligations and disclaimer of warranty, use and --- 23 unchanged lines hidden (view full) --- 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 * $Whistle: ng_mppc.c,v 1.4 1999/11/25 00:10:12 archie Exp $ | 1 2/* 3 * ng_mppc.c 4 * 5 * Copyright (c) 1996-2000 Whistle Communications, Inc. 6 * All rights reserved. 7 * 8 * Subject to the following obligations and disclaimer of warranty, use and --- 23 unchanged lines hidden (view full) --- 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 * $Whistle: ng_mppc.c,v 1.4 1999/11/25 00:10:12 archie Exp $ |
40 * $FreeBSD: head/sys/netgraph/ng_mppc.c 90868 2002-02-18 20:35:27Z mike $ | 40 * $FreeBSD: head/sys/netgraph/ng_mppc.c 102244 2002-08-22 00:30:03Z archie $ |
41 */ 42 43/* 44 * Microsoft PPP compression (MPPC) and encryption (MPPE) netgraph node type. 45 * 46 * You must define one or both of the NETGRAPH_MPPC_COMPRESSION and/or 47 * NETGRAPH_MPPC_ENCRYPTION options for this node type to be useful. 48 */ --- 314 unchanged lines hidden (view full) --- 363 if (!priv->recv.cfg.enable) { 364 NG_FREE_M(m); 365 NG_FREE_ITEM(item); 366 return (ENXIO); 367 } 368 if ((error = ng_mppc_decompress(node, m, &out)) != 0) { 369 NG_FREE_M(m); 370 NG_FREE_ITEM(item); | 41 */ 42 43/* 44 * Microsoft PPP compression (MPPC) and encryption (MPPE) netgraph node type. 45 * 46 * You must define one or both of the NETGRAPH_MPPC_COMPRESSION and/or 47 * NETGRAPH_MPPC_ENCRYPTION options for this node type to be useful. 48 */ --- 314 unchanged lines hidden (view full) --- 363 if (!priv->recv.cfg.enable) { 364 NG_FREE_M(m); 365 NG_FREE_ITEM(item); 366 return (ENXIO); 367 } 368 if ((error = ng_mppc_decompress(node, m, &out)) != 0) { 369 NG_FREE_M(m); 370 NG_FREE_ITEM(item); |
371 if (error == EINVAL && priv->ctrlnode != NULL) { | 371 if (error == EINVAL && priv->ctrlnode != 0) { |
372 struct ng_mesg *msg; 373 374 /* Need to send a reset-request */ 375 NG_MKMESSAGE(msg, NGM_MPPC_COOKIE, 376 NGM_MPPC_RESETREQ, 0, M_NOWAIT); 377 if (msg == NULL) 378 return (error); 379 NG_SEND_MSG_ID(error, node, msg, | 372 struct ng_mesg *msg; 373 374 /* Need to send a reset-request */ 375 NG_MKMESSAGE(msg, NGM_MPPC_COOKIE, 376 NGM_MPPC_RESETREQ, 0, M_NOWAIT); 377 if (msg == NULL) 378 return (error); 379 NG_SEND_MSG_ID(error, node, msg, |
380 priv->ctrlnode, NULL); | 380 priv->ctrlnode, 0); |
381 } 382 return (error); 383 } 384 NG_FREE_M(m); 385 NG_FWD_NEW_DATA(error, item, priv->recv.hook, out); 386 return (error); 387 } 388 --- 400 unchanged lines hidden --- | 381 } 382 return (error); 383 } 384 NG_FREE_M(m); 385 NG_FWD_NEW_DATA(error, item, priv->recv.hook, out); 386 return (error); 387 } 388 --- 400 unchanged lines hidden --- |