static int setdnsaddr __P((char **));
static int setwinsaddr __P((char **));
static int setnetmask __P((char **));
-static int setipaddr __P((char *, char **, int));
+// brcm
+int setipaddr __P((char *, char **, int));
+// brcm
static void printipaddr __P((option_t *, void (*)(void *, char *,...),void *));
static option_t ipcp_option_list[] = {
* If doit is 0, the call is to check whether this option is
* potentially an IP address specification.
*/
-static int
+int
setipaddr(arg, argv, doit)
char *arg;
char **argv;
*colon = ':';
prio_local = option_priority;
}
-
+
/*
* If colon last character, then no remote addr.
*/
wo->hisaddr = remote;
prio_remote = option_priority;
}
+ // brcm
+ ask_for_local = wo->ouraddr != 0 || !disable_defaultip;
+ // brcm
return 1;
}
ipcp_init(unit)
int unit;
{
+ IPCPDEBUG(("IPCP: Init"));
fsm *f = &ipcp_fsm[unit];
ipcp_options *wo = &ipcp_wantoptions[unit];
ipcp_options *ao = &ipcp_allowoptions[unit];
{
ipcp_options *go = &ipcp_gotoptions[f->unit];
int len = *lenp;
+ IPCPDEBUG(("IPCP: Add CI"));
#define ADDCIVJ(opt, neg, val, old, maxslotindex, cflag) \
if (neg) { \
u_short cilen, citype, cishort;
u_int32_t cilong;
u_char cimaxslotindex, cicflag;
-
+
+ IPCPDEBUG(("IPCP: Acknowledge CI"));
/*
* CIs must be in exactly the same order that we sent...
* Check packet length and CI length at each step.
u_int32_t ciaddr1, ciaddr2, l, cidnsaddr;
ipcp_options no; /* options we've seen Naks for */
ipcp_options try; /* options to request next time */
-
+
+ IPCPDEBUG(("IPCP: NAK CI"));
BZERO(&no, sizeof(no));
try = *go;
u_int32_t cilong;
ipcp_options try; /* options to request next time */
+ IPCPDEBUG(("IPCP: Reject CI"));
try = *go;
/*
* Any Rejected CIs must be in exactly the same order that we sent.
goto bad; \
} \
try.neg = 0; \
+ /* USR9108 fail connection if IP if is regected */ \
+ try.ouraddr = 0; \
}
#define REJCIVJ(opt, neg, val, old, maxslot, cflag) \
* Reset all his options.
*/
BZERO(ho, sizeof(*ho));
-
+ IPCPDEBUG(("IPCP: Request CI"));
/*
* Process all his options.
*/
ip_demand_conf(u)
int u;
{
+ IPCPDEBUG(("IPCP: Demand config"));
ipcp_options *wo = &ipcp_wantoptions[u];
if (wo->hisaddr == 0) {
static int file_save(char * path, char * content, int check)
{
FILE *f;
- char cmd[128]="";
// brcm
if (check) {
// brcm
static void config_save()
{
- FILE *f;
char path[128]="";
- static wan_config_router_check=1;
- static wan_config_dns_check=1;
+ static int wan_config_router_check=1;
+ static int wan_config_dns_check=1;
char cmd[64]="";
if (strlen(session_path) > 0)