From owner-svn-src-head@FreeBSD.ORG Thu Jul 24 10:42:48 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7465CF26; Thu, 24 Jul 2014 10:42:48 +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 616EE2136; Thu, 24 Jul 2014 10:42:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6OAgmJw061555; Thu, 24 Jul 2014 10:42:48 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6OAgmf4061553; Thu, 24 Jul 2014 10:42:48 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201407241042.s6OAgmf4061553@svn.freebsd.org> From: Hiroki Sato Date: Thu, 24 Jul 2014 10:42:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269054 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 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: Thu, 24 Jul 2014 10:42:48 -0000 Author: hrs Date: Thu Jul 24 10:42:47 2014 New Revision: 269054 URL: http://svnweb.freebsd.org/changeset/base/269054 Log: 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: head/sys/netinet/in_gif.c head/sys/netinet6/in6_gif.c Modified: head/sys/netinet/in_gif.c ============================================================================== --- head/sys/netinet/in_gif.c Thu Jul 24 10:25:42 2014 (r269053) +++ head/sys/netinet/in_gif.c Thu Jul 24 10:42:47 2014 (r269054) @@ -170,6 +170,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: @@ -257,6 +258,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: head/sys/netinet6/in6_gif.c ============================================================================== --- head/sys/netinet6/in6_gif.c Thu Jul 24 10:25:42 2014 (r269053) +++ head/sys/netinet6/in6_gif.c Thu Jul 24 10:42:47 2014 (r269054) @@ -176,6 +176,7 @@ in6_gif_output(struct ifnet *ifp, return ENOBUFS; bcopy(&eiphdr, mtod(m, struct etherip_header *), sizeof(struct etherip_header)); + itos = 0; break; default: @@ -266,6 +267,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.