summaryrefslogtreecommitdiffstats
path: root/sys/netipsec
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 /sys/netipsec
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 'sys/netipsec')
-rw-r--r--sys/netipsec/xform_ipip.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/netipsec/xform_ipip.c b/sys/netipsec/xform_ipip.c
index 5167b96..fc6c4a1 100644
--- a/sys/netipsec/xform_ipip.c
+++ b/sys/netipsec/xform_ipip.c
@@ -136,9 +136,6 @@ ipip_output(struct mbuf *m, struct ipsecrequest *isr, struct mbuf **mp,
ipo->ip_sum = 0;
ipo->ip_src = saidx->src.sin.sin_addr;
ipo->ip_dst = saidx->dst.sin.sin_addr;
-
- ipo->ip_id = ip_newid();
-
/* If the inner protocol is IP... */
switch (tp) {
case IPVERSION:
@@ -178,6 +175,7 @@ ipip_output(struct mbuf *m, struct ipsecrequest *isr, struct mbuf **mp,
default:
goto nofamily;
}
+ ip_fillid(ipo);
otos = 0;
ip_ecn_ingress(ECN_ALLOWED, &otos, &itos);
OpenPOWER on IntegriCloud