Index: sys/netinet/udp_usrreq.c =================================================================== --- sys/netinet/udp_usrreq.c +++ sys/netinet/udp_usrreq.c @@ -398,7 +398,6 @@ struct inpcb *inp; uint16_t len, ip_len; struct inpcbinfo *pcbinfo; - struct ip save_ip; struct sockaddr_in udp_in[2]; struct mbuf *m; struct m_tag *fwd_tag; @@ -474,15 +473,6 @@ m_adj(m, len - ip_len); } - /* - * Save a copy of the IP header in case we want restore it for - * sending an ICMP error message in response. - */ - if (!V_udp_blackhole) - save_ip = *ip; - else - memset(&save_ip, 0, sizeof(save_ip)); - /* * Checksum extended UDP header and data. */ @@ -714,7 +704,6 @@ goto badunlocked; if (badport_bandlim(BANDLIM_ICMP_UNREACH) < 0) goto badunlocked; - *ip = save_ip; icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_PORT, 0, 0); return (IPPROTO_DONE); }