From: David S. Miller Date: Thu, 10 Jul 2014 05:25:18 +0000 (-0700) Subject: ipconfig: Only bootp paths should reference ic_dev_xid. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=405fd707196d596f59a510d176dedc979c1ae34b;p=linux-beck.git ipconfig: Only bootp paths should reference ic_dev_xid. It is only tested, and declared, in the bootp code. So, in ic_dynamic() guard it's setting with IPCONFIG_BOOTP. Signed-off-by: David S. Miller --- diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index f02f594d04c5..5bbef4fdcb43 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c @@ -1217,10 +1217,10 @@ static int __init ic_dynamic(void) get_random_bytes(&timeout, sizeof(timeout)); timeout = CONF_BASE_TIMEOUT + (timeout % (unsigned int) CONF_TIMEOUT_RANDOM); for (;;) { +#ifdef IPCONFIG_BOOTP /* Track the device we are configuring */ ic_dev_xid = d->xid; -#ifdef IPCONFIG_BOOTP if (do_bootp && (d->able & IC_BOOTP)) ic_bootp_send_if(d, jiffies - start_jiffies); #endif