From 10be78d3ae11fbdd8fab4a4a34d5337ce071dd1d Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Sat, 15 Jun 2002 08:03:30 +0000 Subject: [PATCH] Remove whitespace at the end of lines. --- usr.sbin/ppp/README.nat | 8 ++++---- usr.sbin/ppp/atm.c | 6 +++--- usr.sbin/ppp/bundle.c | 10 +++++----- usr.sbin/ppp/cbcp.c | 2 +- usr.sbin/ppp/ccp.c | 2 +- usr.sbin/ppp/chap.c | 8 ++++---- usr.sbin/ppp/chap_ms.c | 12 ++++++------ usr.sbin/ppp/chap_ms.h | 2 +- usr.sbin/ppp/chat.c | 4 ++-- usr.sbin/ppp/command.c | 26 +++++++++++++------------- usr.sbin/ppp/datalink.c | 6 +++--- usr.sbin/ppp/id.c | 2 +- usr.sbin/ppp/iface.c | 4 ++-- usr.sbin/ppp/ip.c | 16 ++++++++-------- usr.sbin/ppp/ipcp.c | 4 ++-- usr.sbin/ppp/lcp.c | 2 +- usr.sbin/ppp/log.c | 2 +- usr.sbin/ppp/log.h | 2 +- usr.sbin/ppp/lqr.c | 2 +- usr.sbin/ppp/mbuf.c | 6 +++--- usr.sbin/ppp/ncpaddr.c | 2 +- usr.sbin/ppp/netgraph.c | 2 +- usr.sbin/ppp/physical.c | 2 +- usr.sbin/ppp/prompt.c | 2 +- usr.sbin/ppp/radius.c | 16 ++++++++-------- usr.sbin/ppp/radius.h | 2 +- usr.sbin/ppp/slcompress.c | 2 +- usr.sbin/ppp/tcpmss.c | 2 +- usr.sbin/ppp/throughput.c | 8 ++++---- usr.sbin/ppp/timer.c | 8 ++++---- usr.sbin/ppp/tun.c | 6 +++--- 31 files changed, 89 insertions(+), 89 deletions(-) diff --git a/usr.sbin/ppp/README.nat b/usr.sbin/ppp/README.nat index 0a95c8177853..9ff240a9f37c 100644 --- a/usr.sbin/ppp/README.nat +++ b/usr.sbin/ppp/README.nat @@ -203,7 +203,7 @@ packets on the private subnet will be NAT'd. - nat port : -This command allows incoming traffic to on the host +This command allows incoming traffic to 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 ) 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) diff --git a/usr.sbin/ppp/atm.c b/usr.sbin/ppp/atm.c index 5d41bacb547c..0d51564d3550 100644 --- a/usr.sbin/ppp/atm.c +++ b/usr.sbin/ppp/atm.c @@ -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); } diff --git a/usr.sbin/ppp/bundle.c b/usr.sbin/ppp/bundle.c index 5a8536cb2ca8..f0c8f94ee805 100644 --- a/usr.sbin/ppp/bundle.c +++ b/usr.sbin/ppp/bundle.c @@ -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; diff --git a/usr.sbin/ppp/cbcp.c b/usr.sbin/ppp/cbcp.c index 38684351190a..674ea70d78ba 100644 --- a/usr.sbin/ppp/cbcp.c +++ b/usr.sbin/ppp/cbcp.c @@ -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; diff --git a/usr.sbin/ppp/ccp.c b/usr.sbin/ppp/ccp.c index aef3a517fecd..cb6f025eb258 100644 --- a/usr.sbin/ppp/ccp.c +++ b/usr.sbin/ppp/ccp.c @@ -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); diff --git a/usr.sbin/ppp/chap.c b/usr.sbin/ppp/chap.c index 8bce94683e3e..33c84934146c 100644 --- a/usr.sbin/ppp/chap.c +++ b/usr.sbin/ppp/chap.c @@ -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 ! */ diff --git a/usr.sbin/ppp/chap_ms.c b/usr.sbin/ppp/chap_ms.c index c7d1480f5d9c..74ac19980016 100644 --- a/usr.sbin/ppp/chap_ms.c +++ b/usr.sbin/ppp/chap_ms.c @@ -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) { diff --git a/usr.sbin/ppp/chap_ms.h b/usr.sbin/ppp/chap_ms.h index 35b983791e12..35ee978de2dd 100644 --- a/usr.sbin/ppp/chap_ms.h +++ b/usr.sbin/ppp/chap_ms.h @@ -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 diff --git a/usr.sbin/ppp/chat.c b/usr.sbin/ppp/chat.c index 79632b1fc92b..79e41ea1a974 100644 --- a/usr.sbin/ppp/chat.c +++ b/usr.sbin/ppp/chat.c @@ -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; diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index ca68528d7cbe..cf12305de01e 100644 --- a/usr.sbin/ppp/command.c +++ b/usr.sbin/ppp/command.c @@ -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); diff --git a/usr.sbin/ppp/datalink.c b/usr.sbin/ppp/datalink.c index 7a9958943ac1..048a21b7c24d 100644 --- a/usr.sbin/ppp/datalink.c +++ b/usr.sbin/ppp/datalink.c @@ -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"); diff --git a/usr.sbin/ppp/id.c b/usr.sbin/ppp/id.c index 97a680e56607..440d460e5301 100644 --- a/usr.sbin/ppp/id.c +++ b/usr.sbin/ppp/id.c @@ -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); diff --git a/usr.sbin/ppp/iface.c b/usr.sbin/ppp/iface.c index b5ae7b485811..922d1f05ef08 100644 --- a/usr.sbin/ppp/iface.c +++ b/usr.sbin/ppp/iface.c @@ -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) { diff --git a/usr.sbin/ppp/ip.c b/usr.sbin/ppp/ip.c index 269376fa798b..3c0d54ba03bf 100644 --- a/usr.sbin/ppp/ip.c +++ b/usr.sbin/ppp/ip.c @@ -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); diff --git a/usr.sbin/ppp/ipcp.c b/usr.sbin/ppp/ipcp.c index 60597e2af0de..0a06e8b4cd36 100644 --- a/usr.sbin/ppp/ipcp.c +++ b/usr.sbin/ppp/ipcp.c @@ -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) diff --git a/usr.sbin/ppp/lcp.c b/usr.sbin/ppp/lcp.c index e4a92ace865b..e620a2f3c83f 100644 --- a/usr.sbin/ppp/lcp.c +++ b/usr.sbin/ppp/lcp.c @@ -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) diff --git a/usr.sbin/ppp/log.c b/usr.sbin/ppp/log.c index d80af36fca3e..b2a6b9954565 100644 --- a/usr.sbin/ppp/log.c +++ b/usr.sbin/ppp/log.c @@ -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); diff --git a/usr.sbin/ppp/log.h b/usr.sbin/ppp/log.h index e34d8cabb1f2..f3fef6559431 100644 --- a/usr.sbin/ppp/log.h +++ b/usr.sbin/ppp/log.h @@ -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; diff --git a/usr.sbin/ppp/lqr.c b/usr.sbin/ppp/lqr.c index 2fe1844d08de..f72c899c44d5 100644 --- a/usr.sbin/ppp/lqr.c +++ b/usr.sbin/ppp/lqr.c @@ -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); diff --git a/usr.sbin/ppp/mbuf.c b/usr.sbin/ppp/mbuf.c index 95c32b00986f..4ba547e231dc 100644 --- a/usr.sbin/ppp/mbuf.c +++ b/usr.sbin/ppp/mbuf.c @@ -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) { diff --git a/usr.sbin/ppp/ncpaddr.c b/usr.sbin/ppp/ncpaddr.c index fd3c5109cf1b..3d2d356f1d3d 100644 --- a/usr.sbin/ppp/ncpaddr.c +++ b/usr.sbin/ppp/ncpaddr.c @@ -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; diff --git a/usr.sbin/ppp/netgraph.c b/usr.sbin/ppp/netgraph.c index e8acaa0ee84d..1ada596d2172 100644 --- a/usr.sbin/ppp/netgraph.c +++ b/usr.sbin/ppp/netgraph.c @@ -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); diff --git a/usr.sbin/ppp/physical.c b/usr.sbin/ppp/physical.c index 073ee573fb4f..3f4ef31d2988 100644 --- a/usr.sbin/ppp/physical.c +++ b/usr.sbin/ppp/physical.c @@ -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"); diff --git a/usr.sbin/ppp/prompt.c b/usr.sbin/ppp/prompt.c index 05509c11efac..7f1f94e78afc 100644 --- a/usr.sbin/ppp/prompt.c +++ b/usr.sbin/ppp/prompt.c @@ -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; diff --git a/usr.sbin/ppp/radius.c b/usr.sbin/ppp/radius.c index a3b01f2da592..99abb2a53b03 100644 --- a/usr.sbin/ppp/radius.c +++ b/usr.sbin/ppp/radius.c @@ -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); diff --git a/usr.sbin/ppp/radius.h b/usr.sbin/ppp/radius.h index 0b01b239dbf7..f7d6fae9f2bf 100644 --- a/usr.sbin/ppp/radius.h +++ b/usr.sbin/ppp/radius.h @@ -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 *); diff --git a/usr.sbin/ppp/slcompress.c b/usr.sbin/ppp/slcompress.c index 6df3fa2a8230..299530140f1a 100644 --- a/usr.sbin/ppp/slcompress.c +++ b/usr.sbin/ppp/slcompress.c @@ -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 diff --git a/usr.sbin/ppp/tcpmss.c b/usr.sbin/ppp/tcpmss.c index b6946240e524..1fdbf0201c22 100644 --- a/usr.sbin/ppp/tcpmss.c +++ b/usr.sbin/ppp/tcpmss.c @@ -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)) /*- diff --git a/usr.sbin/ppp/throughput.c b/usr.sbin/ppp/throughput.c index a303d2814ab6..b0bb241724dc 100644 --- a/usr.sbin/ppp/throughput.c +++ b/usr.sbin/ppp/throughput.c @@ -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); } diff --git a/usr.sbin/ppp/timer.c b/usr.sbin/ppp/timer.c index 3003b6c39a82..9c4fc9f10599 100644 --- a/usr.sbin/ppp/timer.c +++ b/usr.sbin/ppp/timer.c @@ -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; diff --git a/usr.sbin/ppp/tun.c b/usr.sbin/ppp/tun.c index 1c55fcfee3fa..883cd5c4052e 100644 --- a/usr.sbin/ppp/tun.c +++ b/usr.sbin/ppp/tun.c @@ -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;