HomeFreeBSD

netlink: add unregister call in cleanup

Description

netlink: add unregister call in cleanup

For protocols that use netlink (generic and route for now), the unint
handler seems to have forgotten to call unregister, which will cause
the assertion the next time the module is loaded.

This patch adds unregister call to netlink_unregister_proto() for those
handlers to avoid bad things happen.

Reviewed-by: melifaro
Fixes: 7e5bf68495cc ("netlink: add netlink support")
Pull-request: https://github.com/freebsd/freebsd-src/pull/781
Signed-off-by: Lin Ma <linma@zju.edu.cn>
(cherry picked from commit 4bdf7f695184fb4312462ad475f3302c9da40f13)

Details

Provenance
Lin Ma <linma@zju.edu.cn>Authored on Jun 19 2023, 9:32 AM
emasteCommitted on Sep 25 2023, 1:45 PM
Parents
rGfd8bf2ecc05a: libprocstat: use elf_getphdrnum rather than deprecated elf_getphnum
Branches
Unknown
Tags
Unknown