Bug 253254 - WireGuard(wg) produces a lot of error messages for inactive devices
Summary: WireGuard(wg) produces a lot of error messages for inactive devices
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-04 16:53 UTC by Gordon Bergling
Modified: 2021-02-21 10:38 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gordon Bergling freebsd_committer 2021-02-04 16:53:30 UTC
I have experienced a little bit with wg(4) and setup to inactive interfaces on a recent -CURRENT. The interfaces are configured as follows,

wg0: flags=8080e1<UP,RUNNING,NOARP,MULTICAST> metric 0 mtu 1420
	options=880000<LINKSTATE>
	inet6 fe80::dea6:32ff:fe9d:64c4%wg0 prefixlen 64 scopeid 0x4
	inet 46.252.18.5 netmask 0xff000000
	groups: wg
	media: Ethernet autoselect (25GBase-ACC <full-duplex>)
	status: active
	nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
wg1: flags=8080a0<NOARP,MULTICAST> metric 0 mtu 1420
	options=880000<LINKSTATE>
	groups: wg
	listen-port: 54321
	public-key:  7lWtsDdqaGB3EY9WNxRN3hVaHMtu1zXw71+bOjNOVUw=
	media: Ethernet autoselect (25GBase-ACC <full-duplex>)
	status: active
	nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

The console is full of the following output
peer not found - dropping 0xffffa000c7b94800
matchaddr failed
peer not found - dropping 0xffffa00052c27500
matchaddr failed
peer not found - dropping 0xffffa00052d61500
matchaddr failed
peer not found - dropping 0xffffa000d68b7c00
matchaddr failed
peer not found - dropping 0xffffa00004aba400
matchaddr failed
peer not found - dropping 0xffffa00052dbcb00
matchaddr failed
peer not found - dropping 0xffffa000f29b0500
matchaddr failed
peer not found - dropping 0xffffa00004aba000
matchaddr failed
peer not found - dropping 0xffffa0001aa08e00

This output is generated about every minute for each interface.

The device driver should a least print which error belongs to what interface. And for no configured peer, no error message should be printed at all.
Comment 1 liuxyon 2021-02-21 10:38:22 UTC
i using wireguard in pfsense 2.5 and 2.6 base freebsd 12.2 log show the same:

Feb 21 18:16:58	kernel		matchaddr failed
Feb 21 18:16:57	kernel		matchaddr failed
Feb 21 18:16:56	kernel		matchaddr failed



submited in here

https://forum.netgate.com/topic/160897/crash-report-2-5-0-rc/6