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).
This commit is contained in:
Ruslan Ermilov 2000-10-31 09:13:02 +00:00
parent 9005f14a3b
commit 48cb400fb1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=68056

View File

@ -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.