Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Franco Fichtner <franco@opnsense.org>
To: 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 19:59:16 +0100	[thread overview]
Message-ID: <B71D1758-3EDE-4844-99FC-7D6BD125D0ED@opnsense.org> (raw)
In-Reply-To: <ee43587f-8e17-add1-6b28-174639d126f8@harz.behrens.de>

Hi Frank,

> On 20. Mar 2021, at 6:05 PM, Frank Behrens <frank@harz.behrens.de> wrote:
> 
> 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.

In pf(4) the tags are stored using mtag and that's reachable through
the kernel only for direct tagging (normally it matches through ruleset
and applies tags to packets in fly-by), although it is difficult to look
up the tag name to tag integer from static functions inside pf_ioctl.c
and keeping the index in sync with the tags that could change when the
ruleset changes, see pf_tag_packet() in pf.c for low level tagging using
the tag integer translated from the tag name during the last ruleset apply.


Cheers,
Franco

  reply	other threads:[~2021-03-21  5:21 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
2021-03-20 18:59     ` Franco Fichtner [this message]
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=B71D1758-3EDE-4844-99FC-7D6BD125D0ED@opnsense.org \
    --to=franco@opnsense.org \
    --cc=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).