nd6: Fix regeneration of temp addresses in detached state
When an on-link prefix becomes detached, the kernel keeps
generating new RFC 8981 temporary addresses for that prefix.
Fix it by ignoring the detached addresses in regen_tmpaddr().
While here, change its return type to bool.
PR: 298533
Discussed with: markj
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D60051
(cherry picked from commit 61f98a98250da7bd2c80c6d93d0032961d7f2fad)
pf: return per-address feedback from netlink table test
The PFNL_CMD_TABLE_TEST_ADDRS reply carries only the match count, so
the per-address feedback from pfr_tst_addrs() is lost:
"pfctl -v -T test" lists nothing and "pfctl -vv -T test" reports
every address as "nomatch".
Return each address, as updated by pfr_tst_addrs(), in a nested
PF_TAS_ADDR attribute, and decode them into the caller's array in
libpfctl. PF_TA_ADDR is not reused: it shares its value with
PF_TAS_ASTATS, which older libpfctl would decode into an
uninitialised target. That target was also read when no reply was
parsed, so the match count could be garbage; initialise it.
Add a regression test.
Reviewed by: kp
Approved by: kp (mentor)
Fixes: 281282e9357b ("pf: convert DIOCRTSTADDRS to netlink")
[3 lines not shown]
pf: remove a source limiter from the id tree if its name is taken
When pf_sourcelim_add() finds the name of the new limiter taken, it
undoes the insertion into the id tree with RB_REMOVE() on the name tree,
which the limiter is not in, and then frees the limiter. The freed
limiter stays in the inactive id tree, and RB_REMOVE() of an element
with no links clears the root of the name tree, which loses every other
inactive limiter from it. pf_statelim_add() gets this right.
parse.y refuses duplicate names, so pfctl does not get here, but any
netlink client can.
Reviewed by: kp
Approved by: kp (mentor)
Fixes: 461648121230 ("pf: introduce source and state limiters")
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D60189
pf: free the packet rate counter of a rule
pf_ioctl_addrule() allocates a counter_rate for every rule, whether it
has a max-pkt-rate or not, and pf_krule_free() never frees it.
Free it with the rest of the rule.
Reviewed by: kp
Approved by: kp (mentor)
Fixes: ff11f1c8c76c ("pf: add a generic packet rate matching filter")
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D60190
man: Link ena.4 to if_ena.4
For consistency, create a symbolic link from ena.4 to also if_ena.4
Reviewed by: #manpages, ziaee
Differential Revision: https://reviews.freebsd.org/D60191
MFC after: 3 days
ifuncs: Have DEFINE_*IFUNC() macros expand the passed name
While here, make each <machine/ifunc.h> header include <sys/types.h> so
that it can be included standalone.
Reviewed by: kib
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60167
misc/mc: update Midnight Commander to the latest version 4.8.33
- Tentatively switch default renderer from S-Lang to ncurses which
is part of the base system and does not pull EoLed `devel/pcre'
- GC no longer needed USES+=shebangfix, adjust Python dependency
- Add support for entering and viewing FreeBSD packages, based on
the idea and patch by Walter von Entferndt
- Register installation conflict with `misc/mc6' port while at it
PR: 292865, 293259, 294086
llan: byte swap the receive queue entries
The receive queue of a PAPR logical LAN is filled in by the hypervisor, so
its fields are big endian, but llan_intr() read the offset and the length of
each frame natively. On a little endian kernel the length of a 134 byte
frame reads as 0x86000000, and ether_input() discards the mbuf because m_len
is not even large enough for an ethernet header. No frame is ever received.
Reproduced on a POWER9 pseries guest with a spapr-vlan interface. Before:
llan0: discard frame w/o leading ethernet header (len -2046820352
pkt len -2046820352)
llan0 1500 <Link#1> 52:54:00:12:34:56 123 118 0 5838733312 7 0
that is 118 input errors out of 123 packets, dhclient(8) never completes and
ping(8) loses every packet, although transmit works because the transmit
path passes the lengths in hcall registers rather than through memory.
Afterwards the interface gets a DHCP lease and ping reports no loss.
[5 lines not shown]
contrib/lutok: remove autotools generated files
These files provide no value in the FreeBSD tree proper and change
frequently, depending on what machine I generate the release tarball on
(and what versions of autotools are on the host). Nuke the autogenerated
files to avoid bloating commit history/the tree.
MFC after: 3 days
Requested by: Benjamin Jacobs <freebsd at dev.thsi.be>
(cherry picked from commit cfe443e1e63dd588fba7eabec553ed5e1c408d1f)