opnsense-src/sys/netlink
Gleb Smirnoff b977dd1ea5 linux: make linux_netlink_p->msg_from_linux be able to fail
The KPI for this function was misleading.  From the NetLink perspective it
looked like a function that: a) allocates new hdr, b) can fail.  Neither
was true.  Let the function return a error code instead of returning the
same hdr it was passed to.  In case if future Linux NetLink compatibility
support calls for reallocating header, pass hdr as pointer to pointer.

With KPI that returns a error, propagate domain conversion errors all the
way up to NetLink module.  This fixes panic when unknown domain is
converted to 0xff and this invalid value is passed into NetLink
processing.

PR:			274536
Reviewed by:		melifaro
Differential Revision:	https://reviews.freebsd.org/D44392
2024-03-29 13:35:51 -07:00
..
route netlink: fix route protocol constant values to match Linux 2024-03-11 08:50:46 -07:00
ktest_netlink_message_writer.c netlink: use protocol specific receive buffer 2024-01-02 13:04:01 -08:00
ktest_netlink_message_writer.h netlink: use protocol specific receive buffer 2024-01-02 13:04:01 -08:00
netlink.h netlink.h: s/typeof/__typeof 2024-01-21 18:15:14 -08:00
netlink_bitset.h netlink: dump interface capabilities with other interface data. 2023-06-16 15:33:49 +00:00
netlink_ctl.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
netlink_debug.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
netlink_domain.c netlink: fix bug with socket buffer character counter underflow 2024-01-10 20:51:53 -08:00
netlink_generic.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
netlink_generic.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
netlink_generic_kpi.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
netlink_glue.c netlink: Add sysctl descriptions for net.netlink tree 2024-01-08 14:31:31 -05:00
netlink_io.c linux: make linux_netlink_p->msg_from_linux be able to fail 2024-03-29 13:35:51 -07:00
netlink_linux.h linux: make linux_netlink_p->msg_from_linux be able to fail 2024-03-29 13:35:51 -07:00
netlink_message_parser.c netlink: add bool type support 2024-02-28 23:26:18 +01:00
netlink_message_parser.h netlink: add bool type support 2024-02-28 23:26:18 +01:00
netlink_message_writer.c netlink: avoid putting empty mbufs on the socket queue 2024-01-10 20:51:53 -08:00
netlink_message_writer.h netlink: use protocol specific receive buffer 2024-01-02 13:04:01 -08:00
netlink_module.c netlink: use protocol specific receive buffer 2024-01-02 13:04:01 -08:00
netlink_route.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
netlink_route.h netlink: dump interface capabilities with other interface data. 2023-06-16 15:33:49 +00:00
netlink_snl.h netlink: add bool type support 2024-02-28 23:26:18 +01:00
netlink_snl_generic.h netlink: cope with growing requests 2023-10-17 08:47:52 +02:00
netlink_snl_route.h netlink: add IPv4/IPv6 attribute writers using in[6]_addr instead of 2023-05-19 09:45:49 +00:00
netlink_snl_route_compat.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
netlink_snl_route_parsers.h netlink: dump interface capabilities with other interface data. 2023-06-16 15:33:49 +00:00
netlink_sysevent.c kern: Move devctl_systems[] out of sys/sys/devctl.h 2023-06-08 12:28:04 -04:00
netlink_sysevent.h nlsysevent: add default command to the events 2023-06-02 14:22:10 +02:00
netlink_var.h netlink: fix regression with group writers 2024-01-09 13:01:28 -08:00