]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
net: Unregister net_default_ip and net_default_mac variables hooks on unload
authorB Horn <b@horn.uk>
Thu, 28 Nov 2024 04:05:04 +0000 (04:05 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 23 Jan 2025 15:22:48 +0000 (16:22 +0100)
The net module is a dependency of normal. So, it shouldn't be possible
to unload the net. Though unregister variables hooks as a precaution.
It also gets in line with unregistering the other net module hooks.

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

index 8cad4fb6d4de19d748ef31f9c4ea24ff02d12115..f69c67b6458536db9414caa1bd8aca3a960a8541 100644 (file)
@@ -2072,6 +2072,8 @@ GRUB_MOD_FINI(net)
 {
   grub_register_variable_hook ("net_default_server", 0, 0);
   grub_register_variable_hook ("pxe_default_server", 0, 0);
+  grub_register_variable_hook ("net_default_ip", 0, 0);
+  grub_register_variable_hook ("net_default_mac", 0, 0);
 
   grub_bootp_fini ();
   grub_dns_fini ();