瀏覽代碼

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 周之前
父節點
當前提交
c2ecae5e4f
共有 1 個文件被更改,包括 2 次插入 和 1 次删除
  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);