[PATCH net-next 0/4] netconsole: validate a target's IP address configuration
Gustavo Luiz Duarte <[email protected]>
| Newsgroups | gmane.linux.network,gmane.linux.kernel |
|---|---|
| Message-ID | <[email protected]> |
This series adds two validations to the target configuration when the user tries to enable it: first whether remote_ip was set, and second whether local_ip and remote_ip address families match. Refuse to enable the target if any of those validations fail. These validations are already done for the target passed on the command-line, so this aligns dynamic targets with the command-line behavior. The first two patches replace the per-target 'ipv6' flag with a per-address 'family' field, which makes it easier to detect these error conditions. Patches 3 and 4 implement the actual validations. Signed-off-by: Gustavo Luiz Duarte <[email protected]> --- Gustavo Luiz Duarte (4): netconsole: add an address family to struct inet_addr netconsole: use the address family instead of the ipv6 flag netconsole: reject enabling a target with no remote IP address netconsole: reject a target mixing IPv4 and IPv6 addresses drivers/net/netconsole.c | 117 ++++++++++++++++++++--------------------------- include/linux/netpoll.h | 10 ++-- 2 files changed, 57 insertions(+), 70 deletions(-) --- base-commit: a23b36233d4103def55dc8cf65698106d0bd1e62 change-id: 20260730-netcons_ipv6-565d55f55729 Best regards, -- Gustavo Luiz Duarte <[email protected]>