Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Frank Behrens <frank@harz.behrens.de>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: [PATCH] freebsd: Implement selection of FIB (routing table) for tunneled packets
Date: Sat, 20 Mar 2021 18:05:32 +0100	[thread overview]
Message-ID: <ee43587f-8e17-add1-6b28-174639d126f8@harz.behrens.de> (raw)
In-Reply-To: <CAHmME9q6dO1X+Gt3hY4kQxsQ4DqeaJGxoT8qkaAe-0s_WCrVrA@mail.gmail.com>

Hi Jason,

thanks for your response.

Am 19.03.2021 schrieb Jason A. Donenfeld:
> In other words, you have push access to all branches beginning with fb/ .
That works, thanks. Meanwhile I pushed my branch to fb/fib.

> Right now we have the `wg set wg0 fwmark ...` mapped to
> SO_USER_COOKIE, as I'm sure you saw there. But maybe FIB would be a
> better thing to use for that? We could adjust wireguard-go to do the
> same with the tuntap ioctl.
I believe we have different, orthogonal things:

1. The selection of routing table (fib) for received, decrypted packets.
-> Already implemented in wg_deliver_in() #2098 and controlled
by "ifconfig wg0 fib 1"

2. The selection of routing table for outgoing, encrypted packets.
-> That is addressed by my patch and controlled by
"ifconfig wg0 tunnelfib 1". Maybe wg(8) should receive also
an option for that purpose, if other OS use equivalent functions.

3. The setting of special marks, useable in packet filter/firewall
processing. I guess, that is the meaning for "wg.. fwmark". I'm not
sure, how best to implement that for FreeBSD. For ipfw(4) there is some
functionality using socket cookies, as already implemented. For pf(4)
packet filter the documentation mentions mbuf_tags(9). Apparently
we need some input from a FreeBSD packet filter developer.

Kind regards,
     Frank

-- 
Frank Behrens
Osterwieck, Germany


  reply	other threads:[~2021-03-20 17:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-19 16:57 Frank Behrens
2021-03-19 17:35 ` Jason A. Donenfeld
2021-03-20 17:05   ` Frank Behrens [this message]
2021-03-20 18:59     ` Franco Fichtner
2021-03-22 17:43     ` Jason A. Donenfeld
2021-03-22 18:14       ` Jason A. Donenfeld
2021-03-23  5:51         ` Frank Behrens
2021-03-31 19:05           ` Frank Behrens
2021-03-31 19:11             ` Jason A. Donenfeld
2021-03-31 19:16               ` Frank Behrens
2021-04-01 16:27               ` Frank Behrens
2021-04-13  2:57                 ` Jason A. Donenfeld
2021-04-17 13:08                   ` Frank Behrens
2021-04-17 15:00                     ` Jason A. Donenfeld
2021-04-17 15:23                       ` Frank Behrens
2021-04-17 16:49                         ` Jason A. Donenfeld
2021-03-19 17:38 ` Jason A. Donenfeld

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=ee43587f-8e17-add1-6b28-174639d126f8@harz.behrens.de \
    --to=frank@harz.behrens.de \
    --cc=wireguard@lists.zx2c4.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).