Hello Andre,
On Sun, Sep 21, 2025 at 10:55:45PM +0100, Andre Carvalho wrote:
Attempt to resume a previously deactivated target when the associated interface comes back (NETDEV_UP event is received) by calling __netpoll_setup_hold on the device.
For targets that were initally setup by mac address, their address is also compared with the interface address (while still verifying that the interface name matches).
For targets that are set by the mac address, they don't necessarily get np.dev_name populated, do they?
I am double checking netpoll_setup(), and if is_valid_ether_addr(np->dev_mac), I don't see np.dev_name being populated.
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 59d770bb4baa5f9616b10c0dfb39ed45a4eb7710..96485e979e61e0ed6c850ae3b29f46d529923f2d 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c +/* Attempts to resume logging to a deactivated target. */ +static void maybe_resume_target(struct netconsole_target *nt,
struct net_device *ndev)
+{
- int ret;
- if (strncmp(nt->np.dev_name, ndev->name, IFNAMSIZ))
return;
But here, you expect that np.dev_name is populate, which I suppose it will fail if the target is binding by np->dev_mac.
Should we also compare that the mac doesn't match before returning?
--breno