summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2015-04-01 22:26:39 +0000
committerglebius <glebius@FreeBSD.org>2015-04-01 22:26:39 +0000
commit7c22152af091019b561635382376674c061d3e84 (patch)
tree8b00e7a494687331ff2fc1bd6aa72facdfb91310 /contrib/ipfilter
parent0b17a7a51280703aa776930b14f0bec4020f5e55 (diff)
downloadFreeBSD-src-7c22152af091019b561635382376674c061d3e84.zip
FreeBSD-src-7c22152af091019b561635382376674c061d3e84.tar.gz
o Use new function ip_fillid() in all places throughout the kernel,
where we want to create a new IP datagram. o Add support for RFC6864, which allows to set IP ID for atomic IP datagrams to any value, to improve performance. The behaviour is controlled by net.inet.ip.rfc6864 sysctl knob, which is enabled by default. o In case if we generate IP ID, use counter(9) to improve performance. o Gather all code related to IP ID into ip_id.c. Differential Revision: https://reviews.freebsd.org/D2177 Reviewed by: adrian, cy, rpaulo Tested by: Emeric POUPON <emeric.poupon stormshield.eu> Sponsored by: Netflix Sponsored by: Nginx, Inc. Relnotes: yes
Diffstat (limited to 'contrib/ipfilter')
-rw-r--r--contrib/ipfilter/tools/ipftest.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/ipfilter/tools/ipftest.c b/contrib/ipfilter/tools/ipftest.c
index a475828..378523d 100644
--- a/contrib/ipfilter/tools/ipftest.c
+++ b/contrib/ipfilter/tools/ipftest.c
@@ -864,3 +864,11 @@ void fixv4sums(m, ip)
*(u_short *)csump = fr_cksum(&tmp, ip, p, hdr);
}
}
+
+void
+ip_fillid(struct ip *ip)
+{
+ static uint16_t ip_id;
+
+ ip->ip_id = ip_id++;
+}
OpenPOWER on IntegriCloud