Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Apr 2016 15:55:20 +0000
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        "Andrey V. Elsukov" <ae@FreeBSD.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org, George Neville-Neil <gnn@FreeBSD.org>
Subject:   Re: svn commit: r298535 - head/sys/netipsec
Message-ID:  <F2944469-E53C-49F7-BDE6-C14550042A11@FreeBSD.org>
In-Reply-To: <201604240902.u3O92HXA038401@repo.freebsd.org>
References:  <201604240902.u3O92HXA038401@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> On 24 Apr 2016, at 09:02 , Andrey V. Elsukov <ae@FreeBSD.org> 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."




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F2944469-E53C-49F7-BDE6-C14550042A11>