From owner-svn-src-head@FreeBSD.ORG Tue Jun 12 12:53:06 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 418BD106564A; Tue, 12 Jun 2012 12:53:06 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) by mx1.freebsd.org (Postfix) with ESMTP id E1F8F8FC18; Tue, 12 Jun 2012 12:53:05 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 8176525D388E; Tue, 12 Jun 2012 12:53:04 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 6F01CBE7F37; Tue, 12 Jun 2012 12:53:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 6ZVljYhAYBPn; Tue, 12 Jun 2012 12:53:02 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id D49F8BE7F36; Tue, 12 Jun 2012 12:53:01 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201206121244.q5CCiH4i053940@svn.freebsd.org> Date: Tue, 12 Jun 2012 12:53:00 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <70EDDE72-B9FE-45AB-B3C5-248B95E1E960@lists.zabbadoz.net> References: <201206121244.q5CCiH4i053940@svn.freebsd.org> To: Randall Stewart X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r236955 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 12 Jun 2012 12:53:06 -0000 On 12. Jun 2012, at 12:44 , Randall Stewart wrote: > Author: rrs > Date: Tue Jun 12 12:44:17 2012 > New Revision: 236955 > URL: http://svn.freebsd.org/changeset/base/236955 >=20 > Log: > Note to self. Have morning coffee *before* committing things. > There is no mac_addr in the mbuf for BSD.. cheat like > we are supposed to and use the csum field since our friend > the gif tunnel itself will never use offload. There are cards that can do checksums for IPIP... with drivers in out = tree. >=20 > Modified: > head/sys/net/if_gif.c >=20 > Modified: head/sys/net/if_gif.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/net/if_gif.c Tue Jun 12 12:40:15 2012 = (r236954) > +++ head/sys/net/if_gif.c Tue Jun 12 12:44:17 2012 = (r236955) > @@ -388,7 +388,8 @@ keep_going: > /* Now pull back the af in packet that > * was saved in the address location. > */ > - bcopy(m->m_pkthdr.src_mac_addr, &af, sizeof(af)); > + af =3D m->m_pkthdr.csum_data; > + =09 > if (ifp->if_bridge) > af =3D AF_LINK; >=20 > @@ -503,10 +504,11 @@ gif_output(ifp, m, dst, ro) > dst->sa_family =3D af; > } > af =3D dst->sa_family; > - /* Now save the af in the inbound pkt mac > - * address location. > + /* Now save the af in the inbound pkt csum > + * data, this is a cheat since really > + * gif tunnels don't do offload. > */ > - bcopy(&af, m->m_pkthdr.src_mac_addr, sizeof(af)); > + m->m_pkthdr.csum_data =3D af; > if (!(ifp->if_flags & IFF_UP) || > sc->gif_psrc =3D=3D NULL || sc->gif_pdst =3D=3D NULL) { > m_freem(m); --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do!