From bb6f0c841bcd79cad619fd635f072a1c39657d96 Mon Sep 17 00:00:00 2001 From: Radek Vykydal Date: Thu, 10 Oct 2013 12:33:01 +0200 Subject: [PATCH 1/2] Bring support for nicdelay back using NM's GATEWAY_PING_TIMEOUT (#979163) Resolves: rhbz#979163 --- loader/net.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/loader/net.c b/loader/net.c index 5a03ebc..7216d65 100644 --- a/loader/net.c +++ b/loader/net.c @@ -467,6 +467,7 @@ int readNetConfig(char * device, iface_t * iface, opts.v6Method = 0; #endif char *devicename = iface->device; + extern int post_link_sleep; if (iface->vlanid) { checked_asprintf(&devicename, "%s.%d", iface->device, iface->vlanid); @@ -486,7 +487,8 @@ int readNetConfig(char * device, iface_t * iface, return LOADER_BACK; } - i = wait_for_iface_activation(devicename, iface->dhcptimeout); + i = wait_for_iface_activation(devicename, + post_link_sleep > iface->dhcptimeout ? post_link_sleep : iface->dhcptimeout); newtPopWindow(); if (i > 0) { @@ -547,7 +549,8 @@ int readNetConfig(char * device, iface_t * iface, return LOADER_BACK; } - i = wait_for_iface_activation(iface->device, iface->dhcptimeout); + i = wait_for_iface_activation(iface->device, + post_link_sleep > iface->dhcptimeout ? post_link_sleep : iface->dhcptimeout); newtPopWindow(); if (i > 0) { @@ -1296,6 +1299,7 @@ int writeEnabledNetInfo(iface_t *iface) { struct utsname kv; char *uuid = NULL; char *devicename = iface->device; + extern int post_link_sleep; if (iface->vlanid) { checked_asprintf(&devicename, "%s.%d", iface->device, iface->vlanid); @@ -1543,6 +1547,10 @@ int writeEnabledNetInfo(iface_t *iface) { logMessage(INFO, "not setting default route via %s", devicename); } + if (post_link_sleep) { + fprintf(fp, "GATEWAY_PING_TIMEOUT=%d\n", post_link_sleep); + } + if (fclose(fp) == EOF) { free(ofile); free(nfile); -- 1.9.3