Remove whitespace at the end of lines.

This commit is contained in:
Brian Somers 2002-06-15 08:03:30 +00:00
parent 232a0ff51d
commit 10be78d3ae
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=98243
31 changed files with 89 additions and 89 deletions

View File

@ -203,7 +203,7 @@ packets on the private subnet will be NAT'd.
- nat port <proto> <local addr>:<port> <nat port>
This command allows incoming traffic to <nat port> on the host
This command allows incoming traffic to <nat port> on the host
machine to be redirected to a specific machine and port on the
local area network. One example of this would be:
@ -229,7 +229,7 @@ case of a single, dynamically allocated IP address:
nat addr 10.0.0.8 0
The above command would redirect all incoming traffic to
machine 10.0.0.8.
machine 10.0.0.8.
If several address NATs specify the same public address
as follows
@ -318,7 +318,7 @@ Version 1.6: September 18, 1996
tracert from Win95 as well as FreeBSD traceroute.
Version 1.7: January 9, 1997 (cjm)
- Reduced malloc() activity for ICMP echo and
- Reduced malloc() activity for ICMP echo and
timestamp requests.
- Added handling for out-of-order IP fragments.
- Switched to differential checksum computation
@ -356,7 +356,7 @@ Version 1.9: February 1, 1997 (Eivind Eklund <perhaps@yes.no>)
disable this for debugging) (cjm)
- Sockets will be allocated in cases where there might be
port interference with the host machine. This can be disabled
in cases where the ppp host will be acting purely as a
in cases where the ppp host will be acting purely as a
masquerading router and not generate any traffic of its own.
(cjm)

View File

@ -170,7 +170,7 @@ atm_CreateDevice(struct physical *p, const char *iface, unsigned vpi,
{
struct atmdevice *dev;
struct sockaddr_natm sock;
if ((dev = calloc(1, sizeof *dev)) == NULL) {
log_Printf(LogWARN, "%s: Cannot allocate an atm device: %s\n",
p->link.name, strerror(errno));
@ -214,14 +214,14 @@ atm_Create(struct physical *p)
&& p->name.full[PPPOA_LEN] == ':') {
char iface[25];
unsigned vci, vpi;
if (sscanf(p->name.full + PPPOA_LEN + 1, "%25[A-Za-z0-9]:%u.%u", iface,
&vpi, &vci) != 3) {
log_Printf(LogWARN, "Malformed ATM device name \'%s\', "
"PPPoA:if:vpi.vci expected\n", p->name.full);
return NULL;
}
dev = atm_CreateDevice(p, iface, vpi, vci);
}

View File

@ -191,7 +191,7 @@ bundle_Notify(struct bundle *bundle, char c)
}
}
static void
static void
bundle_ClearQueues(void *v)
{
struct bundle *bundle = (struct bundle *)v;
@ -289,7 +289,7 @@ bundle_LayerUp(void *v, struct fsm *fp)
#ifndef NORADIUS
if (bundle->radius.sessiontime)
bundle_StartSessionTimer(bundle, 0);
#endif
#endif
bundle_StartIdleTimer(bundle, 0);
mp_CheckAutoloadTimer(&fp->bundle->ncp.mp);
}
@ -621,7 +621,7 @@ bundle_DescriptorRead(struct fdescriptor *d, struct bundle *bundle,
/*
* Drop the packet. If we were to queue it, we'd just end up with
* a pile of timed-out data in our output queue by the time we get
* around to actually dialing. We'd also prematurely reach the
* around to actually dialing. We'd also prematurely reach the
* threshold at which we stop select()ing to read() the tun
* device - breaking auto-dial.
*/
@ -1145,7 +1145,7 @@ bundle_ShowStatus(struct cmdargs const *arg)
return 0;
}
static void
static void
bundle_IdleTimeout(void *v)
{
struct bundle *bundle = (struct bundle *)v;
@ -1214,7 +1214,7 @@ bundle_RemainingIdleTime(struct bundle *bundle)
#ifndef NORADIUS
static void
static void
bundle_SessionTimeout(void *v)
{
struct bundle *bundle = (struct bundle *)v;

View File

@ -75,7 +75,7 @@ static void cbcp_SendReq(struct cbcp *);
static void cbcp_SendResponse(struct cbcp *);
static void cbcp_SendAck(struct cbcp *);
static void
static void
cbcp_Timeout(void *v)
{
struct cbcp *cbcp = (struct cbcp *)v;

View File

@ -452,7 +452,7 @@ CcpLayerDown(struct fsm *fp)
ccp->out.algorithm = -1;
}
ccp->his_reject = ccp->my_reject = 0;
while (ccp->out.opt) {
next = ccp->out.opt->next;
free(ccp->out.opt);

View File

@ -217,7 +217,7 @@ chap_BuildAnswer(char *name, char *key, u_char id, char *challenge, u_char type
GetMasterKey(pwdhashhash, ntresponse, MPPE_MasterKey); /* XXX Global ! */
/* Generate AUTHRESPONSE to verify on auth success */
GenerateAuthenticatorResponse(expkey, klen * 2, ntresponse,
GenerateAuthenticatorResponse(expkey, klen * 2, ntresponse,
peerchallenge + 1, challenge + 1, name, nlen,
authresponse);
@ -605,7 +605,7 @@ chap_Failure(struct authinfo *authp)
ptr += sprintf(buf, "E=691 R=0 C=");
for (i=0; i<16; i++)
ptr += sprintf(ptr, "%02X", *(auth2chap(authp)->challenge.local+1+i));
sprintf(ptr, " V=3 M=Invalid!");
msg = buf;
} else
@ -776,7 +776,7 @@ chap_Input(struct bundle *bundle, struct link *l, struct mbuf *bp)
ans[alen+1] = '\0';
bp = auth_ReadName(&chap->auth, bp, len);
#ifndef NODES
lanman = p->link.lcp.want_authtype == 0x80 &&
lanman = p->link.lcp.want_authtype == 0x80 &&
alen == 49 && ans[alen] == 0;
#endif
break;
@ -930,7 +930,7 @@ chap_Input(struct bundle *bundle, struct link *l, struct mbuf *bp)
datalink_AuthNotOk(p->dl);
log_Printf(LogWARN, "CHAP81: AuthenticatorResponse: (%.42s)"
" != ans: (%.42s)\n", chap->authresponse, ans);
} else {
/* Successful login */
MPPE_MasterKeyValid = 1; /* XXX Global ! */

View File

@ -132,7 +132,7 @@ ChallengeResponse(u_char *challenge, u_char *pwHash, u_char *response)
void
NtPasswordHash(char *key, int keylen, char *hash)
{
{
MD4_CTX MD4context;
MD4Init(&MD4context);
@ -142,7 +142,7 @@ NtPasswordHash(char *key, int keylen, char *hash)
void
HashNtPasswordHash(char *hash, char *hashhash)
{
{
MD4_CTX MD4context;
MD4Init(&MD4context);
@ -159,14 +159,14 @@ ChallengeHash(char *PeerChallenge, char *AuthenticatorChallenge,
char *Name;
Name = strrchr(UserName, '\\');
if(NULL == Name)
if(NULL == Name)
Name = UserName;
else
Name++;
SHA1_Init(&Context);
SHA1_Update(&Context, PeerChallenge, 16);
SHA1_Update(&Context, PeerChallenge, 16);
SHA1_Update(&Context, AuthenticatorChallenge, 16);
SHA1_Update(&Context, Name, strlen(Name));
@ -254,7 +254,7 @@ GenerateAuthenticatorResponse(char *Password, int PasswordLen,
SHA1_Update(&Context, NTResponse, 24);
SHA1_Update(&Context, Magic1, 39);
SHA1_Final(Digest, &Context);
ChallengeHash(PeerChallenge, AuthenticatorChallenge, UserName, UserNameLen,
ChallengeHash(PeerChallenge, AuthenticatorChallenge, UserName, UserNameLen,
Challenge);
SHA1_Init(&Context);
SHA1_Update(&Context, Digest, 20);
@ -275,7 +275,7 @@ GenerateAuthenticatorResponse(char *Password, int PasswordLen,
AuthenticatorResponse[i] = toupper(AuthenticatorResponse[i]);
}
void
GetMasterKey(char *PasswordHashHash, char *NTResponse, char *MasterKey)
{

View File

@ -32,7 +32,7 @@
/* Max # of (Unicode) chars in an NT password */
#define MAX_NT_PASSWORD 256
/* Don't rely on sizeof(MS_ChapResponse) in case of struct padding */
/* Don't rely on sizeof(MS_ChapResponse) in case of struct padding */
#define MS_CHAP_RESPONSE_LEN 49
#define CHAP81_RESPONSE_LEN 49
#define CHAP81_NTRESPONSE_LEN 24

View File

@ -449,7 +449,7 @@ chat_Read(struct fdescriptor *d, struct bundle *bundle, const fd_set *fdset)
/* Got it ! */
timer_Stop(&c->timeout);
if (memchr(begin + c->arglen - 1, '\n',
c->bufend - begin - c->arglen + 1) == NULL) {
c->bufend - begin - c->arglen + 1) == NULL) {
/* force it into the log */
end = c->bufend;
c->bufend = begin + c->arglen;
@ -467,7 +467,7 @@ chat_Read(struct fdescriptor *d, struct bundle *bundle, const fd_set *fdset)
if (!strncmp(begin, c->abort.string[n].data,
c->abort.string[n].len)) {
if (memchr(begin + c->abort.string[n].len - 1, '\n',
c->bufend - begin - c->abort.string[n].len + 1) == NULL) {
c->bufend - begin - c->abort.string[n].len + 1) == NULL) {
/* force it into the log */
end = c->bufend;
c->bufend = begin + c->abort.string[n].len;

View File

@ -314,7 +314,7 @@ RenameCommand(struct cmdargs const *arg)
if (bundle_RenameDatalink(arg->bundle, arg->cx, arg->argv[arg->argn]))
return 0;
log_Printf(LogWARN, "%s -> %s: target name already exists\n",
log_Printf(LogWARN, "%s -> %s: target name already exists\n",
arg->cx->name, arg->argv[arg->argn]);
return 1;
}
@ -527,7 +527,7 @@ command_Expand(char **nargv, int argc, char const *const *oargv,
nargv[arg] = subst(nargv[arg], "COMPILATIONDATE", __DATE__);
nargv[arg] = substip(nargv[arg], "DNS0", bundle->ncp.ipcp.ns.dns[0]);
nargv[arg] = substip(nargv[arg], "DNS1", bundle->ncp.ipcp.ns.dns[1]);
nargv[arg] = subst(nargv[arg], "ENDDISC",
nargv[arg] = subst(nargv[arg], "ENDDISC",
mp_Enddisc(bundle->ncp.mp.cfg.enddisc.class,
bundle->ncp.mp.cfg.enddisc.address,
bundle->ncp.mp.cfg.enddisc.len));
@ -538,20 +538,20 @@ command_Expand(char **nargv, int argc, char const *const *oargv,
nargv[arg] = subst(nargv[arg], "INTERFACE", bundle->iface->name);
nargv[arg] = substull(nargv[arg], "IPOCTETSIN",
bundle->ncp.ipcp.throughput.OctetsIn);
nargv[arg] = substull(nargv[arg], "IPOCTETSOUT",
nargv[arg] = substull(nargv[arg], "IPOCTETSOUT",
bundle->ncp.ipcp.throughput.OctetsOut);
nargv[arg] = substull(nargv[arg], "IPPACKETSIN",
nargv[arg] = substull(nargv[arg], "IPPACKETSIN",
bundle->ncp.ipcp.throughput.PacketsIn);
nargv[arg] = substull(nargv[arg], "IPPACKETSOUT",
nargv[arg] = substull(nargv[arg], "IPPACKETSOUT",
bundle->ncp.ipcp.throughput.PacketsOut);
#ifndef NOINET6
nargv[arg] = substull(nargv[arg], "IPV6OCTETSIN",
nargv[arg] = substull(nargv[arg], "IPV6OCTETSIN",
bundle->ncp.ipv6cp.throughput.OctetsIn);
nargv[arg] = substull(nargv[arg], "IPV6OCTETSOUT",
nargv[arg] = substull(nargv[arg], "IPV6OCTETSOUT",
bundle->ncp.ipv6cp.throughput.OctetsOut);
nargv[arg] = substull(nargv[arg], "IPV6PACKETSIN",
nargv[arg] = substull(nargv[arg], "IPV6PACKETSIN",
bundle->ncp.ipv6cp.throughput.PacketsIn);
nargv[arg] = substull(nargv[arg], "IPV6PACKETSOUT",
nargv[arg] = substull(nargv[arg], "IPV6PACKETSOUT",
bundle->ncp.ipv6cp.throughput.PacketsOut);
#endif
nargv[arg] = subst(nargv[arg], "LABEL", bundle_GetLabel(bundle));
@ -1661,7 +1661,7 @@ SetVariable(struct cmdargs const *arg)
case VAR_AUTOLOAD:
if (arg->argc == arg->argn + 3) {
int v1, v2, v3;
int v1, v2, v3;
char *end;
v1 = strtol(arg->argv[arg->argn], &end, 0);
@ -2258,7 +2258,7 @@ static struct cmdtab const SetCommands[] = {
"callback control", "set callback [none|auth|cbcp|"
"E.164 *|number[,number]...]...", (const void *)VAR_CALLBACK},
{"cbcp", NULL, SetVariable, LOCAL_AUTH | LOCAL_CX,
"CBCP control", "set cbcp [*|phone[,phone...] [delay [timeout]]]",
"CBCP control", "set cbcp [*|phone[,phone...] [delay [timeout]]]",
(const void *)VAR_CBCP},
{"ccpretry", "ccpretries", SetVariable, LOCAL_AUTH | LOCAL_CX_OPT,
"CCP retries", "set ccpretry value [attempts]", (const void *)VAR_CCPRETRY},
@ -2277,7 +2277,7 @@ static struct cmdtab const SetCommands[] = {
(const void *) VAR_WINSIZE},
#ifndef NODES
{"mppe", NULL, SetVariable, LOCAL_AUTH | LOCAL_CX_OPT,
"MPPE key size and state", "set mppe [40|56|128|* [stateful|stateless|*]]",
"MPPE key size and state", "set mppe [40|56|128|* [stateful|stateless|*]]",
(const void *) VAR_MPPE},
#endif
{"device", "line", SetVariable, LOCAL_AUTH | LOCAL_CX,
@ -2989,7 +2989,7 @@ ClearCommand(struct cmdargs const *arg)
clear_type |= THROUGHPUT_PEAK;
else
return -1;
} else
} else
clear_type = THROUGHPUT_ALL;
throughput_clear(t, clear_type, arg->prompt);

View File

@ -210,14 +210,14 @@ datalink_LoginDone(struct datalink *dl)
{
chat_Finish(&dl->chat);
if (!dl->script.packetmode) {
if (!dl->script.packetmode) {
dl->dial.tries = -1;
dl->dial.incs = 0;
datalink_NewState(dl, DATALINK_READY);
} else if (!physical_Raw(dl->physical)) {
dl->dial.tries = 0;
log_Printf(LogWARN, "datalink_LoginDone: Not connected.\n");
if (dl->script.run) {
if (dl->script.run) {
datalink_NewState(dl, DATALINK_LOGOUT);
if (!chat_Setup(&dl->chat, dl->cfg.script.logout, NULL))
log_Printf(LogWARN, "Invalid logout script\n");
@ -339,7 +339,7 @@ datalink_UpdateSet(struct fdescriptor *d, fd_set *r, fd_set *w, fd_set *e,
case CARRIER_LOST:
physical_Offline(dl->physical); /* Is this required ? */
if (dl->script.run) {
if (dl->script.run) {
datalink_NewState(dl, DATALINK_HANGUP);
if (!chat_Setup(&dl->chat, dl->cfg.script.hangup, NULL))
log_Printf(LogWARN, "Invalid hangup script\n");

View File

@ -228,7 +228,7 @@ ID0logout(const char *device, int nologout)
ID0set0();
if (nologout || logout(ut_line)) {
log_Printf(LogID0, "logout(\"%s\")\n", ut_line);
logwtmp(ut_line, "", "");
logwtmp(ut_line, "", "");
log_Printf(LogID0, "logwtmp(\"%s\", \"\", \"\")\n", ut_line);
} else
log_Printf(LogERROR, "ID0logout: No longer logged in on %s\n", ut_line);

View File

@ -252,7 +252,7 @@ iface_addr_Zap(const char *name, struct iface_addr *addr, int s)
memcpy(&ifra6.ifra_dstaddr, &sspeer, sizeof ifra6.ifra_dstaddr);
ifra6.ifra_lifetime.ia6t_vltime = ND6_INFINITE_LIFETIME;
ifra6.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME;
res = ID0ioctl(s, SIOCDIFADDR_IN6, &ifra6);
break;
#endif
@ -386,7 +386,7 @@ iface_Clear(struct iface *iface, struct ncp *ncp, int family, int how)
}
s = &s4;
break;
#ifndef NOINET6
case AF_INET6:
if (in6skip) {

View File

@ -218,7 +218,7 @@ FilterCheck(const unsigned char *packet, u_int32_t family,
*/
const struct ip *pip = (const struct ip *)packet;
len = ntohs(pip->ip_off) & IP_OFFMASK; /* fragment offset */
len = ntohs(pip->ip_off) & IP_OFFMASK; /* fragment offset */
if (len > 0) { /* Not first fragment within datagram */
if (len < (24 >> 3)) { /* don't allow fragment to over-write header */
log_Printf(LogFILTER, " error: illegal header\n");
@ -231,7 +231,7 @@ FilterCheck(const unsigned char *packet, u_int32_t family,
} else
return 0;
}
ncpaddr_setip4(&srcaddr, pip->ip_src);
ncpaddr_setip4(&dstaddr, pip->ip_dst);
datalen = ntohs(pip->ip_len) - (pip->ip_hl << 2);
@ -432,12 +432,12 @@ FilterCheck(const unsigned char *packet, u_int32_t family,
} else {
if (log_IsKept(LogFILTER)) {
snprintf(dstip, sizeof dstip, "%s", ncpaddr_ntoa(&dstaddr));
log_Printf(LogFILTER,
"%sbound rule = %d deny %s src = %s/%d dst = %s/%d\n",
log_Printf(LogFILTER,
"%sbound rule = %d deny %s src = %s/%d dst = %s/%d\n",
filter->name, n, prototxt,
ncpaddr_ntoa(&srcaddr), sport, dstip, dport);
}
return 1;
return 1;
} /* Explict match. Deny this packet */
}
} else {
@ -448,8 +448,8 @@ FilterCheck(const unsigned char *packet, u_int32_t family,
if (log_IsKept(LogFILTER)) {
snprintf(dstip, sizeof dstip, "%s", ncpaddr_ntoa(&dstaddr));
log_Printf(LogFILTER,
"%sbound rule = implicit deny %s src = %s/%d dst = %s/%d\n",
log_Printf(LogFILTER,
"%sbound rule = implicit deny %s src = %s/%d dst = %s/%d\n",
filter->name, prototxt, ncpaddr_ntoa(&srcaddr), sport,
dstip, dport);
}
@ -849,7 +849,7 @@ PacketCheck(struct bundle *bundle, u_int32_t family,
*psecs = alivesecs;
if (*psecs) {
if (*psecs != alivesecs)
log_Printf(LogTCPIP, "%s - (timeout = %d / ALIVE = %d secs)\n",
log_Printf(LogTCPIP, "%s - (timeout = %d / ALIVE = %d secs)\n",
logbuf, *psecs, alivesecs);
else
log_Printf(LogTCPIP, "%s - (timeout = %d secs)\n", logbuf, *psecs);

View File

@ -339,7 +339,7 @@ ipcp_RestoreDNS(struct ipcp *ipcp)
} else if (remove(_PATH_RESCONF) == -1)
log_Printf(LogERROR, "Failed removing %s: %s\n", _PATH_RESCONF,
strerror(errno));
}
int
@ -938,7 +938,7 @@ IpcpLayerUp(struct fsm *fp)
return 0;
#ifndef NORADIUS
radius_Account(&fp->bundle->radius, &fp->bundle->radacct, fp->bundle->links,
radius_Account(&fp->bundle->radius, &fp->bundle->radacct, fp->bundle->links,
RAD_START, &ipcp->peer_ip, &ipcp->ifmask, &ipcp->throughput);
if (fp->bundle->radius.cfg.file && fp->bundle->radius.filterid)

View File

@ -1219,7 +1219,7 @@ LcpDecodeConfig(struct fsm *fp, u_char *cp, u_char *end, int mode_type,
break;
}
break;
default:
sz = (sizeof desc - 2) / 2;
if (sz > opt->hdr.len - 2)

View File

@ -323,7 +323,7 @@ log_Printf(int lev, const char *fmt,...)
LogTunno, log_Name(lev), fmt);
else
snprintf(nfmt, sizeof nfmt, "%s: %s", log_Name(lev), fmt);
if (log_PromptContext && lev == LogWARN)
/* Warnings just go to the current prompt */
prompt_vPrintf(log_PromptContext, nfmt, ap);

View File

@ -53,7 +53,7 @@
#define LogERROR (23) /* syslog(LOG_ERR, ....), + sent to VarTerm */
#define LogALERT (24) /* syslog(LOG_ALERT, ....) */
#define LogMAXCONF (21)
#define LogMAXCONF (21)
#define LogMAX (24)
struct mbuf;

View File

@ -240,7 +240,7 @@ lqr_Input(struct bundle *bundle, struct link *l, struct mbuf *bp)
if (p->hdlc.lqm.timer.load == 0 ||
!(p->hdlc.lqm.method & LQM_LQR) ||
(lastLQR && lastLQR == p->hdlc.lqm.lqr.peer.PeerInLQRs) ||
(p->hdlc.lqm.lqr.peer_timeout &&
(p->hdlc.lqm.lqr.peer_timeout &&
p->hdlc.lqm.timer.rest * 100 / SECTICKS >
p->hdlc.lqm.lqr.peer_timeout))
SendLqrData(lcp);

View File

@ -86,7 +86,7 @@ m_length(struct mbuf *bp)
static const char *
mbuftype(int type)
{
static const char * const mbufdesc[MB_MAX] = {
static const char * const mbufdesc[MB_MAX] = {
"ip in", "ip out", "ipv6 in", "ipv6 out", "nat in", "nat out",
"mp in", "mp out", "vj in", "vj out", "icompd in", "icompd out",
"compd in", "compd out", "lqr in", "lqr out", "echo in", "echo out",
@ -110,7 +110,7 @@ m_get(size_t m_len, int type)
log_Printf(LogERROR, "Bad mbuf type %d\n", type);
type = MB_UNKNOWN;
}
if (m_len > M_MAXLEN || m_len == 0) {
log_Printf(LogERROR, "Request for mbuf size %lu (\"%s\") denied !\n",
(u_long)m_len, mbuftype(type));
@ -342,7 +342,7 @@ struct mbuf *
m_dequeue(struct mqueue *q)
{
struct mbuf *bp;
log_Printf(LogDEBUG, "m_dequeue: queue len = %lu\n", (u_long)q->len);
bp = q->top;
if (bp) {

View File

@ -405,7 +405,7 @@ ncpaddr_aton(struct ncpaddr *addr, struct ncp *ncp, const char *data)
if (!ncprange_aton(&range, ncp, data))
return 0;
if (range.ncprange_family == AF_INET && range.ncprange_ip4width != 32) {
log_Printf(LogWARN, "ncpaddr_aton: %s: Only 32 bits allowed\n", data);
return 0;

View File

@ -616,7 +616,7 @@ ng_Create(struct physical *p)
break;
}
}
if (f == ninfo->hooks) {
/* Attempt to load the module */
snprintf(modname, sizeof modname, "ng_%s", nodetype);

View File

@ -479,7 +479,7 @@ physical_ShowStatus(struct cmdargs const *arg)
prompt_Printf(arg->prompt, "\"%s\"", dev);
dev += strlen(dev) + 1;
}
prompt_Printf(arg->prompt, "\n Characteristics: ");
if (physical_IsSync(arg->cx->physical))
prompt_Printf(arg->prompt, "sync");

View File

@ -277,7 +277,7 @@ prompt_Read(struct fdescriptor *d, struct bundle *bundle, const fd_set *fdset)
arg.bundle = bundle;
arg.cx = p->TermMode;
arg.prompt = p;
mbuf_Show(&arg);
}
break;

View File

@ -448,7 +448,7 @@ radius_Process(struct radius *r, int got)
r->msrepstr);
}
break;
case RAD_MICROSOFT_MS_MPPE_ENCRYPTION_POLICY:
r->mppe.policy = rad_cvt_int(data);
log_Printf(LogPHASE, " MS-MPPE-Encryption-Policy %s\n",
@ -820,7 +820,7 @@ radius_Authenticate(struct radius *r, struct authinfo *authp, const char *name,
break;
#endif
default:
log_Printf(LogERROR, "CHAP: Unrecognised type 0x%02x\n",
log_Printf(LogERROR, "CHAP: Unrecognised type 0x%02x\n",
authp->physical->link.lcp.want_authtype);
rad_close(r->cx.rad);
return 0;
@ -871,7 +871,7 @@ radius_Authenticate(struct radius *r, struct authinfo *authp, const char *name,
* Send an accounting request to the RADIUS server
*/
void
radius_Account(struct radius *r, struct radacct *ac, struct datalink *dl,
radius_Account(struct radius *r, struct radacct *ac, struct datalink *dl,
int acct_type, struct in_addr *peer_ip, struct in_addr *netmask,
struct pppThroughput *stats)
{
@ -920,7 +920,7 @@ radius_Account(struct radius *r, struct radacct *ac, struct datalink *dl,
ac->user_name[AUTHLEN-1] = '\0';
ac->authentic = 2; /* Assume RADIUS verified auth data */
/* Generate a session ID */
snprintf(ac->session_id, sizeof ac->session_id, "%s%ld-%s%lu",
dl->bundle->cfg.auth.name, (long)getpid(),
@ -938,8 +938,8 @@ radius_Account(struct radius *r, struct radacct *ac, struct datalink *dl,
if (rad_put_string(r->cx.rad, RAD_USER_NAME, ac->user_name) != 0 ||
rad_put_int(r->cx.rad, RAD_SERVICE_TYPE, RAD_FRAMED) != 0 ||
rad_put_int(r->cx.rad, RAD_FRAMED_PROTOCOL, RAD_PPP) != 0 ||
rad_put_addr(r->cx.rad, RAD_FRAMED_IP_ADDRESS, ac->ip) != 0 ||
rad_put_int(r->cx.rad, RAD_FRAMED_PROTOCOL, RAD_PPP) != 0 ||
rad_put_addr(r->cx.rad, RAD_FRAMED_IP_ADDRESS, ac->ip) != 0 ||
rad_put_addr(r->cx.rad, RAD_FRAMED_IP_NETMASK, ac->mask) != 0) {
log_Printf(LogERROR, "rad_put: %s\n", rad_strerror(r->cx.rad));
rad_close(r->cx.rad);
@ -971,10 +971,10 @@ radius_Account(struct radius *r, struct radacct *ac, struct datalink *dl,
radius_put_physical_details(r->cx.rad, dl->physical);
if (rad_put_int(r->cx.rad, RAD_ACCT_STATUS_TYPE, acct_type) != 0 ||
rad_put_string(r->cx.rad, RAD_ACCT_SESSION_ID, ac->session_id) != 0 ||
rad_put_string(r->cx.rad, RAD_ACCT_SESSION_ID, ac->session_id) != 0 ||
rad_put_string(r->cx.rad, RAD_ACCT_MULTI_SESSION_ID,
ac->multi_session_id) != 0 ||
rad_put_int(r->cx.rad, RAD_ACCT_DELAY_TIME, 0) != 0) {
rad_put_int(r->cx.rad, RAD_ACCT_DELAY_TIME, 0) != 0) {
/* XXX ACCT_DELAY_TIME should be increased each time a packet is waiting */
log_Printf(LogERROR, "rad_put: %s\n", rad_strerror(r->cx.rad));
rad_close(r->cx.rad);

View File

@ -86,7 +86,7 @@ extern void radius_Show(struct radius *, struct prompt *);
extern int radius_Authenticate(struct radius *, struct authinfo *,
const char *, const char *, int,
const char *, int, const char *, int);
extern void radius_Account(struct radius *, struct radacct *,
extern void radius_Account(struct radius *, struct radacct *,
struct datalink *, int, struct in_addr *,
struct in_addr *, struct pppThroughput *);

View File

@ -184,7 +184,7 @@ sl_compress_tcp(struct mbuf * m,
/*
* Wasn't the first -- search for it.
*
*
* States are kept in a circularly linked list with last_cs pointing to the
* end of the list. The list is kept in lru order by moving a state to
* the head of the list whenever it is referenced. Since the list is

View File

@ -70,7 +70,7 @@
* We are in a liberal position about MSS
* (RFC 879, section 7).
*/
#define MAXMSS(mtu) (mtu - sizeof(struct ip) - sizeof(struct tcphdr))
#define MAXMSS(mtu) (mtu - sizeof(struct ip) - sizeof(struct tcphdr))
/*-

View File

@ -85,8 +85,8 @@ throughput_uptime(struct pppThroughput *t)
downat = t->downtime ? t->downtime : time(NULL);
if (t->uptime && downat < t->uptime) {
/* Euch ! The clock's gone back ! */
int i;
int i;
for (i = 0; i < t->SamplePeriod; i++)
t->in.SampleOctets[i] = t->out.SampleOctets[i] = 0;
t->nSample = 0;
@ -270,7 +270,7 @@ throughput_clear(struct pppThroughput *t, int clear_type, struct prompt *prompt)
t->OctetsIn = t->OctetsOut = 0;
t->downtime = 0;
time(&t->uptime);
}
}
if (clear_type & THROUGHPUT_CURRENT) {
prompt_Printf(prompt, "current cleared (was %6qu bytes/sec in,"
@ -287,7 +287,7 @@ throughput_clear(struct pppThroughput *t, int clear_type, struct prompt *prompt)
if (last > time_buf && *--last == '\n')
*last = '\0';
prompt_Printf(prompt, "peak cleared (was %6qu bytes/sec on %s)\n",
t->BestOctetsPerSecond, time_buf);
t->BestOctetsPerSecond, time_buf);
t->BestOctetsPerSecond = 0;
time(&t->BestOctetsPerSecondTime);
}

View File

@ -211,13 +211,13 @@ TimerService(void)
exp = tp;
tp = next;
} while (tp && tp->rest == 0);
TimerList = tp;
if (TimerList != NULL) /* Any timers remaining ? */
timer_InitService(1); /* Restart the Timer Service */
else
timer_TermService(); /* Stop the Timer Service */
/* Process all expired timers */
while (exp) {
ExpiredList = exp->enext;
@ -262,7 +262,7 @@ timer_Show(int LogLevel, struct prompt *prompt)
log_Printf(LogLevel, "---- End of Timer Service List ---\n");
}
void
void
timer_InitService(int restart)
{
struct itimerval itimer;
@ -279,7 +279,7 @@ timer_InitService(int restart)
}
}
void
void
timer_TermService(void)
{
struct itimerval itimer;

View File

@ -86,9 +86,9 @@ tun_configure(struct bundle *bundle)
#ifdef __NetBSD__
struct ifreq ifr;
int s;
s = socket(PF_INET, SOCK_DGRAM, 0);
if (s < 0) {
log_Printf(LogERROR, "tun_configure: socket(): %s\n", strerror(errno));
return;
@ -107,7 +107,7 @@ tun_configure(struct bundle *bundle)
memset(&info, '\0', sizeof info);
info.type = IFT_PPP;
info.mtu = bundle->iface->mtu;
info.baudrate = bundle->bandwidth;
#ifdef __OpenBSD__
info.flags = IFF_UP|IFF_POINTOPOINT|IFF_MULTICAST;