Reading the values of pppoe_padi_timeout and pppoe_padi_attempts in
PPPOEInitDevice() means that they get sampled when the parsing the
ethernet device name. If the user provides the pppoe-padi-attempts or
pppoe-padi-timeout option after the ethernet device name, the value
given is effectively ignored.
Instead, read those variables in pppoe_check_options, which is called
after all options have been parsed, so that any user-specified values
don't get missed.
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
conn->ifName = devnam;
conn->discoverySocket = -1;
conn->sessionSocket = -1;
- conn->discoveryTimeout = pppoe_padi_timeout;
- conn->discoveryAttempts = pppoe_padi_attempts;
return 1;
}
ccp_allowoptions[0].bsd_compress = 0;
ccp_wantoptions[0].bsd_compress = 0;
+
+ conn->discoveryTimeout = pppoe_padi_timeout;
+ conn->discoveryAttempts = pppoe_padi_attempts;
}
struct channel pppoe_channel = {