net: Remove variables hooks when interface is unregisted
authorB Horn <b@horn.uk>
Fri, 1 Nov 2024 23:49:48 +0000 (23:49 +0000)
committerFelix Zielcke <fzielcke@z-51.de>
Wed, 11 Jun 2025 15:42:34 +0000 (17:42 +0200)
commit441a2888d5b739975b762f53643ecfd0982e54e0
treec66a41bfef89c2e900a6efdb8ecea7dbf49f7dfe
parent382db81cf904fe2adc19dccb6f4b230369416493
net: Remove variables hooks when interface is unregisted

The grub_net_network_level_interface_unregister(), previously
implemented in a header, did not remove the variables hooks that
were registered in grub_net_network_level_interface_register().
Fix this by implementing the same logic used to register the
variables and move the function into the grub-core/net/net.c.

Signed-off-by: B Horn <b@horn.uk>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Conflicts:
grub-core/net/net.c

Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name net-Remove-variables-hooks-when-interface-is-unregisted.patch
grub-core/net/net.c
include/grub/net.h