ng_tee.c (108107) | ng_tee.c (109623) |
---|---|
1 2/* 3 * ng_tee.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: Julian Elischer <julian@freebsd.org> 38 * | 1 2/* 3 * ng_tee.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: Julian Elischer <julian@freebsd.org> 38 * |
39 * $FreeBSD: head/sys/netgraph/ng_tee.c 108107 2002-12-19 22:58:27Z bmilekic $ | 39 * $FreeBSD: head/sys/netgraph/ng_tee.c 109623 2003-01-21 08:56:16Z alfred $ |
40 * $Whistle: ng_tee.c,v 1.18 1999/11/01 09:24:52 julian Exp $ 41 */ 42 43/* 44 * This node is like the tee(1) command and is useful for ``snooping.'' 45 * It has 4 hooks: left, right, left2right, and right2left. Data 46 * entering from the right is passed to the left and duplicated on 47 * right2left, and data entering from the left is passed to the right --- 281 unchanged lines hidden (view full) --- 329 } 330 331 /* Duplicate packet and meta info if requried */ 332 if (dup != NULL) { 333 struct mbuf *m2; 334 meta_p meta2; 335 336 /* Copy packet (failure will not stop the original)*/ | 40 * $Whistle: ng_tee.c,v 1.18 1999/11/01 09:24:52 julian Exp $ 41 */ 42 43/* 44 * This node is like the tee(1) command and is useful for ``snooping.'' 45 * It has 4 hooks: left, right, left2right, and right2left. Data 46 * entering from the right is passed to the left and duplicated on 47 * right2left, and data entering from the left is passed to the right --- 281 unchanged lines hidden (view full) --- 329 } 330 331 /* Duplicate packet and meta info if requried */ 332 if (dup != NULL) { 333 struct mbuf *m2; 334 meta_p meta2; 335 336 /* Copy packet (failure will not stop the original)*/ |
337 m2 = m_dup(m, M_DONTWAIT); | 337 m2 = m_dup(m, M_NOWAIT); |
338 if (m2) { 339 340 /* Copy meta info */ 341 /* If we can't get a copy, tough.. */ 342 if (meta != NULL) { 343 meta2 = ng_copy_meta(meta); 344 } else 345 meta2 = NULL; --- 59 unchanged lines hidden --- | 338 if (m2) { 339 340 /* Copy meta info */ 341 /* If we can't get a copy, tough.. */ 342 if (meta != NULL) { 343 meta2 = ng_copy_meta(meta); 344 } else 345 meta2 = NULL; --- 59 unchanged lines hidden --- |