diff options
author | ru <ru@FreeBSD.org> | 2000-10-31 09:13:02 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2000-10-31 09:13:02 +0000 |
commit | d498e11914d2a35974f6f433a3a58504fb0f1734 (patch) | |
tree | cf4c6d69fff546fad5a8558dbd5f67a36e399628 /sys/netinet/udp_usrreq.c | |
parent | 8b99bd0a7d627896844911682386eb0a1a52c169 (diff) | |
download | FreeBSD-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.c | 3 |
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. |