Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Apr 2023 23:22:21 +0200
From:      =?UTF-8?Q?Morgan_Wesstr=c3=b6m?= <freebsd-database@pp.dyndns.biz>
To:        questions@freebsd.org
Subject:   Re: What is the proper way to handle the wireguard module now that it's part of the base system?
Message-ID:  <40b2657e-12cd-8090-84ec-95ed5b7685eb@pp.dyndns.biz>
In-Reply-To: <7a8841a8-6211-7929-6c81-cc9306906732@freebsd.org>
References:  <05ba770b-cd03-2ee9-3b3c-8dfcd1ea4fdc@pp.dyndns.biz> <7a8841a8-6211-7929-6c81-cc9306906732@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2023-04-12 19:34, Graham Perrin wrote:
> Not a direct answer to your questions, but try 
> <https://old.reddit.com/r/freebsd/comments/12i91ua/-/jfu3c3m/?context=2>.
> 

Thank you. The thread pointed out something my consciousness simply didn't 
register even though it was there right before my eyes. The net/wireguard 
package is a meta-package that doesn't install any code itself. It just pulls 
in net/wireguard-kmod and net/wireguard-tools. The dependecy on the kmod 
package is from that meta-package and I can of course deinstall it and only 
keep net/wireguard-tools.

For my other questions I found some info myself. kldconfig(8) controls which 
paths should be searched for modules. Default is to look in /boot/kernel first 
which is logical.

# kldconfig -r
/boot/kernel;/boot/modules;/boot/dtb;/boot/dtb/overlays

If I for some reason would want to load the kmod version first I guess I could 
just reconfigure that path but that would prioritize any duplicate modules in 
/boot/modules which may not be what I want. So question still remains if this 
behaviour can be controlled for individual modules?

There's also some metadata attached to each module:

# kldxref -d /boot/modules/if_wg.ko
/boot/modules/if_wg.ko
   module wg
   depends on kernel.1301000 (1301000,1399999)
   interface wg.20220615
   depends on crypto.1 (1,1)

# kldxref -d /boot/kernel/if_wg.ko
/boot/kernel/if_wg.ko
   module wg
   depends on kernel.1302001 (1302001,1302001)
   interface wg.20220615
   depends on crypto.1 (1,1)

I understand that the base version need 13.2 to load but I'm uncertain how to 
interpret (1301000,1399999) on the Ports version. Will it allow the module to 
load on any version higher than 13.1 without being recompiled?

/Morgan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40b2657e-12cd-8090-84ec-95ed5b7685eb>