From 48cb400fb10564bb08e61735d88d4410bd160fb0 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Tue, 31 Oct 2000 09:13:02 +0000 Subject: [PATCH] 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). --- sys/netinet/udp_usrreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index f357905568f..589fbef76d1 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.