Pārlūkot izejas kodu

Fix network config retention across kexec

kexec_write_bootinfo() copied flags into words[4] before OR-ing in
BOOTINFO_FLAG_NET, so the new kernel never saw the saved IP/DNS and
re-ran DHCP after a net-dev reload.  Set the flag in the published word.
Johannes Zellner 1 nedēļu atpakaļ
vecāks
revīzija
c2ecae5e4f
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2 1
      kexec.c

+ 2 - 1
kexec.c

@@ -156,7 +156,8 @@ static void kexec_write_bootinfo(unsigned int pack_addr, unsigned int pack_size)
 		net_get_mask(mask);
 		net_get_gateway(gw);
 		net_get_dns(dns);
-		flags |= BOOTINFO_FLAG_NET;
+		/* words[4] was copied from flags above, before this block. */
+		words[4] |= BOOTINFO_FLAG_NET;
 		words[7] = pack_ip(ip);
 		words[8] = pack_ip(mask);
 		words[9] = pack_ip(gw);