summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_dummynet.c
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2002-08-15 16:53:43 +0000
committerluigi <luigi@FreeBSD.org>2002-08-15 16:53:43 +0000
commit2cf7fe40e756636fd473435f5384d5b289003383 (patch)
tree97b2cb6feae80af918fa72af7390006c5860f8b9 /sys/netinet/ip_dummynet.c
parent1aa234e4f74132cfc11fa0027fb5c74b48611e4c (diff)
downloadFreeBSD-src-2cf7fe40e756636fd473435f5384d5b289003383.zip
FreeBSD-src-2cf7fe40e756636fd473435f5384d5b289003383.tar.gz
Kernel support for a dummynet option:
When a pipe or queue has the "noerror" attribute, do not report drops to the caller (ip_output() and friends). (2 lines to implement it, 2 lines to document it.) This will let you simulate losses on the sender side as if they happened in the middle of the network, i.e. with no explicit feedback to the sender. manpage and ipfw2.c changes to follow shortly, together with other ipfw2 changes. Requested by: silby MFC after: 3 days
Diffstat (limited to 'sys/netinet/ip_dummynet.c')
-rw-r--r--sys/netinet/ip_dummynet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/ip_dummynet.c b/sys/netinet/ip_dummynet.c
index 4a407d1..49f58fc 100644
--- a/sys/netinet/ip_dummynet.c
+++ b/sys/netinet/ip_dummynet.c
@@ -1246,7 +1246,7 @@ dropit:
if (q)
q->drops++ ;
m_freem(m);
- return ENOBUFS ;
+ return ( (fs && (fs->flags_fs & DN_NOERROR)) ? 0 : ENOBUFS);
}
/*
OpenPOWER on IntegriCloud