From owner-svn-src-head@freebsd.org Sun Apr 24 15:55:48 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C5ACB19C55; Sun, 24 Apr 2016 15:55:48 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id EF8E213DC; Sun, 24 Apr 2016 15:55:47 +0000 (UTC) (envelope-from bz@FreeBSD.org) 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 3A4D525D3888; Sun, 24 Apr 2016 15:55:43 +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 646D3D1F7F7; Sun, 24 Apr 2016 15:55:42 +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 BhcPoG6JxNob; Sun, 24 Apr 2016 15:55:40 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:9c8d:8bbc:f224:ce42] (unknown [IPv6:fde9:577b:c1a9:4410:9c8d:8bbc:f224:ce42]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 04723C7BF64; Sun, 24 Apr 2016 15:55:39 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Subject: Re: svn commit: r298535 - head/sys/netipsec From: "Bjoern A. Zeeb" In-Reply-To: <201604240902.u3O92HXA038401@repo.freebsd.org> Date: Sun, 24 Apr 2016 15:55:20 +0000 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, George Neville-Neil Content-Transfer-Encoding: quoted-printable Message-Id: References: <201604240902.u3O92HXA038401@repo.freebsd.org> To: "Andrey V. Elsukov" X-Mailer: Apple Mail (2.3112) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 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: Sun, 24 Apr 2016 15:55:48 -0000 > On 24 Apr 2016, at 09:02 , Andrey V. Elsukov wrote: >=20 > Author: ae > Date: Sun Apr 24 09:02:17 2016 > New Revision: 298535 > URL: https://svnweb.freebsd.org/changeset/base/298535 >=20 > Log: > Handle non-compressed packets for IPComp in tunnel mode. >=20 > RFC3173 says that the IP datagram MUST be sent in the original > non-compressed form, when the total size of a compressed payload > and the IPComp header is not smaller than the size of the original > payload. In tunnel mode for small packets IPComp will send > encapsulated IP datagrams without IPComp header. > Add ip_encap handler for IPPROTO_IPV4 and IPPROTO_IPV6 to handle > these datagrams. The handler does lookup for SA related to IPComp > protocol and given from mbuf source and destination addresses as > tunnel endpoints. It decapsulates packets only when corresponding SA > is found. >=20 > Reported by: gnn > Reviewed by: gnn > Differential Revision: https://reviews.freebsd.org/D6062 For one this breaks NOINET kernels, for the other > static void > ipcomp_attach(void) > { >=20 > +#ifdef INET > + ipe4_cookie =3D encap_attach_func(AF_INET, IPPROTO_IPV4, > + ipcomp4_nonexp_encapcheck, &ipcomp_protosw, NULL); > +#endif > +#ifdef INET6 > + ipe6_cookie =3D encap_attach_func(AF_INET6, IPPROTO_IPV6, > + ipcomp6_nonexp_encapcheck, &ipcomp_protosw, NULL); This looks wrong to me but also with regards to NOINET kernels won=E2=80=99= t compile. > +#endif > xform_register(&ipcomp_xformsw); > } >=20 > -SYSINIT(ipcomp_xform_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_MIDDLE, = ipcomp_attach, NULL); > +SYSINIT(ipcomp_xform_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_MIDDLE, > + ipcomp_attach, NULL); >=20 =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend."