From owner-svn-src-all@FreeBSD.ORG Thu Oct 9 23:29:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC659CC; Thu, 9 Oct 2014 23:29:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF281C61; Thu, 9 Oct 2014 23:29:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s99NTjvF076000; Thu, 9 Oct 2014 23:29:45 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99NTj7E075998; Thu, 9 Oct 2014 23:29:45 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092329.s99NTj7E075998@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:29:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272859 - in stable/10/sys: netinet netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2014 23:29:46 -0000 Author: hrs Date: Thu Oct 9 23:29:44 2014 New Revision: 272859 URL: https://svnweb.freebsd.org/changeset/base/272859 Log: MFC r269054: Fix EtherIP. TOS field must be initialized when the inner protocol is PF_LINK, and multicast/broadcast flag should always be dropped because the outer protocol uses unicast even when the inner address is not for unicast. It had been broken since r236951 when gif_output() started to use IFQ_HANDOFF(). Modified: stable/10/sys/netinet/in_gif.c stable/10/sys/netinet6/in6_gif.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/in_gif.c ============================================================================== --- stable/10/sys/netinet/in_gif.c Thu Oct 9 23:28:04 2014 (r272858) +++ stable/10/sys/netinet/in_gif.c Thu Oct 9 23:29:44 2014 (r272859) @@ -169,6 +169,7 @@ in_gif_output(struct ifnet *ifp, int fam return ENOBUFS; bcopy(&eiphdr, mtod(m, struct etherip_header *), sizeof(struct etherip_header)); + tos = 0; break; default: @@ -256,6 +257,7 @@ in_gif_output(struct ifnet *ifp, int fam #endif } + m->m_flags &= ~(M_BCAST|M_MCAST); error = ip_output(m, NULL, &sc->gif_ro, 0, NULL, NULL); if (!(GIF2IFP(sc)->if_flags & IFF_LINK0) && Modified: stable/10/sys/netinet6/in6_gif.c ============================================================================== --- stable/10/sys/netinet6/in6_gif.c Thu Oct 9 23:28:04 2014 (r272858) +++ stable/10/sys/netinet6/in6_gif.c Thu Oct 9 23:29:44 2014 (r272859) @@ -174,6 +174,7 @@ in6_gif_output(struct ifnet *ifp, return ENOBUFS; bcopy(&eiphdr, mtod(m, struct etherip_header *), sizeof(struct etherip_header)); + itos = 0; break; default: @@ -264,6 +265,7 @@ in6_gif_output(struct ifnet *ifp, #endif } + m->m_flags &= ~(M_BCAST|M_MCAST); #ifdef IPV6_MINMTU /* * force fragmentation to minimum MTU, to avoid path MTU discovery.