summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_icmp.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1996-04-03 18:52:22 +0000
committerwollman <wollman@FreeBSD.org>1996-04-03 18:52:22 +0000
commita9ce2b638f2d218ab691fb131561706e13571ba3 (patch)
treecde4a404a2e0f3133ccc79187238abef574aa525 /sys/netinet/ip_icmp.c
parentabe01fc216610ef595aa803c7743529793feb35e (diff)
downloadFreeBSD-src-a9ce2b638f2d218ab691fb131561706e13571ba3.zip
FreeBSD-src-a9ce2b638f2d218ab691fb131561706e13571ba3.tar.gz
Always pass a route structure when calling ip_output().
Diffstat (limited to 'sys/netinet/ip_icmp.c')
-rw-r--r--sys/netinet/ip_icmp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c
index 8c5825a..214ba3c 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 <sys/param.h>
@@ -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
OpenPOWER on IntegriCloud