#include "ipcp.h"
#include "pathnames.h"
-static const char rcsid[] = RCSID;
/* global vars */
ipcp_options ipcp_wantoptions[NUM_PPP]; /* Options that we want to request */
{ "noipdefault", o_bool, &disable_defaultip,
"Don't use name for default IP adrs", 1 },
- { "ms-dns", 1, (void *)setdnsaddr,
- "DNS address for the peer's use" },
- { "ms-wins", 1, (void *)setwinsaddr,
- "Nameserver for SMB over TCP/IP for peer" },
+ { "ms-dns", o_special, (void *)setdnsaddr,
+ "DNS address for the peer's use", OPT_A2LIST },
+ { "ms-wins", o_special, (void *)setwinsaddr,
+ "Nameserver for SMB over TCP/IP for peer", OPT_A2LIST },
{ "ipcp-restart", o_int, &ipcp_fsm[0].timeouttime,
"Set timeout for IPCP", OPT_PRIO },
f->callbacks = &ipcp_callbacks;
fsm_init(&ipcp_fsm[unit]);
+ /*
+ * Some 3G modems use repeated IPCP NAKs as a way of stalling
+ * until they can contact a server on the network, so we increase
+ * the default number of NAKs we accept before we start treating
+ * them as rejects.
+ */
+ f->maxnakloops = 100;
+
memset(wo, 0, sizeof(*wo));
memset(ao, 0, sizeof(*ao));
goto bad; \
}
+#define ACKCIWINS(opt, addr) \
+ if (addr) { \
+ u_int32_t l; \
+ if ((len -= CILEN_ADDR) < 0) \
+ goto bad; \
+ GETCHAR(citype, p); \
+ GETCHAR(cilen, p); \
+ if (cilen != CILEN_ADDR || citype != opt) \
+ goto bad; \
+ GETLONG(l, p); \
+ cilong = htonl(l); \
+ if (addr != cilong) \
+ goto bad; \
+ }
+
ACKCIADDRS(CI_ADDRS, !go->neg_addr && go->old_addrs, go->ouraddr,
go->hisaddr);
ACKCIDNS(CI_MS_DNS2, go->req_dns2, go->dnsaddr[1]);
+ ACKCIWINS(CI_MS_WINS1, go->winsaddr[0]);
+
+ ACKCIWINS(CI_MS_WINS2, go->winsaddr[1]);
+
/*
* If there are any remaining CIs, then this packet is bad.
*/