Add renegotiation patch from Yuri (ppp-aug10-patch)
Indentation and style cleanups Make md5.c use standard memcpy and memset
This commit is contained in:
parent
5779efc7ae
commit
d490579025
7 changed files with 2628 additions and 2666 deletions
3
Changes
3
Changes
|
|
@ -10,7 +10,8 @@
|
||||||
- Add startup script and monitor script from Yuri
|
- Add startup script and monitor script from Yuri
|
||||||
- Some logging correctness fixes from Iain Wade
|
- Some logging correctness fixes from Iain Wade
|
||||||
- Add support for LCP Ident and CallBack (rejection only) from Yuri
|
- Add support for LCP Ident and CallBack (rejection only) from Yuri
|
||||||
- Initiate LCP if not attempted by the client
|
- Initiate LCP if not attempted by the client, or in renegotiation - Yuri
|
||||||
|
- Indentation and style cleanups
|
||||||
|
|
||||||
* Tue Jul 13 2004 Brendan O'Dea <bod@optusnet.com.au> 2.0.1
|
* Tue Jul 13 2004 Brendan O'Dea <bod@optusnet.com.au> 2.0.1
|
||||||
- Update INSTALL, Docs/manual.html documentation.
|
- Update INSTALL, Docs/manual.html documentation.
|
||||||
|
|
|
||||||
399
l2tpns.c
399
l2tpns.c
|
|
@ -4,7 +4,7 @@
|
||||||
// Copyright (c) 2002 FireBrick (Andrews & Arnold Ltd / Watchfront Ltd) - GPL licenced
|
// Copyright (c) 2002 FireBrick (Andrews & Arnold Ltd / Watchfront Ltd) - GPL licenced
|
||||||
// vim: sw=8 ts=8
|
// vim: sw=8 ts=8
|
||||||
|
|
||||||
char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.21 2004-08-02 06:06:28 fred_nerk Exp $";
|
char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.22 2004-08-13 00:02:50 fred_nerk Exp $";
|
||||||
|
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
@ -538,7 +538,7 @@ int cmd_show_ipcache(struct cli_def *cli, char *command, char **argv, int argc)
|
||||||
if (CLI_HELP_REQUESTED)
|
if (CLI_HELP_REQUESTED)
|
||||||
return CLI_HELP_NO_ARGS;
|
return CLI_HELP_NO_ARGS;
|
||||||
|
|
||||||
cli_print(cli, "%7s %s", "Sess#", "IP Address");
|
cli_print(cli, "%7s %s", "Sess#", "IP Address");
|
||||||
|
|
||||||
for (i = 0; i < 256; ++i) {
|
for (i = 0; i < 256; ++i) {
|
||||||
if (!d[i]) continue;
|
if (!d[i]) continue;
|
||||||
|
|
@ -960,8 +960,8 @@ int throttle_session(sessionidt s, int throttle)
|
||||||
if (!session[s].tunnel)
|
if (!session[s].tunnel)
|
||||||
return 0; // No-one home.
|
return 0; // No-one home.
|
||||||
|
|
||||||
if (!*session[s].user)
|
if (!*session[s].user)
|
||||||
return 0; // User not logged in
|
return 0; // User not logged in
|
||||||
|
|
||||||
if (throttle) {
|
if (throttle) {
|
||||||
if (session[s].tbf_in || session[s].tbf_out) {
|
if (session[s].tbf_in || session[s].tbf_out) {
|
||||||
|
|
@ -1780,6 +1780,7 @@ void processudp(u8 * buf, int len, struct sockaddr_in *addr)
|
||||||
// TBA
|
// TBA
|
||||||
break;
|
break;
|
||||||
case 12: // ICCN
|
case 12: // ICCN
|
||||||
|
if ( amagic == 0) amagic = time_now;
|
||||||
session[s].magic = amagic; // set magic number
|
session[s].magic = amagic; // set magic number
|
||||||
session[s].l2tp_flags = aflags; // set flags received
|
session[s].l2tp_flags = aflags; // set flags received
|
||||||
log(3, ntohl(addr->sin_addr.s_addr), s, t, "Magic %X Flags %X\n", amagic, aflags);
|
log(3, ntohl(addr->sin_addr.s_addr), s, t, "Magic %X Flags %X\n", amagic, aflags);
|
||||||
|
|
@ -2785,55 +2786,57 @@ void snoop_send_packet(char *packet, u16 size, ipt destination, u16 port)
|
||||||
}
|
}
|
||||||
|
|
||||||
void dump_acct_info()
|
void dump_acct_info()
|
||||||
|
|
||||||
{
|
{
|
||||||
char filename[1024];
|
char filename[1024];
|
||||||
char timestr[64];
|
char timestr[64];
|
||||||
time_t t = time(NULL);
|
time_t t = time(NULL);
|
||||||
int i;
|
int i;
|
||||||
FILE *f = NULL;
|
FILE *f = NULL;
|
||||||
|
|
||||||
|
|
||||||
CSTAT(call_dump_acct_info);
|
CSTAT(call_dump_acct_info);
|
||||||
|
|
||||||
strftime(timestr, 64, "%Y%m%d%H%M%S", localtime(&t));
|
strftime(timestr, 64, "%Y%m%d%H%M%S", localtime(&t));
|
||||||
snprintf(filename, 1024, "%s/%s", config->accounting_dir, timestr);
|
snprintf(filename, 1024, "%s/%s", config->accounting_dir, timestr);
|
||||||
|
|
||||||
for (i = 0; i < MAXSESSION; i++)
|
for (i = 0; i < MAXSESSION; i++)
|
||||||
{
|
|
||||||
if (!session[i].opened || !session[i].ip || !session[i].cin || !session[i].cout || !*session[i].user || session[i].walled_garden)
|
|
||||||
continue;
|
|
||||||
if (!f)
|
|
||||||
{
|
{
|
||||||
time_t now = time(NULL);
|
if (!session[i].opened || !session[i].ip || !session[i].cin || !session[i].cout || !*session[i].user || session[i].walled_garden)
|
||||||
if (!(f = fopen(filename, "w")))
|
continue;
|
||||||
{
|
if (!f)
|
||||||
log(0, 0, 0, 0, "Can't write accounting info to %s: %s\n", filename, strerror(errno));
|
{
|
||||||
return;
|
time_t now = time(NULL);
|
||||||
}
|
if (!(f = fopen(filename, "w")))
|
||||||
log(3, 0, 0, 0, "Dumping accounting information to %s\n", filename);
|
{
|
||||||
fprintf(f, "# dslwatch.pl dump file V1.01\n"
|
log(0, 0, 0, 0, "Can't write accounting info to %s: %s\n", filename, strerror(errno));
|
||||||
"# host: %s\n"
|
return ;
|
||||||
"# time: %ld\n"
|
}
|
||||||
"# uptime: %ld\n"
|
log(3, 0, 0, 0, "Dumping accounting information to %s\n", filename);
|
||||||
"# format: username ip qos uptxoctets downrxoctets\n",
|
fprintf(f, "# dslwatch.pl dump file V1.01\n"
|
||||||
hostname,
|
"# host: %s\n"
|
||||||
now,
|
"# time: %ld\n"
|
||||||
now - basetime);
|
"# uptime: %ld\n"
|
||||||
|
"# format: username ip qos uptxoctets downrxoctets\n",
|
||||||
|
hostname,
|
||||||
|
now,
|
||||||
|
now - basetime);
|
||||||
|
}
|
||||||
|
|
||||||
|
log(4, 0, 0, 0, "Dumping accounting information for %s\n", session[i].user);
|
||||||
|
fprintf(f, "%s %s %d %u %u\n",
|
||||||
|
session[i].user, // username
|
||||||
|
inet_toa(htonl(session[i].ip)), // ip
|
||||||
|
(session[i].throttle) ? 2 : 1, // qos
|
||||||
|
(u32)session[i].cin, // uptxoctets
|
||||||
|
(u32)session[i].cout); // downrxoctets
|
||||||
|
|
||||||
|
session[i].pin = session[i].cin = 0;
|
||||||
|
session[i].pout = session[i].cout = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
log(4, 0, 0, 0, "Dumping accounting information for %s\n", session[i].user);
|
if (f)
|
||||||
fprintf(f, "%s %s %d %u %u\n",
|
fclose(f);
|
||||||
session[i].user, // username
|
|
||||||
inet_toa(htonl(session[i].ip)), // ip
|
|
||||||
(session[i].throttle) ? 2 : 1, // qos
|
|
||||||
(u32)session[i].cin, // uptxoctets
|
|
||||||
(u32)session[i].cout); // downrxoctets
|
|
||||||
|
|
||||||
session[i].pin = session[i].cin = 0;
|
|
||||||
session[i].pout = session[i].cout = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (f) fclose(f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Main program
|
// Main program
|
||||||
|
|
@ -2939,11 +2942,11 @@ int main(int argc, char *argv[])
|
||||||
signal(SIGPIPE, SIG_IGN);
|
signal(SIGPIPE, SIG_IGN);
|
||||||
bgp_setup(config->as_number);
|
bgp_setup(config->as_number);
|
||||||
bgp_add_route(config->bind_address, 0xffffffff);
|
bgp_add_route(config->bind_address, 0xffffffff);
|
||||||
if (*config->bgp_peer[0])
|
if (*config->bgp_peer[0])
|
||||||
bgp_start(&bgp_peers[0], config->bgp_peer[0],
|
bgp_start(&bgp_peers[0], config->bgp_peer[0],
|
||||||
config->bgp_peer_as[0], 0); /* 0 = routing disabled */
|
config->bgp_peer_as[0], 0); /* 0 = routing disabled */
|
||||||
|
|
||||||
if (*config->bgp_peer[1])
|
if (*config->bgp_peer[1])
|
||||||
bgp_start(&bgp_peers[1], config->bgp_peer[1],
|
bgp_start(&bgp_peers[1], config->bgp_peer[1],
|
||||||
config->bgp_peer_as[1], 0);
|
config->bgp_peer_as[1], 0);
|
||||||
#endif /* BGP */
|
#endif /* BGP */
|
||||||
|
|
@ -3084,168 +3087,178 @@ void sigchild_handler(int signal)
|
||||||
|
|
||||||
void read_state()
|
void read_state()
|
||||||
{
|
{
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
int i;
|
int i;
|
||||||
ippoolt itmp;
|
ippoolt itmp;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
char magic[sizeof(DUMP_MAGIC)-1];
|
char magic[sizeof(DUMP_MAGIC) - 1];
|
||||||
u32 buf[2];
|
u32 buf[2];
|
||||||
|
|
||||||
if (!config->save_state)
|
if (!config->save_state)
|
||||||
{
|
|
||||||
unlink(STATEFILE);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stat(STATEFILE, &sb) < 0)
|
|
||||||
{
|
|
||||||
unlink(STATEFILE);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sb.st_mtime < (time(NULL) - 60))
|
|
||||||
{
|
|
||||||
log(0, 0, 0, 0, "State file is too old to read, ignoring\n");
|
|
||||||
unlink(STATEFILE);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
f = fopen(STATEFILE, "r");
|
|
||||||
unlink(STATEFILE);
|
|
||||||
|
|
||||||
if (!f)
|
|
||||||
{
|
|
||||||
log(0, 0, 0, 0, "Can't read state file: %s\n", strerror(errno));
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fread(magic, sizeof(magic), 1, f) != 1 || strncmp(magic, DUMP_MAGIC, sizeof(magic)))
|
|
||||||
{
|
|
||||||
log(0, 0, 0, 0, "Bad state file magic\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
log(1, 0, 0, 0, "Reading state information\n");
|
|
||||||
if (fread(buf, sizeof(buf), 1, f) != 1 || buf[0] > MAXIPPOOL || buf[1] != sizeof(ippoolt))
|
|
||||||
{
|
|
||||||
log(0, 0, 0, 0, "Error/mismatch reading ip pool header from state file\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (buf[0] > ip_pool_size)
|
|
||||||
{
|
|
||||||
log(0, 0, 0, 0, "ip pool has shrunk! state = %d, current = %d\n", buf[0], ip_pool_size);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
log(2, 0, 0, 0, "Loading %u ip addresses\n", buf[0]);
|
|
||||||
for (i = 0; i < buf[0]; i++)
|
|
||||||
{
|
|
||||||
if (fread(&itmp, sizeof(itmp), 1, f) != 1)
|
|
||||||
{
|
{
|
||||||
log(0, 0, 0, 0, "Error reading ip %d from state file: %s\n", i, strerror(errno));
|
unlink(STATEFILE);
|
||||||
exit(1);
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itmp.address != ip_address_pool[i].address)
|
if (stat(STATEFILE, &sb) < 0)
|
||||||
{
|
{
|
||||||
log(0, 0, 0, 0, "Mismatched ip %d from state file: pool may only be extended\n", i);
|
unlink(STATEFILE);
|
||||||
exit(1);
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(&ip_address_pool[i], &itmp, sizeof(itmp));
|
if (sb.st_mtime < (time(NULL) - 60))
|
||||||
}
|
|
||||||
|
|
||||||
if (fread(buf, sizeof(buf), 1, f) != 1 || buf[0] != MAXTUNNEL || buf[1] != sizeof(tunnelt))
|
|
||||||
{
|
|
||||||
log(0, 0, 0, 0, "Error/mismatch reading tunnel header from state file\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
log(2, 0, 0, 0, "Loading %u tunnels\n", MAXTUNNEL);
|
|
||||||
if (fread(tunnel, sizeof(tunnelt), MAXTUNNEL, f) != MAXTUNNEL)
|
|
||||||
{
|
|
||||||
log(0, 0, 0, 0, "Error reading tunnel data from state file\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < MAXTUNNEL; i++)
|
|
||||||
{
|
|
||||||
tunnel[i].controlc = 0;
|
|
||||||
tunnel[i].controls = NULL;
|
|
||||||
tunnel[i].controle = NULL;
|
|
||||||
if (*tunnel[i].hostname)
|
|
||||||
log(3, 0, 0, 0, "Created tunnel for %s\n", tunnel[i].hostname);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fread(buf, sizeof(buf), 1, f) != 1 || buf[0] != MAXSESSION || buf[1] != sizeof(sessiont))
|
|
||||||
{
|
|
||||||
log(0, 0, 0, 0, "Error/mismatch reading session header from state file\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
log(2, 0, 0, 0, "Loading %u sessions\n", MAXSESSION);
|
|
||||||
if (fread(session, sizeof(sessiont), MAXSESSION, f) != MAXSESSION)
|
|
||||||
{
|
|
||||||
log(0, 0, 0, 0, "Error reading session data from state file\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < MAXSESSION; i++)
|
|
||||||
{
|
|
||||||
session[i].tbf_in = 0;
|
|
||||||
session[i].tbf_out = 0;
|
|
||||||
if (session[i].opened)
|
|
||||||
{
|
{
|
||||||
log(2, 0, i, 0, "Loaded active session for user %s\n", session[i].user);
|
log(0, 0, 0, 0, "State file is too old to read, ignoring\n");
|
||||||
if (session[i].ip)
|
unlink(STATEFILE);
|
||||||
sessionsetup(session[i].tunnel, i);
|
return ;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fclose(f);
|
f = fopen(STATEFILE, "r");
|
||||||
log(0, 0, 0, 0, "Loaded saved state information\n");
|
unlink(STATEFILE);
|
||||||
|
|
||||||
|
if (!f)
|
||||||
|
{
|
||||||
|
log(0, 0, 0, 0, "Can't read state file: %s\n", strerror(errno));
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fread(magic, sizeof(magic), 1, f) != 1 || strncmp(magic, DUMP_MAGIC, sizeof(magic)))
|
||||||
|
{
|
||||||
|
log(0, 0, 0, 0, "Bad state file magic\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
log(1, 0, 0, 0, "Reading state information\n");
|
||||||
|
if (fread(buf, sizeof(buf), 1, f) != 1 || buf[0] > MAXIPPOOL || buf[1] != sizeof(ippoolt))
|
||||||
|
{
|
||||||
|
log(0, 0, 0, 0, "Error/mismatch reading ip pool header from state file\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (buf[0] > ip_pool_size)
|
||||||
|
{
|
||||||
|
log(0, 0, 0, 0, "ip pool has shrunk! state = %d, current = %d\n", buf[0], ip_pool_size);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
log(2, 0, 0, 0, "Loading %u ip addresses\n", buf[0]);
|
||||||
|
for (i = 0; i < buf[0]; i++)
|
||||||
|
{
|
||||||
|
if (fread(&itmp, sizeof(itmp), 1, f) != 1)
|
||||||
|
{
|
||||||
|
log(0, 0, 0, 0, "Error reading ip %d from state file: %s\n", i, strerror(errno));
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (itmp.address != ip_address_pool[i].address)
|
||||||
|
{
|
||||||
|
log(0, 0, 0, 0, "Mismatched ip %d from state file: pool may only be extended\n", i);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
memcpy(&ip_address_pool[i], &itmp, sizeof(itmp));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fread(buf, sizeof(buf), 1, f) != 1 || buf[0] != MAXTUNNEL || buf[1] != sizeof(tunnelt))
|
||||||
|
{
|
||||||
|
log(0, 0, 0, 0, "Error/mismatch reading tunnel header from state file\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
log(2, 0, 0, 0, "Loading %u tunnels\n", MAXTUNNEL);
|
||||||
|
if (fread(tunnel, sizeof(tunnelt), MAXTUNNEL, f) != MAXTUNNEL)
|
||||||
|
{
|
||||||
|
log(0, 0, 0, 0, "Error reading tunnel data from state file\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < MAXTUNNEL; i++)
|
||||||
|
{
|
||||||
|
tunnel[i].controlc = 0;
|
||||||
|
tunnel[i].controls = NULL;
|
||||||
|
tunnel[i].controle = NULL;
|
||||||
|
if (*tunnel[i].hostname)
|
||||||
|
log(3, 0, 0, 0, "Created tunnel for %s\n", tunnel[i].hostname);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fread(buf, sizeof(buf), 1, f) != 1 || buf[0] != MAXSESSION || buf[1] != sizeof(sessiont))
|
||||||
|
{
|
||||||
|
log(0, 0, 0, 0, "Error/mismatch reading session header from state file\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
log(2, 0, 0, 0, "Loading %u sessions\n", MAXSESSION);
|
||||||
|
if (fread(session, sizeof(sessiont), MAXSESSION, f) != MAXSESSION)
|
||||||
|
{
|
||||||
|
log(0, 0, 0, 0, "Error reading session data from state file\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < MAXSESSION; i++)
|
||||||
|
{
|
||||||
|
session[i].tbf_in = 0;
|
||||||
|
session[i].tbf_out = 0;
|
||||||
|
if (session[i].opened)
|
||||||
|
{
|
||||||
|
log(2, 0, i, 0, "Loaded active session for user %s\n", session[i].user);
|
||||||
|
if (session[i].ip)
|
||||||
|
sessionsetup(session[i].tunnel, i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose(f);
|
||||||
|
log(0, 0, 0, 0, "Loaded saved state information\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void dump_state()
|
void dump_state()
|
||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
u32 buf[2];
|
u32 buf[2];
|
||||||
|
|
||||||
if (!config->save_state)
|
if (!config->save_state)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
do {
|
do
|
||||||
if (!(f = fopen(STATEFILE, "w")))
|
{
|
||||||
break;
|
if (!(f = fopen(STATEFILE, "w")))
|
||||||
|
break;
|
||||||
|
|
||||||
log(1, 0, 0, 0, "Dumping state information\n");
|
log(1, 0, 0, 0, "Dumping state information\n");
|
||||||
|
|
||||||
if (fwrite(DUMP_MAGIC, sizeof(DUMP_MAGIC)-1, 1, f) != 1) break;
|
if (fwrite(DUMP_MAGIC, sizeof(DUMP_MAGIC) - 1, 1, f) != 1)
|
||||||
|
break;
|
||||||
|
|
||||||
log(2, 0, 0, 0, "Dumping %u ip addresses\n", ip_pool_size);
|
log(2, 0, 0, 0, "Dumping %u ip addresses\n", ip_pool_size);
|
||||||
buf[0] = ip_pool_size;
|
buf[0] = ip_pool_size;
|
||||||
buf[1] = sizeof(ippoolt);
|
buf[1] = sizeof(ippoolt);
|
||||||
if (fwrite(buf, sizeof(buf), 1, f) != 1) break;
|
if (fwrite(buf, sizeof(buf), 1, f) != 1)
|
||||||
if (fwrite(ip_address_pool, sizeof(ippoolt), ip_pool_size, f) != ip_pool_size) break;
|
break;
|
||||||
|
if (fwrite(ip_address_pool, sizeof(ippoolt), ip_pool_size, f) != ip_pool_size)
|
||||||
|
break;
|
||||||
|
|
||||||
log(2, 0, 0, 0, "Dumping %u tunnels\n", MAXTUNNEL);
|
log(2, 0, 0, 0, "Dumping %u tunnels\n", MAXTUNNEL);
|
||||||
buf[0] = MAXTUNNEL;
|
buf[0] = MAXTUNNEL;
|
||||||
buf[1] = sizeof(tunnelt);
|
buf[1] = sizeof(tunnelt);
|
||||||
if (fwrite(buf, sizeof(buf), 1, f) != 1) break;
|
if (fwrite(buf, sizeof(buf), 1, f) != 1)
|
||||||
if (fwrite(tunnel, sizeof(tunnelt), MAXTUNNEL, f) != MAXTUNNEL) break;
|
break;
|
||||||
|
if (fwrite(tunnel, sizeof(tunnelt), MAXTUNNEL, f) != MAXTUNNEL)
|
||||||
|
break;
|
||||||
|
|
||||||
log(2, 0, 0, 0, "Dumping %u sessions\n", MAXSESSION);
|
log(2, 0, 0, 0, "Dumping %u sessions\n", MAXSESSION);
|
||||||
buf[0] = MAXSESSION;
|
buf[0] = MAXSESSION;
|
||||||
buf[1] = sizeof(sessiont);
|
buf[1] = sizeof(sessiont);
|
||||||
if (fwrite(buf, sizeof(buf), 1, f) != 1) break;
|
if (fwrite(buf, sizeof(buf), 1, f) != 1)
|
||||||
if (fwrite(session, sizeof(sessiont), MAXSESSION, f) != MAXSESSION) break;
|
break;
|
||||||
|
if (fwrite(session, sizeof(sessiont), MAXSESSION, f) != MAXSESSION)
|
||||||
|
break;
|
||||||
|
|
||||||
if (fclose(f) == 0) return; // OK
|
if (fclose(f) == 0)
|
||||||
} while (0);
|
return ; // OK
|
||||||
|
}
|
||||||
|
while (0);
|
||||||
|
|
||||||
log(0, 0, 0, 0, "Can't write state information: %s\n", strerror(errno));
|
log(0, 0, 0, 0, "Can't write state information: %s\n", strerror(errno));
|
||||||
unlink(STATEFILE);
|
unlink(STATEFILE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void build_chap_response(char *challenge, u8 id, u16 challenge_length, char **challenge_response)
|
void build_chap_response(char *challenge, u8 id, u16 challenge_length, char **challenge_response)
|
||||||
|
|
@ -3274,13 +3287,13 @@ void build_chap_response(char *challenge, u8 id, u16 challenge_length, char **ch
|
||||||
|
|
||||||
static int facility_value(char *name)
|
static int facility_value(char *name)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; facilitynames[i].c_name; i++)
|
for (i = 0; facilitynames[i].c_name; i++)
|
||||||
{
|
{
|
||||||
if (strcmp(facilitynames[i].c_name, name) == 0)
|
if (strcmp(facilitynames[i].c_name, name) == 0)
|
||||||
return facilitynames[i].c_val;
|
return facilitynames[i].c_val;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void update_config()
|
void update_config()
|
||||||
|
|
|
||||||
146
ll.c
146
ll.c
|
|
@ -1,6 +1,6 @@
|
||||||
// L2TPNS Linked List Stuff
|
// L2TPNS Linked List Stuff
|
||||||
|
|
||||||
char const *cvs_id_ll = "$Id: ll.c,v 1.4 2004-06-28 02:43:13 fred_nerk Exp $";
|
char const *cvs_id_ll = "$Id: ll.c,v 1.5 2004-08-13 00:02:50 fred_nerk Exp $";
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/file.h>
|
#include <sys/file.h>
|
||||||
|
|
@ -16,127 +16,127 @@ char const *cvs_id_ll = "$Id: ll.c,v 1.4 2004-06-28 02:43:13 fred_nerk Exp $";
|
||||||
|
|
||||||
linked_list *ll_init()
|
linked_list *ll_init()
|
||||||
{
|
{
|
||||||
return (linked_list *)calloc(sizeof(linked_list), 1);
|
return (linked_list *)calloc(sizeof(linked_list), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ll_done(linked_list *l)
|
void ll_done(linked_list *l)
|
||||||
{
|
{
|
||||||
li *i = l->head, *n;
|
li *i = l->head, *n;
|
||||||
|
|
||||||
while (i)
|
while (i)
|
||||||
{
|
{
|
||||||
n = i->next;
|
n = i->next;
|
||||||
free(i);
|
free(i);
|
||||||
i = n;
|
i = n;
|
||||||
}
|
}
|
||||||
|
|
||||||
free(l);
|
free(l);
|
||||||
}
|
}
|
||||||
|
|
||||||
li *ll_push(linked_list *l, void *data)
|
li *ll_push(linked_list *l, void *data)
|
||||||
{
|
{
|
||||||
li *i;
|
li *i;
|
||||||
|
|
||||||
if (!l) return NULL;
|
if (!l) return NULL;
|
||||||
if (!(i = (li *)calloc(sizeof(li), 1))) return NULL;
|
if (!(i = (li *)calloc(sizeof(li), 1))) return NULL;
|
||||||
|
|
||||||
i->data = data;
|
i->data = data;
|
||||||
i->next = NULL;
|
i->next = NULL;
|
||||||
if (l->end)
|
if (l->end)
|
||||||
l->end->next = i;
|
l->end->next = i;
|
||||||
else
|
else
|
||||||
l->head = i;
|
l->head = i;
|
||||||
l->end = i;
|
l->end = i;
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *ll_pop(linked_list *l)
|
void *ll_pop(linked_list *l)
|
||||||
{
|
{
|
||||||
li *i;
|
li *i;
|
||||||
void *data;
|
void *data;
|
||||||
|
|
||||||
if (!l) return NULL;
|
if (!l) return NULL;
|
||||||
if (!l->head)
|
if (!l->head)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
data = l->head->data;
|
data = l->head->data;
|
||||||
i = l->head->next;
|
i = l->head->next;
|
||||||
free(l->head);
|
free(l->head);
|
||||||
l->head = i;
|
l->head = i;
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ll_iterate(linked_list *l, int(*func)(void *))
|
void ll_iterate(linked_list *l, int(*func)(void *))
|
||||||
{
|
{
|
||||||
li *i;
|
li *i;
|
||||||
if (!l || !func) return;
|
if (!l || !func) return;
|
||||||
|
|
||||||
for (i = l->head; i; i = i->next)
|
for (i = l->head; i; i = i->next)
|
||||||
{
|
{
|
||||||
if (i->data)
|
if (i->data)
|
||||||
if (!func(i))
|
if (!func(i))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ll_reset(linked_list *l)
|
void ll_reset(linked_list *l)
|
||||||
{
|
{
|
||||||
if (!l) return;
|
if (!l) return;
|
||||||
l->current = NULL;
|
l->current = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *ll_next(linked_list *l)
|
void *ll_next(linked_list *l)
|
||||||
{
|
{
|
||||||
if (!l) return NULL;
|
if (!l) return NULL;
|
||||||
if (!l->current)
|
if (!l->current)
|
||||||
l->current = l->head;
|
l->current = l->head;
|
||||||
else
|
else
|
||||||
l->current = l->current->next;
|
l->current = l->current->next;
|
||||||
if (!l->current)
|
if (!l->current)
|
||||||
return NULL;
|
return NULL;
|
||||||
return l->current->data;
|
return l->current->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ll_delete(linked_list *l, void *data)
|
void ll_delete(linked_list *l, void *data)
|
||||||
{
|
{
|
||||||
li *i = l->head, *p = NULL;
|
li *i = l->head, *p = NULL;
|
||||||
|
|
||||||
while (i)
|
while (i)
|
||||||
{
|
|
||||||
if (i->data == data)
|
|
||||||
{
|
{
|
||||||
if (l->head == i) l->head = i->next;
|
if (i->data == data)
|
||||||
if (l->end == i) l->end = i->next;
|
{
|
||||||
if (p) p->next = i->next;
|
if (l->head == i) l->head = i->next;
|
||||||
free(i);
|
if (l->end == i) l->end = i->next;
|
||||||
l->current = NULL;
|
if (p) p->next = i->next;
|
||||||
return;
|
free(i);
|
||||||
|
l->current = NULL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
p = i;
|
||||||
|
i = i->next;
|
||||||
}
|
}
|
||||||
p = i;
|
|
||||||
i = i->next;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int ll_size(linked_list *l)
|
int ll_size(linked_list *l)
|
||||||
{
|
{
|
||||||
int count = 0;
|
int count = 0;
|
||||||
li *i;
|
li *i;
|
||||||
|
|
||||||
if (!l) return 0;
|
if (!l) return 0;
|
||||||
|
|
||||||
for (i = l->head; i; i = i->next)
|
for (i = l->head; i; i = i->next)
|
||||||
if (i->data) count++;
|
if (i->data) count++;
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ll_contains(linked_list *l, void *search)
|
int ll_contains(linked_list *l, void *search)
|
||||||
{
|
{
|
||||||
li *i;
|
li *i;
|
||||||
for (i = l->head; i; i = i->next)
|
for (i = l->head; i; i = i->next)
|
||||||
if (i->data == search)
|
if (i->data == search)
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
353
md5.c
353
md5.c
|
|
@ -1,7 +1,7 @@
|
||||||
/* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm
|
/* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char const *cvs_id_md5 = "$Id: md5.c,v 1.2 2004-06-28 02:43:13 fred_nerk Exp $";
|
char const *cvs_id_md5 = "$Id: md5.c,v 1.3 2004-08-13 00:02:50 fred_nerk Exp $";
|
||||||
|
|
||||||
/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
|
/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
|
||||||
rights reserved.
|
rights reserved.
|
||||||
|
|
@ -25,6 +25,7 @@ These notices must be retained in any copies of any part of this
|
||||||
documentation and/or software.
|
documentation and/or software.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
#include "md5.h"
|
#include "md5.h"
|
||||||
|
|
||||||
/* Constants for MD5Transform routine.
|
/* Constants for MD5Transform routine.
|
||||||
|
|
@ -50,13 +51,11 @@ documentation and/or software.
|
||||||
static void MD5Transform PROTO_LIST((UINT4[4], unsigned char[64]));
|
static void MD5Transform PROTO_LIST((UINT4[4], unsigned char[64]));
|
||||||
static void Encode PROTO_LIST((unsigned char *, UINT4 *, unsigned int));
|
static void Encode PROTO_LIST((unsigned char *, UINT4 *, unsigned int));
|
||||||
static void Decode PROTO_LIST((UINT4 *, unsigned char *, unsigned int));
|
static void Decode PROTO_LIST((UINT4 *, unsigned char *, unsigned int));
|
||||||
static void MD5_memcpy PROTO_LIST((POINTER, POINTER, unsigned int));
|
|
||||||
static void MD5_memset PROTO_LIST((POINTER, int, unsigned int));
|
|
||||||
|
|
||||||
static unsigned char PADDING[64] = {
|
static unsigned char PADDING[64] = {
|
||||||
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
/* F, G, H and I are basic MD5 functions.
|
/* F, G, H and I are basic MD5 functions.
|
||||||
|
|
@ -96,256 +95,202 @@ Rotation is separate from addition to prevent recomputation.
|
||||||
|
|
||||||
/* MD5 initialization. Begins an MD5 operation, writing a new context.
|
/* MD5 initialization. Begins an MD5 operation, writing a new context.
|
||||||
*/
|
*/
|
||||||
void
|
void MD5Init(MD5_CTX *context)
|
||||||
MD5Init(context)
|
|
||||||
MD5_CTX *context; /* context */
|
|
||||||
{
|
{
|
||||||
context->count[0] = context->count[1] = 0;
|
context->count[0] = context->count[1] = 0;
|
||||||
/* Load magic initialization constants.
|
// Load magic initialization constants.
|
||||||
*/
|
context->state[0] = 0x67452301;
|
||||||
context->state[0] = 0x67452301;
|
context->state[1] = 0xefcdab89;
|
||||||
context->state[1] = 0xefcdab89;
|
context->state[2] = 0x98badcfe;
|
||||||
context->state[2] = 0x98badcfe;
|
context->state[3] = 0x10325476;
|
||||||
context->state[3] = 0x10325476;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* MD5 block update operation. Continues an MD5 message-digest
|
/* MD5 block update operation. Continues an MD5 message-digest
|
||||||
operation, processing another message block, and updating the
|
operation, processing another message block, and updating the
|
||||||
context.
|
context.
|
||||||
*/
|
*/
|
||||||
void
|
void MD5Update(MD5_CTX *context, unsigned char *input, unsigned int inputLen)
|
||||||
MD5Update(context, input, inputLen)
|
|
||||||
MD5_CTX *context; /* context */
|
|
||||||
unsigned char *input; /* input block */
|
|
||||||
unsigned int inputLen; /* length of input block */
|
|
||||||
{
|
{
|
||||||
unsigned int i,
|
unsigned int i,
|
||||||
index,
|
index,
|
||||||
partLen;
|
partLen;
|
||||||
|
|
||||||
/* Compute number of bytes mod 64 */
|
/* Compute number of bytes mod 64 */
|
||||||
index = (unsigned int) ((context->count[0] >> 3) & 0x3F);
|
index = (unsigned int) ((context->count[0] >> 3) & 0x3F);
|
||||||
|
|
||||||
/* Update number of bits */
|
/* Update number of bits */
|
||||||
if ((context->count[0] += ((UINT4) inputLen << 3)) < ((UINT4) inputLen << 3))
|
if ((context->count[0] += ((UINT4) inputLen << 3)) < ((UINT4) inputLen << 3))
|
||||||
context->count[1]++;
|
context->count[1]++;
|
||||||
context->count[1] += ((UINT4) inputLen >> 29);
|
context->count[1] += ((UINT4) inputLen >> 29);
|
||||||
|
|
||||||
partLen = 64 - index;
|
partLen = 64 - index;
|
||||||
|
|
||||||
/* Transform as many times as possible.
|
/* Transform as many times as possible.
|
||||||
*/
|
*/
|
||||||
if (inputLen >= partLen)
|
if (inputLen >= partLen)
|
||||||
{
|
{
|
||||||
MD5_memcpy((POINTER) & context->buffer[index], (POINTER) input, partLen);
|
memcpy(&context->buffer[index], input, partLen);
|
||||||
MD5Transform(context->state, context->buffer);
|
MD5Transform(context->state, context->buffer);
|
||||||
|
|
||||||
for (i = partLen; i + 63 < inputLen; i += 64)
|
for (i = partLen; i + 63 < inputLen; i += 64)
|
||||||
MD5Transform(context->state, &input[i]);
|
MD5Transform(context->state, &input[i]);
|
||||||
|
|
||||||
index = 0;
|
index = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
||||||
/* Buffer remaining input */
|
/* Buffer remaining input */
|
||||||
MD5_memcpy((POINTER) & context->buffer[index], (POINTER) & input[i], inputLen - i);
|
memcpy(&context->buffer[index], &input[i], inputLen - i);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* MD5 finalization. Ends an MD5 message-digest operation, writing the
|
/* MD5 finalization. Ends an MD5 message-digest operation, writing the
|
||||||
the message digest and zeroizing the context.
|
the message digest and zeroizing the context.
|
||||||
*/
|
*/
|
||||||
void
|
void MD5Final(unsigned char digest[16], MD5_CTX *context)
|
||||||
MD5Final(digest, context)
|
|
||||||
unsigned char digest[16]; /* message digest */
|
|
||||||
MD5_CTX *context; /* context */
|
|
||||||
{
|
{
|
||||||
unsigned char bits[8];
|
unsigned char bits[8];
|
||||||
unsigned int index,
|
unsigned int index, padLen;
|
||||||
padLen;
|
|
||||||
|
|
||||||
/* Save number of bits */
|
/* Save number of bits */
|
||||||
Encode(bits, context->count, 8);
|
Encode(bits, context->count, 8);
|
||||||
|
|
||||||
/* Pad out to 56 mod 64.
|
/* Pad out to 56 mod 64.
|
||||||
*/
|
*/
|
||||||
index = (unsigned int) ((context->count[0] >> 3) & 0x3f);
|
index = (unsigned int) ((context->count[0] >> 3) & 0x3f);
|
||||||
padLen = (index < 56) ? (56 - index) : (120 - index);
|
padLen = (index < 56) ? (56 - index) : (120 - index);
|
||||||
MD5Update(context, PADDING, padLen);
|
MD5Update(context, PADDING, padLen);
|
||||||
|
|
||||||
/* Append length (before padding) */
|
/* Append length (before padding) */
|
||||||
MD5Update(context, bits, 8);
|
MD5Update(context, bits, 8);
|
||||||
|
|
||||||
/* Store state in digest */
|
/* Store state in digest */
|
||||||
Encode(digest, context->state, 16);
|
Encode(digest, context->state, 16);
|
||||||
|
|
||||||
/* Zeroize sensitive information.
|
/* Zeroize sensitive information.
|
||||||
*/
|
*/
|
||||||
MD5_memset((POINTER) context, 0, sizeof(*context));
|
memset(context, 0, sizeof(*context));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* MD5 basic transformation. Transforms state based on block.
|
/* MD5 basic transformation. Transforms state based on block.
|
||||||
*/
|
*/
|
||||||
static void
|
static void MD5Transform(UINT4 state[4], unsigned char block[64])
|
||||||
MD5Transform(state, block)
|
|
||||||
UINT4 state[4];
|
|
||||||
unsigned char block[64];
|
|
||||||
{
|
{
|
||||||
UINT4 a = state[0],
|
UINT4 a = state[0],
|
||||||
b = state[1],
|
b = state[1],
|
||||||
c = state[2],
|
c = state[2],
|
||||||
d = state[3],
|
d = state[3],
|
||||||
x[16];
|
x[16];
|
||||||
|
|
||||||
Decode(x, block, 64);
|
Decode(x, block, 64);
|
||||||
|
|
||||||
/* Round 1 */
|
/* Round 1 */
|
||||||
FF(a, b, c, d, x[0], S11, 0xd76aa478); /* 1 */
|
FF(a, b, c, d, x[0], S11, 0xd76aa478); /* 1 */
|
||||||
FF(d, a, b, c, x[1], S12, 0xe8c7b756); /* 2 */
|
FF(d, a, b, c, x[1], S12, 0xe8c7b756); /* 2 */
|
||||||
FF(c, d, a, b, x[2], S13, 0x242070db); /* 3 */
|
FF(c, d, a, b, x[2], S13, 0x242070db); /* 3 */
|
||||||
FF(b, c, d, a, x[3], S14, 0xc1bdceee); /* 4 */
|
FF(b, c, d, a, x[3], S14, 0xc1bdceee); /* 4 */
|
||||||
FF(a, b, c, d, x[4], S11, 0xf57c0faf); /* 5 */
|
FF(a, b, c, d, x[4], S11, 0xf57c0faf); /* 5 */
|
||||||
FF(d, a, b, c, x[5], S12, 0x4787c62a); /* 6 */
|
FF(d, a, b, c, x[5], S12, 0x4787c62a); /* 6 */
|
||||||
FF(c, d, a, b, x[6], S13, 0xa8304613); /* 7 */
|
FF(c, d, a, b, x[6], S13, 0xa8304613); /* 7 */
|
||||||
FF(b, c, d, a, x[7], S14, 0xfd469501); /* 8 */
|
FF(b, c, d, a, x[7], S14, 0xfd469501); /* 8 */
|
||||||
FF(a, b, c, d, x[8], S11, 0x698098d8); /* 9 */
|
FF(a, b, c, d, x[8], S11, 0x698098d8); /* 9 */
|
||||||
FF(d, a, b, c, x[9], S12, 0x8b44f7af); /* 10 */
|
FF(d, a, b, c, x[9], S12, 0x8b44f7af); /* 10 */
|
||||||
FF(c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
|
FF(c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
|
||||||
FF(b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
|
FF(b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
|
||||||
FF(a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
|
FF(a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
|
||||||
FF(d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
|
FF(d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
|
||||||
FF(c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
|
FF(c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
|
||||||
FF(b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
|
FF(b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
|
||||||
|
|
||||||
/* Round 2 */
|
/* Round 2 */
|
||||||
GG(a, b, c, d, x[1], S21, 0xf61e2562); /* 17 */
|
GG(a, b, c, d, x[1], S21, 0xf61e2562); /* 17 */
|
||||||
GG(d, a, b, c, x[6], S22, 0xc040b340); /* 18 */
|
GG(d, a, b, c, x[6], S22, 0xc040b340); /* 18 */
|
||||||
GG(c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
|
GG(c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
|
||||||
GG(b, c, d, a, x[0], S24, 0xe9b6c7aa); /* 20 */
|
GG(b, c, d, a, x[0], S24, 0xe9b6c7aa); /* 20 */
|
||||||
GG(a, b, c, d, x[5], S21, 0xd62f105d); /* 21 */
|
GG(a, b, c, d, x[5], S21, 0xd62f105d); /* 21 */
|
||||||
GG(d, a, b, c, x[10], S22, 0x2441453); /* 22 */
|
GG(d, a, b, c, x[10], S22, 0x2441453); /* 22 */
|
||||||
GG(c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
|
GG(c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
|
||||||
GG(b, c, d, a, x[4], S24, 0xe7d3fbc8); /* 24 */
|
GG(b, c, d, a, x[4], S24, 0xe7d3fbc8); /* 24 */
|
||||||
GG(a, b, c, d, x[9], S21, 0x21e1cde6); /* 25 */
|
GG(a, b, c, d, x[9], S21, 0x21e1cde6); /* 25 */
|
||||||
GG(d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
|
GG(d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
|
||||||
GG(c, d, a, b, x[3], S23, 0xf4d50d87); /* 27 */
|
GG(c, d, a, b, x[3], S23, 0xf4d50d87); /* 27 */
|
||||||
|
|
||||||
GG(b, c, d, a, x[8], S24, 0x455a14ed); /* 28 */
|
GG(b, c, d, a, x[8], S24, 0x455a14ed); /* 28 */
|
||||||
GG(a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
|
GG(a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
|
||||||
GG(d, a, b, c, x[2], S22, 0xfcefa3f8); /* 30 */
|
GG(d, a, b, c, x[2], S22, 0xfcefa3f8); /* 30 */
|
||||||
GG(c, d, a, b, x[7], S23, 0x676f02d9); /* 31 */
|
GG(c, d, a, b, x[7], S23, 0x676f02d9); /* 31 */
|
||||||
GG(b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
|
GG(b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
|
||||||
|
|
||||||
/* Round 3 */
|
/* Round 3 */
|
||||||
HH(a, b, c, d, x[5], S31, 0xfffa3942); /* 33 */
|
HH(a, b, c, d, x[5], S31, 0xfffa3942); /* 33 */
|
||||||
HH(d, a, b, c, x[8], S32, 0x8771f681); /* 34 */
|
HH(d, a, b, c, x[8], S32, 0x8771f681); /* 34 */
|
||||||
HH(c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
|
HH(c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
|
||||||
HH(b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
|
HH(b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
|
||||||
HH(a, b, c, d, x[1], S31, 0xa4beea44); /* 37 */
|
HH(a, b, c, d, x[1], S31, 0xa4beea44); /* 37 */
|
||||||
HH(d, a, b, c, x[4], S32, 0x4bdecfa9); /* 38 */
|
HH(d, a, b, c, x[4], S32, 0x4bdecfa9); /* 38 */
|
||||||
HH(c, d, a, b, x[7], S33, 0xf6bb4b60); /* 39 */
|
HH(c, d, a, b, x[7], S33, 0xf6bb4b60); /* 39 */
|
||||||
HH(b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
|
HH(b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
|
||||||
HH(a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
|
HH(a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
|
||||||
HH(d, a, b, c, x[0], S32, 0xeaa127fa); /* 42 */
|
HH(d, a, b, c, x[0], S32, 0xeaa127fa); /* 42 */
|
||||||
HH(c, d, a, b, x[3], S33, 0xd4ef3085); /* 43 */
|
HH(c, d, a, b, x[3], S33, 0xd4ef3085); /* 43 */
|
||||||
HH(b, c, d, a, x[6], S34, 0x4881d05); /* 44 */
|
HH(b, c, d, a, x[6], S34, 0x4881d05); /* 44 */
|
||||||
HH(a, b, c, d, x[9], S31, 0xd9d4d039); /* 45 */
|
HH(a, b, c, d, x[9], S31, 0xd9d4d039); /* 45 */
|
||||||
HH(d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
|
HH(d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
|
||||||
HH(c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
|
HH(c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
|
||||||
HH(b, c, d, a, x[2], S34, 0xc4ac5665); /* 48 */
|
HH(b, c, d, a, x[2], S34, 0xc4ac5665); /* 48 */
|
||||||
|
|
||||||
/* Round 4 */
|
/* Round 4 */
|
||||||
II(a, b, c, d, x[0], S41, 0xf4292244); /* 49 */
|
II(a, b, c, d, x[0], S41, 0xf4292244); /* 49 */
|
||||||
II(d, a, b, c, x[7], S42, 0x432aff97); /* 50 */
|
II(d, a, b, c, x[7], S42, 0x432aff97); /* 50 */
|
||||||
II(c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
|
II(c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
|
||||||
II(b, c, d, a, x[5], S44, 0xfc93a039); /* 52 */
|
II(b, c, d, a, x[5], S44, 0xfc93a039); /* 52 */
|
||||||
II(a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
|
II(a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
|
||||||
II(d, a, b, c, x[3], S42, 0x8f0ccc92); /* 54 */
|
II(d, a, b, c, x[3], S42, 0x8f0ccc92); /* 54 */
|
||||||
II(c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
|
II(c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
|
||||||
II(b, c, d, a, x[1], S44, 0x85845dd1); /* 56 */
|
II(b, c, d, a, x[1], S44, 0x85845dd1); /* 56 */
|
||||||
II(a, b, c, d, x[8], S41, 0x6fa87e4f); /* 57 */
|
II(a, b, c, d, x[8], S41, 0x6fa87e4f); /* 57 */
|
||||||
II(d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
|
II(d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
|
||||||
II(c, d, a, b, x[6], S43, 0xa3014314); /* 59 */
|
II(c, d, a, b, x[6], S43, 0xa3014314); /* 59 */
|
||||||
II(b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
|
II(b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
|
||||||
II(a, b, c, d, x[4], S41, 0xf7537e82); /* 61 */
|
II(a, b, c, d, x[4], S41, 0xf7537e82); /* 61 */
|
||||||
II(d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
|
II(d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
|
||||||
II(c, d, a, b, x[2], S43, 0x2ad7d2bb); /* 63 */
|
II(c, d, a, b, x[2], S43, 0x2ad7d2bb); /* 63 */
|
||||||
II(b, c, d, a, x[9], S44, 0xeb86d391); /* 64 */
|
II(b, c, d, a, x[9], S44, 0xeb86d391); /* 64 */
|
||||||
|
|
||||||
state[0] += a;
|
state[0] += a;
|
||||||
state[1] += b;
|
state[1] += b;
|
||||||
state[2] += c;
|
state[2] += c;
|
||||||
state[3] += d;
|
state[3] += d;
|
||||||
|
|
||||||
/* Zeroize sensitive information.
|
// Zeroize sensitive information.
|
||||||
|
memset(x, 0, sizeof(x));
|
||||||
*/
|
|
||||||
MD5_memset((POINTER) x, 0, sizeof(x));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Encodes input (UINT4) into output (unsigned char). Assumes len is
|
/* Encodes input (UINT4) into output (unsigned char). Assumes len is
|
||||||
a multiple of 4.
|
a multiple of 4.
|
||||||
*/
|
*/
|
||||||
static void
|
static void Encode(unsigned char *output, UINT4 *input, unsigned int len)
|
||||||
Encode(output, input, len)
|
|
||||||
unsigned char *output;
|
|
||||||
UINT4 *input;
|
|
||||||
unsigned int len;
|
|
||||||
{
|
{
|
||||||
unsigned int i,
|
unsigned int i, j;
|
||||||
j;
|
|
||||||
|
|
||||||
for (i = 0, j = 0; j < len; i++, j += 4)
|
for (i = 0, j = 0; j < len; i++, j += 4)
|
||||||
{
|
{
|
||||||
output[j] = (unsigned char) (input[i] & 0xff);
|
output[j] = (unsigned char) (input[i] & 0xff);
|
||||||
output[j + 1] = (unsigned char) ((input[i] >> 8) & 0xff);
|
output[j + 1] = (unsigned char) ((input[i] >> 8) & 0xff);
|
||||||
output[j + 2] = (unsigned char) ((input[i] >> 16) & 0xff);
|
output[j + 2] = (unsigned char) ((input[i] >> 16) & 0xff);
|
||||||
output[j + 3] = (unsigned char) ((input[i] >> 24) & 0xff);
|
output[j + 3] = (unsigned char) ((input[i] >> 24) & 0xff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Decodes input (unsigned char) into output (UINT4). Assumes len is
|
/* Decodes input (unsigned char) into output (UINT4). Assumes len is
|
||||||
a multiple of 4.
|
a multiple of 4.
|
||||||
*/
|
*/
|
||||||
static void
|
static void Decode(UINT4 *output, unsigned char *input, unsigned int len)
|
||||||
Decode(output, input, len)
|
|
||||||
UINT4 *output;
|
|
||||||
unsigned char *input;
|
|
||||||
unsigned int len;
|
|
||||||
{
|
{
|
||||||
unsigned int i,
|
unsigned int i, j;
|
||||||
j;
|
|
||||||
|
|
||||||
for (i = 0, j = 0; j < len; i++, j += 4)
|
for (i = 0, j = 0; j < len; i++, j += 4)
|
||||||
output[i] = ((UINT4) input[j]) | (((UINT4) input[j + 1]) << 8) | (((UINT4) input[j + 2]) << 16) | (((UINT4) input[j + 3]) << 24);
|
output[i] = ((UINT4) input[j]) | (((UINT4) input[j + 1]) << 8) | (((UINT4) input[j + 2]) << 16) | (((UINT4) input[j + 3]) << 24);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Note: Replace "for loop" with standard memcpy if possible.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void
|
|
||||||
MD5_memcpy(output, input, len)
|
|
||||||
POINTER output;
|
|
||||||
POINTER input;
|
|
||||||
unsigned int len;
|
|
||||||
{
|
|
||||||
unsigned int i;
|
|
||||||
|
|
||||||
for (i = 0; i < len; i++)
|
|
||||||
|
|
||||||
output[i] = input[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Note: Replace "for loop" with standard memset if possible.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
MD5_memset(output, value, len)
|
|
||||||
POINTER output;
|
|
||||||
int value;
|
|
||||||
unsigned int len;
|
|
||||||
{
|
|
||||||
unsigned int i;
|
|
||||||
|
|
||||||
for (i = 0; i < len; i++)
|
|
||||||
((char *) output)[i] = (char) value;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
66
ppp.c
66
ppp.c
|
|
@ -1,6 +1,6 @@
|
||||||
// L2TPNS PPP Stuff
|
// L2TPNS PPP Stuff
|
||||||
|
|
||||||
char const *cvs_id_ppp = "$Id: ppp.c,v 1.11 2004-08-02 06:06:28 fred_nerk Exp $";
|
char const *cvs_id_ppp = "$Id: ppp.c,v 1.12 2004-08-13 00:02:50 fred_nerk Exp $";
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
@ -76,26 +76,27 @@ void processpap(tunnelidt t, sessionidt s, u8 * p, u16 l)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (session[s].ip)
|
if (session[s].ip)
|
||||||
*p = 2; // ACK
|
*p = 2; // ACK
|
||||||
else
|
else
|
||||||
*p = 3; // cant authorise
|
*p = 3; // cant authorise
|
||||||
p[1] = id;
|
p[1] = id;
|
||||||
*(u16 *) (p + 2) = htons(5); // length
|
*(u16 *) (p + 2) = htons(5); // length
|
||||||
p[4] = 0; // no message
|
p[4] = 0; // no message
|
||||||
if (session[s].ip)
|
if (session[s].ip)
|
||||||
{
|
{
|
||||||
log(3, session[s].ip, s, t, "%d Already an IP allocated: %s (%d)\n", getpid(), inet_toa(htonl(session[s].ip)), session[s].ip_pool_index);
|
log(3, session[s].ip, s, t, "%d Already an IP allocated: %s (%d)\n", getpid(), inet_toa(htonl(session[s].ip)), session[s].ip_pool_index);
|
||||||
session[s].flags &= ~SF_IPCP_ACKED;
|
session[s].flags &= ~SF_IPCP_ACKED;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
log(1, 0, s, t, "No radius session available to authenticate session...\n");
|
log(1, 0, s, t, "No radius session available to authenticate session...\n");
|
||||||
}
|
}
|
||||||
log(3, 0, s, t, "Fallback response to PAP (%s)\n", (session[s].ip) ? "ACK" : "NAK");
|
log(3, 0, s, t, "Fallback response to PAP (%s)\n", (session[s].ip) ? "ACK" : "NAK");
|
||||||
tunnelsend(b, 5 + (p - b), t); // send it
|
tunnelsend(b, 5 + (p - b), t); // send it
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // set up RADIUS request
|
{
|
||||||
|
// set up RADIUS request
|
||||||
u16 r = session[s].radius;
|
u16 r = session[s].radius;
|
||||||
|
|
||||||
// Run PRE_AUTH plugins
|
// Run PRE_AUTH plugins
|
||||||
|
|
@ -410,15 +411,16 @@ void processlcp(tunnelidt t, sessionidt s, u8 * p, u16 l)
|
||||||
{
|
{
|
||||||
// Send back a ConfigAck
|
// Send back a ConfigAck
|
||||||
log(3, session[s].ip, s, t, "ConfigReq accepted, sending as Ack\n");
|
log(3, session[s].ip, s, t, "ConfigReq accepted, sending as Ack\n");
|
||||||
|
// for win2k L2TP clientis and LCP renegotiation of alive session
|
||||||
|
if (magicno || l == 4) initlcp(t, s);
|
||||||
q = makeppp(b, sizeof(b), p, l, t, s, PPPLCP);
|
q = makeppp(b, sizeof(b), p, l, t, s, PPPLCP);
|
||||||
if (!q) {
|
if (!q)
|
||||||
|
{
|
||||||
log(3, session[s].ip, s, t, " failed to create packet.\n");
|
log(3, session[s].ip, s, t, " failed to create packet.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
*q = ConfigAck;
|
*q = ConfigAck;
|
||||||
tunnelsend(b, l + (q - b), t);
|
tunnelsend(b, l + (q - b), t);
|
||||||
// For win2k L2TP clients, LCP should be initiated by the LNS
|
|
||||||
if (magicno) initlcp(t, s);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -438,7 +440,7 @@ void processlcp(tunnelidt t, sessionidt s, u8 * p, u16 l)
|
||||||
}
|
}
|
||||||
else if (*p == TerminateReq)
|
else if (*p == TerminateReq)
|
||||||
{
|
{
|
||||||
*p = TerminateAck; // close
|
*p = TerminateAck; // close
|
||||||
q = makeppp(b, sizeof(b), p, l, t, s, PPPLCP);
|
q = makeppp(b, sizeof(b), p, l, t, s, PPPLCP);
|
||||||
if (!q) {
|
if (!q) {
|
||||||
log(3, session[s].ip, s, t, "Failed to create PPP packet in processlcp.\n");
|
log(3, session[s].ip, s, t, "Failed to create PPP packet in processlcp.\n");
|
||||||
|
|
@ -454,7 +456,7 @@ void processlcp(tunnelidt t, sessionidt s, u8 * p, u16 l)
|
||||||
}
|
}
|
||||||
else if (*p == EchoReq)
|
else if (*p == EchoReq)
|
||||||
{
|
{
|
||||||
*p = EchoReply; // reply
|
*p = EchoReply; // reply
|
||||||
*(u32 *) (p + 4) = htonl(session[s].magic); // our magic number
|
*(u32 *) (p + 4) = htonl(session[s].magic); // our magic number
|
||||||
q = makeppp(b, sizeof(b), p, l, t, s, PPPLCP);
|
q = makeppp(b, sizeof(b), p, l, t, s, PPPLCP);
|
||||||
if (!q) {
|
if (!q) {
|
||||||
|
|
@ -537,7 +539,7 @@ void processipcp(tunnelidt t, sessionidt s, u8 * p, u16 l)
|
||||||
if (!session[s].ip)
|
if (!session[s].ip)
|
||||||
{
|
{
|
||||||
log(3, 0, s, t, "Waiting on radius reply\n");
|
log(3, 0, s, t, "Waiting on radius reply\n");
|
||||||
return ; // have to wait on RADIUS reply
|
return; // have to wait on RADIUS reply
|
||||||
}
|
}
|
||||||
// form a config reply quoting the IP in the session
|
// form a config reply quoting the IP in the session
|
||||||
{
|
{
|
||||||
|
|
@ -602,7 +604,7 @@ void processipcp(tunnelidt t, sessionidt s, u8 * p, u16 l)
|
||||||
log(5, session[s].ip, s, t, " DNS2 = %s\n", inet_toa(session[s].dns1));
|
log(5, session[s].ip, s, t, " DNS2 = %s\n", inet_toa(session[s].dns1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
i = findppp(p, 3); // IP address
|
i = findppp(p, 3); // IP address
|
||||||
if (!i || i[1] != 6)
|
if (!i || i[1] != 6)
|
||||||
{
|
{
|
||||||
log(1, 0, s, t, "No IP in IPCP request\n");
|
log(1, 0, s, t, "No IP in IPCP request\n");
|
||||||
|
|
@ -744,12 +746,12 @@ void processccp(tunnelidt t, sessionidt s, u8 * p, u16 l)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*p = ConfigRej; // reject
|
*p = ConfigRej; // reject
|
||||||
sendccp(t, s);
|
sendccp(t, s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*p = TerminateAck; // close
|
*p = TerminateAck; // close
|
||||||
if (!(q = makeppp(b, sizeof(b), p, l, t, s, PPPCCP)))
|
if (!(q = makeppp(b, sizeof(b), p, l, t, s, PPPCCP)))
|
||||||
{
|
{
|
||||||
log(1,0,0,0, "Failed to send CCP packet.\n");
|
log(1,0,0,0, "Failed to send CCP packet.\n");
|
||||||
|
|
@ -775,12 +777,13 @@ void sendchap(tunnelidt t, sessionidt s)
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
log(1, 0, s, t, "Send CHAP challenge\n");
|
log(1, 0, s, t, "Send CHAP challenge\n");
|
||||||
{ // new challenge
|
{
|
||||||
|
// new challenge
|
||||||
int n;
|
int n;
|
||||||
for (n = 0; n < 15; n++)
|
for (n = 0; n < 15; n++)
|
||||||
radius[r].auth[n] = rand();
|
radius[r].auth[n] = rand();
|
||||||
}
|
}
|
||||||
radius[r].chap = 1; // CHAP not PAP
|
radius[r].chap = 1; // CHAP not PAP
|
||||||
radius[r].id++;
|
radius[r].id++;
|
||||||
if (radius[r].state != RADIUSCHAP)
|
if (radius[r].state != RADIUSCHAP)
|
||||||
radius[r].try = 0;
|
radius[r].try = 0;
|
||||||
|
|
@ -797,11 +800,11 @@ void sendchap(tunnelidt t, sessionidt s)
|
||||||
log(1, 0, s, t, "failed to send CHAP challenge.\n");
|
log(1, 0, s, t, "failed to send CHAP challenge.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
*q = 1; // challenhe
|
*q = 1; // challenge
|
||||||
q[1] = radius[r].id; // ID
|
q[1] = radius[r].id; // ID
|
||||||
q[4] = 16; // length
|
q[4] = 16; // length
|
||||||
memcpy(q + 5, radius[r].auth, 16); // challenge
|
memcpy(q + 5, radius[r].auth, 16); // challenge
|
||||||
strcpy(q + 21, hostname); // our name
|
strcpy(q + 21, hostname); // our name
|
||||||
*(u16 *) (q + 2) = htons(strlen(hostname) + 21); // length
|
*(u16 *) (q + 2) = htons(strlen(hostname) + 21); // length
|
||||||
tunnelsend(b, strlen(hostname) + 21 + (q - b), t); // send it
|
tunnelsend(b, strlen(hostname) + 21 + (q - b), t); // send it
|
||||||
}
|
}
|
||||||
|
|
@ -852,7 +855,7 @@ u8 *findppp(u8 * b, u8 mtype)
|
||||||
while (l)
|
while (l)
|
||||||
{
|
{
|
||||||
if (l < b[1] || !b[1])
|
if (l < b[1] || !b[1])
|
||||||
return 0; // faulty
|
return 0; // faulty
|
||||||
if (*b == mtype)
|
if (*b == mtype)
|
||||||
return b;
|
return b;
|
||||||
l -= b[1];
|
l -= b[1];
|
||||||
|
|
@ -874,11 +877,14 @@ void initlcp(tunnelidt t, sessionidt s)
|
||||||
log(4, 0, s, t, "Sending LCP ConfigReq for PAP\n");
|
log(4, 0, s, t, "Sending LCP ConfigReq for PAP\n");
|
||||||
*q = ConfigReq;
|
*q = ConfigReq;
|
||||||
*(u8 *)(q + 1) = (time_now % 255) + 1; // ID
|
*(u8 *)(q + 1) = (time_now % 255) + 1; // ID
|
||||||
*(u16 *)(q + 2) = htons(8); // Length
|
*(u16 *)(q + 2) = htons(14); // Length
|
||||||
*(u8 *)(q + 4) = 3;
|
*(u8 *)(q + 4) = 5;
|
||||||
*(u8 *)(q + 5) = 4;
|
*(u8 *)(q + 5) = 6;
|
||||||
*(u16 *)(q + 6) = htons(0xC023); // PAP
|
*(u32 *)(q + 6) = htonl(session[s].magic);
|
||||||
tunnelsend(b, 12 + 8, t);
|
*(u8 *)(q + 10) = 3;
|
||||||
|
*(u8 *)(q + 11) = 4;
|
||||||
|
*(u16 *)(q + 12) = htons(0xC023); // PAP
|
||||||
|
tunnelsend(b, 12 + 14, t);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send CCP reply
|
// Send CCP reply
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue