NetBSD Problem Report #56869

From www@netbsd.org  Tue Jun  7 18:56:29 2022
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 04C611A921F
	for <gnats-bugs@gnats.NetBSD.org>; Tue,  7 Jun 2022 18:56:29 +0000 (UTC)
Message-Id: <20220607185627.8FED11A923C@mollari.NetBSD.org>
Date: Tue,  7 Jun 2022 18:56:27 +0000 (UTC)
From: andrew.cagney@gmail.com
Reply-To: andrew.cagney@gmail.com
To: gnats-bugs@NetBSD.org
Subject: TCP Encapsulation of IPsec Packets from rfc8229
X-Send-Pr-Version: www-1.0

>Number:         56869
>Category:       kern
>Synopsis:       TCP Encapsulation of IPsec Packets from rfc8229
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 07 19:00:01 +0000 2022
>Originator:     Andrew Cagney
>Release:        trunk
>Organization:
>Environment:
NetBSD arm64 9.2_STABLE NetBSD 9.2_STABLE (GENERIC64)
>Description:
The RFC is https://datatracker.ietf.org/doc/html/rfc8229

As a starting point for discussions, on linux the theory is

Initiator:
  opens connection
  writes the magic IKETCP
  flips to encap mode
  any further reads/writes are encapsulated by the kernel

Responder:
  accepts connection
  reads magic IKETCP string
  flips to encap mode
  any further reads/writes are encapsulated by the kernel

where flipping to encap mode uses the call:
  if (setsockopt(fd, IPPROTO_TCP, TCP_ULP, "espintcp", sizeof("espintcp"))) {
(there's also some SPD fiddling but I'm not sure that is relevant)

>How-To-Repeat:

>Fix:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.