qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Steffen Klassert <steffen.klassert@secunet.com>
Cc: herbert@gondor.apana.org.au, eric.dumazet@gmail.com,
	mst@redhat.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, qemu-devel@nongnu.org,
	jan.kiszka@siemens.com, David Miller <davem@davemloft.net>
Subject: Re: [Qemu-devel] [PATCH] tun: orphan an skb on tx
Date: Mon, 02 Feb 2015 15:30:25 +0000	[thread overview]
Message-ID: <1422891025.5293.262.camel@infradead.org> (raw)
In-Reply-To: <20150202082446.GR13046@secunet.com>

[-- Attachment #1: Type: text/plain, Size: 2005 bytes --]

On Mon, 2015-02-02 at 09:24 +0100, Steffen Klassert wrote:
> 
> Maybe you want to use a virtual tunnel interface (vti) what we have
> already. Everything that is routed through such an interface is
> guaranteed to be either encrypted if a matching xfrm state is present
> or dropped. Same on the rceive side, everything that is received by
> this interface is guaranteed to be IPsec processed. So you can do
> a routing based decision about the IPsec processing.
> 
> While I'm sure it could handle the ESP in UDP encapsulation, I'm not that
> sure about your TCP fallback because this requires a valid xfrm state
> to allow packets to pass. Using the same interface for both is probably
> not possible.

I'm trying to imagine how we could make it work in practice if we end up
exposing two *different* interfaces and having to change the kernel's
routing according to whether we have UDP connectivity at any given
moment in time.

Given how painful it already is to maintain vpnc-script and make it do
the right thing for split-include and split-exclude routing, I'm not
really sure I want to go there.

Even if we could get such a scheme to work, it would probably also
require retaining root privileges to make the changes — and one of the
security benefits over the proprietary VPN clients is that we don't
*need* to run as root. We can either drop privs after running
vpnc-script to do the initial routing setup, or in the NetworkManager
case we *never* run with elevated privileges; we just pass the
IP/routing information back over DBus to NetworkManager.

It occurs to me that for the approach I was thinking about, I wouldn't
even need to touch the internals of the tun driver. It could be a
separate driver which just uses tun_get_socket(). Userspace could hand
it the file descriptors of the tun device and the connected UDP socket,
along with the encryption parameters — and then just stop reading
packets from the tun device for itself.

-- 
dwmw2

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5745 bytes --]

  reply	other threads:[~2015-02-02 15:31 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-13 14:59 [Qemu-devel] [PATCH] tun: orphan an skb on tx Michael S. Tsirkin
2010-04-13 15:12 ` [Qemu-devel] " Herbert Xu
2010-04-13 15:36 ` Jan Kiszka
2010-04-13 16:40   ` Eric Dumazet
2010-04-13 16:52     ` Jan Kiszka
2010-04-13 17:39     ` Michael S. Tsirkin
2010-04-13 18:31       ` Eric Dumazet
2010-04-13 20:25         ` Michael S. Tsirkin
2010-04-13 20:38           ` Eric Dumazet
2010-04-13 20:43             ` Michael S. Tsirkin
2010-04-14  0:58         ` Herbert Xu
2010-04-14 11:55           ` David Miller
2015-02-01 11:20           ` [Qemu-devel] " David Woodhouse
2015-02-01 12:26             ` Michael S. Tsirkin
2015-02-01 13:33               ` David Woodhouse
2015-02-01 20:19                 ` David Miller
2015-02-01 21:29                   ` David Woodhouse
2015-02-02  5:07                     ` David Miller
2015-02-02  7:27                       ` David Woodhouse
2015-02-02  8:24                         ` Steffen Klassert
2015-02-02 15:30                           ` David Woodhouse [this message]
2015-02-02 15:23                         ` Phil Sutter
2015-02-02 15:47                           ` David Woodhouse
2015-02-04  0:19                         ` David Miller
2015-02-04  6:35                           ` David Woodhouse
2010-04-21 11:35 ` [Qemu-devel] " Michael S. Tsirkin
2010-04-21 11:46   ` Jan Kiszka
2010-04-21 11:45     ` Michael S. Tsirkin
2010-04-21 19:16   ` [Qemu-devel] Re: [stable] " Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1422891025.5293.262.camel@infradead.org \
    --to=dwmw2@infradead.org \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jan.kiszka@siemens.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=steffen.klassert@secunet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).