From d3d20ad1968823d12ebe1504034887d0fae581f9 Mon Sep 17 00:00:00 2001 From: Garrett Wollman Date: Wed, 3 Apr 1996 18:52:22 +0000 Subject: [PATCH] Always pass a route structure when calling ip_output(). --- sys/netinet/ip_icmp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 8c5825a895cb..214ba3c855ee 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ip_icmp.c 8.2 (Berkeley) 1/4/94 - * $Id: ip_icmp.c,v 1.18 1996/03/26 19:16:43 fenner Exp $ + * $Id: ip_icmp.c,v 1.19 1996/04/02 12:26:10 phk Exp $ */ #include @@ -611,6 +611,7 @@ icmp_send(m, opts) register struct ip *ip = mtod(m, struct ip *); register int hlen; register struct icmp *icp; + struct route ro; hlen = ip->ip_hl << 2; m->m_data += hlen; @@ -628,7 +629,10 @@ icmp_send(m, opts) buf, inet_ntoa(ip->ip_src)); } #endif - (void) ip_output(m, opts, NULL, 0, NULL); + bzero(&ro, sizeof ro); + (void) ip_output(m, opts, &ro, 0, NULL); + if (ro.ro_rt) + RTFREE(ro.ro_rt); } n_time