Commit 9cecd07c authored by Simon Horman's avatar Simon Horman Committed by David S. Miller

[IPV4] Fix ip=dhcp regression

David Brownell pointed out a regression in my recent "Fix ip command
line processing" patch. It turns out to be a fairly blatant oversight on
my part whereby ic_enable is never set, and thus autoconfiguration is
never enabled. Clearly my testing was broken :-(

The solution that I have is to set ic_enable to 1 if we hit
ip_auto_config_setup(), which basically means that autoconfiguration is
activated unless told otherwise. I then flip ic_enable to 0 if ip=off,
ip=none, ip=::::::off or ip=::::::none using ic_proto_name();

The incremental patch is below, let me know if a non-incremental version
is prepared, as I did as for the original patch to be reverted pending a
fix.
Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1842c7f2
...@@ -1440,6 +1440,7 @@ static int __init ip_auto_config_setup(char *addrs) ...@@ -1440,6 +1440,7 @@ static int __init ip_auto_config_setup(char *addrs)
int num = 0; int num = 0;
ic_set_manually = 1; ic_set_manually = 1;
ic_enable = 1;
if (ic_proto_name(addrs)) if (ic_proto_name(addrs))
return 1; return 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment