Fixing double ip assignment
This commit is contained in:
@@ -42,10 +42,17 @@ info "dot1x-macsec: using interface $NIC, NV index $NVINDEX"
|
||||
# networks only. Remove rd.dot1x=0 from the cmdline to restore full security.
|
||||
if [ "$(getarg rd.dot1x=)" = "0" ]; then
|
||||
warn "dot1x-macsec: 802.1X/MACsec DISABLED (rd.dot1x=0) — TEST MODE, no link security"
|
||||
ip link set "$NIC" up
|
||||
# Plain DHCP on the physical NIC via network-legacy (mirrors how the secure
|
||||
# path addresses macsec0); satisfies rd.neednet for the nvmf module.
|
||||
ifup "$NIC"
|
||||
# Networking in test mode is owned ENTIRELY by `ip=dhcp` on the cmdline:
|
||||
# dracut's network module brings the NIC up, gets a DHCP lease, writes
|
||||
# resolv.conf, and — crucially — emits the "online" event that dracut's
|
||||
# nvmf module's initqueue/online hook waits on to run `nvme connect-all`.
|
||||
# Do NOT `ifup`/`ip link set up` the NIC here: it races dracut's own
|
||||
# bring-up ("Error: ipv4: Address already assigned") and, because it isn't
|
||||
# dracut's network path, never fires the nvmf online hook — so the NVMe
|
||||
# namespace never connects and the boot spins on the root device forever.
|
||||
# (The secure path below is different: there the hook owns macsec0, which
|
||||
# dracut knows nothing about, so it must address it itself.)
|
||||
#
|
||||
# Static test NVMe identity (the secure path derives this from the TPM
|
||||
# cert). Match these on the nvmet target if it filters by host NQN.
|
||||
if [ ! -s /etc/nvme/hostnqn ]; then
|
||||
|
||||
Reference in New Issue
Block a user