projects
/
l2tpns.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cosmetic logging change
[l2tpns.git]
/
l2tpns.c
diff --git
a/l2tpns.c
b/l2tpns.c
index
0654daf
..
a9ab38c
100644
(file)
--- a/
l2tpns.c
+++ b/
l2tpns.c
@@
-4,7
+4,7
@@
// Copyright (c) 2002 FireBrick (Andrews & Arnold Ltd / Watchfront Ltd) - GPL licenced
// vim: sw=8 ts=8
// Copyright (c) 2002 FireBrick (Andrews & Arnold Ltd / Watchfront Ltd) - GPL licenced
// vim: sw=8 ts=8
-char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.6
5 2004-12-13 02:27:3
1 bodea Exp $";
+char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.6
9 2004-12-16 03:03:4
1 bodea Exp $";
#include <arpa/inet.h>
#include <assert.h>
#include <arpa/inet.h>
#include <assert.h>
@@
-2206,12
+2206,13
@@
static int regular_cleanups(void)
{
// Dump accounting data
next_acct = TIME + ACCT_TIME;
{
// Dump accounting data
next_acct = TIME + ACCT_TIME;
+ next_shut_acct = TIME + ACCT_SHUT_TIME;
dump_acct_info(1);
}
else if (next_shut_acct <= TIME)
{
// Dump accounting data for shutdown sessions
dump_acct_info(1);
}
else if (next_shut_acct <= TIME)
{
// Dump accounting data for shutdown sessions
- next_acct = TIME + ACCT_SHUT_TIME;
+ next_
shut_
acct = TIME + ACCT_SHUT_TIME;
if (shut_acct_n)
dump_acct_info(0);
}
if (shut_acct_n)
dump_acct_info(0);
}
@@
-2431,9
+2432,9
@@
static void mainloop(void)
// incoming IP
if (FD_ISSET(tunfd, &r))
{
// incoming IP
if (FD_ISSET(tunfd, &r))
{
- if ((
n
= read(tunfd, buf, sizeof(buf))) > 0)
+ if ((
s
= read(tunfd, buf, sizeof(buf))) > 0)
{
{
- processtun(buf,
n
);
+ processtun(buf,
s
);
}
else
{
}
else
{
@@
-2974,8
+2975,8
@@
void snoop_send_packet(char *packet, u16 size, ipt destination, u16 port)
snoop_addr.sin_addr.s_addr = destination;
snoop_addr.sin_port = ntohs(port);
snoop_addr.sin_addr.s_addr = destination;
snoop_addr.sin_port = ntohs(port);
- LOG(5, 0, 0, "Snooping
packet at %p (%d bytes) to %s:%d\n"
,
-
packet, size,
fmtaddr(snoop_addr.sin_addr.s_addr, 0),
+ LOG(5, 0, 0, "Snooping
%d byte packet to %s:%d\n", size
,
+ fmtaddr(snoop_addr.sin_addr.s_addr, 0),
htons(snoop_addr.sin_port));
if (sendto(snoopfd, packet, size, MSG_DONTWAIT | MSG_NOSIGNAL, (void *) &snoop_addr, sizeof(snoop_addr)) < 0)
htons(snoop_addr.sin_port));
if (sendto(snoopfd, packet, size, MSG_DONTWAIT | MSG_NOSIGNAL, (void *) &snoop_addr, sizeof(snoop_addr)) < 0)