summaryrefslogtreecommitdiffstats
path: root/sys/netinet/udp_usrreq.c
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2000-10-31 09:13:02 +0000
committerru <ru@FreeBSD.org>2000-10-31 09:13:02 +0000
commitd498e11914d2a35974f6f433a3a58504fb0f1734 (patch)
treecf4c6d69fff546fad5a8558dbd5f67a36e399628 /sys/netinet/udp_usrreq.c
parent8b99bd0a7d627896844911682386eb0a1a52c169 (diff)
downloadFreeBSD-src-d498e11914d2a35974f6f433a3a58504fb0f1734.zip
FreeBSD-src-d498e11914d2a35974f6f433a3a58504fb0f1734.tar.gz
Do not waste a time saving a copy of IP header if we are certainly
not going to send an ICMP error message (net.inet.udp.blackhole=1).
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r--sys/netinet/udp_usrreq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index f357905..589fbef 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -208,7 +208,8 @@ udp_input(m, off, proto)
* Save a copy of the IP header in case we want restore it
* for sending an ICMP error message in response.
*/
- save_ip = *ip;
+ if (!blackhole)
+ save_ip = *ip;
/*
* Checksum extended UDP header and data.
OpenPOWER on IntegriCloud