From owner-svn-src-head@FreeBSD.ORG Fri Apr 26 11:50:27 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3E8E2A2A; Fri, 26 Apr 2013 11:50:27 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from onyx.glenbarber.us (onyx.glenbarber.us [IPv6:2607:fc50:1000:c200::face]) by mx1.freebsd.org (Postfix) with ESMTP id 0B6C01342; Fri, 26 Apr 2013 11:50:27 +0000 (UTC) Received: from glenbarber.us (kaos.glenbarber.us [71.224.221.174]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by onyx.glenbarber.us (Postfix) with ESMTPSA id F36A023F804; Fri, 26 Apr 2013 07:50:22 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.8.2 onyx.glenbarber.us F36A023F804 Authentication-Results: onyx.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Fri, 26 Apr 2013 07:50:21 -0400 From: Glen Barber To: Gleb Smirnoff Subject: Re: svn commit: r249894 - head/sys/netinet Message-ID: <20130426115021.GE1600@glenbarber.us> References: <201304251242.r3PCg9K9058086@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="u5E4XgoOPWr4PD9E" Content-Disposition: inline In-Reply-To: <201304251242.r3PCg9K9058086@svn.freebsd.org> X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Apr 2013 11:50:27 -0000 --u5E4XgoOPWr4PD9E Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 25, 2013 at 12:42:09PM +0000, Gleb Smirnoff wrote: > Modified: head/sys/netinet/ip_output.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/ip_output.c Thu Apr 25 12:05:17 2013 (r249893) > +++ head/sys/netinet/ip_output.c Thu Apr 25 12:42:09 2013 (r249894) > @@ -123,6 +123,7 @@ ip_output(struct mbuf *m, struct mbuf *o > int n; /* scratchpad */ > int error =3D 0; > struct sockaddr_in *dst; > + const struct sockaddr_in *gw; > struct in_ifaddr *ia; > int isbroadcast; > uint16_t ip_len, ip_off; > @@ -196,8 +197,8 @@ ip_output(struct mbuf *m, struct mbuf *o > hlen =3D ip->ip_hl << 2; > } > =20 > + gw =3D dst =3D (struct sockaddr_in *)&ro->ro_dst; > again: > - dst =3D (struct sockaddr_in *)&ro->ro_dst; > ia =3D NULL; > /* > * If there is a cached route, > @@ -297,11 +298,11 @@ again: > ifp =3D rte->rt_ifp; > rte->rt_rmx.rmx_pksent++; > if (rte->rt_flags & RTF_GATEWAY) > - dst =3D (struct sockaddr_in *)rte->rt_gateway; > + gw =3D (struct sockaddr_in *)rte->rt_gateway; > if (rte->rt_flags & RTF_HOST) > isbroadcast =3D (rte->rt_flags & RTF_BROADCAST); > else > - isbroadcast =3D in_broadcast(dst->sin_addr, ifp); > + isbroadcast =3D in_broadcast(gw->sin_addr, ifp); > } > /* > * Calculate MTU. If we have a route that is up, use that, > @@ -327,12 +328,6 @@ again: > if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) { > m->m_flags |=3D M_MCAST; > /* > - * IP destination address is multicast. Make sure "dst" > - * still points to the address in "ro". (It may have been > - * changed to point to a gateway address, above.) > - */ > - dst =3D (struct sockaddr_in *)&ro->ro_dst; > - /* > * See if the caller provided any multicast options > */ > if (imo !=3D NULL) { > @@ -559,7 +554,6 @@ sendit: > /* Or forward to some other address? */ > if ((m->m_flags & M_IP_NEXTHOP) && > (fwd_tag =3D m_tag_find(m, PACKET_TAG_IPFORWARD, NULL)) !=3D NULL) { > - dst =3D (struct sockaddr_in *)&ro->ro_dst; > bcopy((fwd_tag+1), dst, sizeof(struct sockaddr_in)); > m->m_flags |=3D M_SKIP_FIREWALL; > m->m_flags &=3D ~M_IP_NEXTHOP; > @@ -628,8 +622,7 @@ passout: > * to avoid confusing lower layers. > */ > m->m_flags &=3D ~(M_PROTOFLAGS); > - error =3D (*ifp->if_output)(ifp, m, > - (struct sockaddr *)dst, ro); > + error =3D (*ifp->if_output)(ifp, m, (struct sockaddr *)gw, ro); It looks like this change is causing tinderbox build failures on head/ : --------------------- begin quoted text --------------------- /src/sys/netinet/ip_output.c: In function 'ip_output': /src/sys/netinet/ip_output.c:625: warning: cast discards qualifiers from po= inter target type ---------------------- end quoted text ---------------------- Glen > goto done; > } > =20 > @@ -663,7 +656,7 @@ passout: > m->m_flags &=3D ~(M_PROTOFLAGS); > =20 > error =3D (*ifp->if_output)(ifp, m, > - (struct sockaddr *)dst, ro); > + (struct sockaddr *)gw, ro); > } else > m_freem(m); > } > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" --u5E4XgoOPWr4PD9E Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBCAAGBQJRemn9AAoJEFJPDDeguUaj3KIH/i4+DO5lFDJJ4rIwBLBWqU0d nBq1H3Hsc7OuYeP/9j2Fle0FgcdspCneuBr1AxueKVrQT1/ykJMNXo/kOcFXHWfa /HQtGWmPEriKC5Vp88sV5KNMA/32twqSOEX61A528k6pf3lPu3B53lZdl1WW9Zd7 uP02IcvpGfyeNxqjcLkvFZKKNt7DcVPg3KN8NX/klhjjOxGpaKCQXxfyF4xSpbGb 4cGbJ/yLsBIuMz+dJFS2IZnU4teRa/lZG+gk8ifwhkPIy1DHxuwSuHMq8aJdq6qa aqbGNoObpuI4j775Spi/yDL7pAC728tp1VbLrCO7/Oab1JFA33LSEc3wsZRRgKw= =gzAQ -----END PGP SIGNATURE----- --u5E4XgoOPWr4PD9E--