[PATCH net-next v2 0/6] netconsole: validate a target's IP address configuration
From: Gustavo Luiz Duarte
Date: Mon Aug 10 2026 - 12:54:51 EST
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.
Patches 5 and 6 are follow-ups from review of v1: move inet_addr from
netpoll.h into netconsole.c, and show an unset address as an empty
string rather than "0.0.0.0".
Signed-off-by: Gustavo Luiz Duarte <gustavold@xxxxxxxxx>
---
Changes in v2:
- Show empty string in configfs for an unset IP address
- Moved inet_addr definition from netpoll.h to netconsole.c
- Moved address checks out of rtnl_lock()
- Link to v1: https://patch.msgid.link/20260805-netcons_ipv6-v1-0-170a35b92da1@xxxxxxxxx
To: Breno Leitao <leitao@xxxxxxxxxx>
To: Andrew Lunn <andrew+netdev@xxxxxxx>
To: "David S. Miller" <davem@xxxxxxxxxxxxx>
To: Eric Dumazet <edumazet@xxxxxxxxxx>
To: Jakub Kicinski <kuba@xxxxxxxxxx>
To: Paolo Abeni <pabeni@xxxxxxxxxx>
To: Simon Horman <horms@xxxxxxxxxx>
Cc: netdev@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
---
Gustavo Luiz Duarte (6):
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
netconsole: show empty string for an unset IP address
netconsole: move struct inet_addr into netconsole.c
drivers/net/netconsole.c | 132 +++++++++++++++++++++++------------------------
include/linux/netpoll.h | 5 --
2 files changed, 65 insertions(+), 72 deletions(-)
---
base-commit: a23b36233d4103def55dc8cf65698106d0bd1e62
change-id: 20260730-netcons_ipv6-565d55f55729
Best regards,
--
Gustavo Luiz Duarte <gustavold@xxxxxxxxx>