From f0a53591adbfa19567f369d0f32144fbd7cf37be Mon Sep 17 00:00:00 2001 From: Luigi Rizzo Date: Tue, 16 Mar 1999 12:06:11 +0000 Subject: [PATCH] Fix a dummynet bug caused by passing a bad next hop address (the symptom was the msg "arp failure -- host is not on local network" that some user have seen on multihomed machines. Bug tracked down by Emmanuel Duros --- sys/netinet/ip_output.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 0a05ee97ff30..e75ec869c66a 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ip_output.c 8.3 (Berkeley) 1/21/94 - * $Id: ip_output.c,v 1.85 1998/12/21 21:36:40 luigi Exp $ + * $Id: ip_output.c,v 1.86 1999/02/19 18:32:55 luigi Exp $ */ #define _IP_VHL @@ -155,13 +155,13 @@ ip_output(m0, opt, ro, flags, imo) * the packet was already tagged, so part of the * processing was already done, and we need to go down. * opt, flags and imo have already been used, and now - * they are used to hold ifp and hlen and NULL, respectively. + * they are used to hold ifp, dst and NULL, respectively. */ rule = (struct ip_fw_chain *)(m->m_data) ; m0 = m = m->m_next ; free(tmp_m, M_IPFW); ip = mtod(m, struct ip *); - dst = (struct sockaddr_in *)&ro->ro_dst; + dst = (struct sockaddr_in *)flags ; ifp = (struct ifnet *)opt; hlen = IP_VHL_HL(ip->ip_vhl) << 2 ; opt = NULL ; @@ -461,14 +461,14 @@ sendit: if (off & 0x10000) { /* * pass the pkt to dummynet. Need to include - * pipe number, m, ifp, ro, hlen because these are + * pipe number, m, ifp, ro, dst because these are * not recomputed in the next pass. * All other parameters have been already used and * so they are not needed anymore. * XXX note: if the ifp or ro entry are deleted * while a pkt is in dummynet, we are in trouble! */ - dummynet_io(off & 0xffff, DN_TO_IP_OUT, m,ifp,ro,hlen,rule); + dummynet_io(off & 0xffff, DN_TO_IP_OUT, m,ifp,ro,dst,rule); goto done; } #endif