kern/94829: [patch] feature request: adapt OpenBSD's enc0
support for FreeBSD
Mats Palmgren
mats.palmgren at bredband.net
Sat Mar 25 03:50:16 UTC 2006
The following reply was made to PR kern/94829; it has been noted by GNATS.
From: Mats Palmgren <mats.palmgren at bredband.net>
To: bug-followup at FreeBSD.org, vanhu at netasq.com
Cc:
Subject: Re: kern/94829: [patch] feature request: adapt OpenBSD's enc0 support
for FreeBSD
Date: Sat, 25 Mar 2006 04:44:14 +0100
FYI, you can simplify the bpf blocks by using bpf_mtap2.
An example from our enc0 implementation:
struct ifnet *ifn = get_enc0();
if (ifn->if_bpf) {
struct enchdr hdr;
hdr.af = sav->sah->saidx.dst.sa.sa_family;
hdr.spi = sav->spi;
hdr.flags = espx ? M_CONF : 0;
if (esph)
hdr.flags |= M_AUTH;
bpf_mtap2(ifn->if_bpf, &hdr, ENC_HDRLEN, m);
}
More information about the freebsd-bugs
mailing list