fluff to simplify diffs
This commit is contained in:
parent
f4ff96a03e
commit
a5848e393c
4 changed files with 15 additions and 17 deletions
11
l2tpns.c
11
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.9 2004-06-28 02:43:13 fred_nerk Exp $";
|
char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.10 2004-07-02 07:31:23 bodea Exp $";
|
||||||
|
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
@ -896,12 +896,12 @@ void send_ipout(sessionidt s, u8 *buf, int len)
|
||||||
t = session[s].tunnel;
|
t = session[s].tunnel;
|
||||||
sp = &session[s];
|
sp = &session[s];
|
||||||
|
|
||||||
|
log(5, session[s].ip, s, t, "Ethernet -> Tunnel (%d bytes)\n", len);
|
||||||
|
|
||||||
// Snooping this session, send it to intercept box
|
// Snooping this session, send it to intercept box
|
||||||
if (sp->snoop_ip && sp->snoop_port)
|
if (sp->snoop_ip && sp->snoop_port)
|
||||||
snoop_send_packet(buf, len, sp->snoop_ip, sp->snoop_port);
|
snoop_send_packet(buf, len, sp->snoop_ip, sp->snoop_port);
|
||||||
|
|
||||||
log(5, session[s].ip, s, t, "Ethernet -> Tunnel (%d bytes)\n", len);
|
|
||||||
|
|
||||||
// Add on L2TP header
|
// Add on L2TP header
|
||||||
{
|
{
|
||||||
u8 *p = makeppp(b, sizeof(b), buf, len, t, s, PPPIP);
|
u8 *p = makeppp(b, sizeof(b), buf, len, t, s, PPPIP);
|
||||||
|
|
@ -3545,8 +3545,6 @@ int load_session(sessionidt s, sessiont *new)
|
||||||
routeset(s, new->route[i].ip, new->route[i].mask, new->ip, 1);
|
routeset(s, new->route[i].ip, new->route[i].mask, new->ip, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (new->tunnel && s > config->cluster_highest_sessionid) // Maintain this in the slave. It's used
|
if (new->tunnel && s > config->cluster_highest_sessionid) // Maintain this in the slave. It's used
|
||||||
// for walking the sessions to forward byte counts to the master.
|
// for walking the sessions to forward byte counts to the master.
|
||||||
config->cluster_highest_sessionid = s;
|
config->cluster_highest_sessionid = s;
|
||||||
|
|
@ -3556,6 +3554,7 @@ int load_session(sessionidt s, sessiont *new)
|
||||||
// Do fixups into address pool.
|
// Do fixups into address pool.
|
||||||
if (new->ip_pool_index != -1)
|
if (new->ip_pool_index != -1)
|
||||||
fix_address_pool(s);
|
fix_address_pool(s);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3725,7 +3724,7 @@ void processcontrol(u8 * buf, int len, struct sockaddr_in *addr)
|
||||||
|
|
||||||
if (log_stream && config->debug >= 4)
|
if (log_stream && config->debug >= 4)
|
||||||
{
|
{
|
||||||
log(4, ntohl(addr->sin_addr.s_addr), 0, 0, "Received ");
|
log(4, ntohl(addr->sin_addr.s_addr), 0, 0, "Received ");
|
||||||
dump_packet(buf, log_stream);
|
dump_packet(buf, log_stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
8
l2tpns.h
8
l2tpns.h
|
|
@ -1,5 +1,5 @@
|
||||||
// L2TPNS Global Stuff
|
// L2TPNS Global Stuff
|
||||||
// $Id: l2tpns.h,v 1.8 2004-06-28 02:43:13 fred_nerk Exp $
|
// $Id: l2tpns.h,v 1.9 2004-07-02 07:31:23 bodea Exp $
|
||||||
|
|
||||||
#ifndef __L2TPNS_H__
|
#ifndef __L2TPNS_H__
|
||||||
#define __L2TPNS_H__
|
#define __L2TPNS_H__
|
||||||
|
|
@ -14,7 +14,6 @@
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <libcli.h>
|
#include <libcli.h>
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#define VERSION "2.0.0"
|
#define VERSION "2.0.0"
|
||||||
|
|
||||||
|
|
@ -43,6 +42,7 @@
|
||||||
#define IDLE_TIMEOUT 240 // Time between last packet sent and LCP ECHO generation
|
#define IDLE_TIMEOUT 240 // Time between last packet sent and LCP ECHO generation
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
|
#include "config.h"
|
||||||
#ifndef PLUGINDIR
|
#ifndef PLUGINDIR
|
||||||
#define PLUGINDIR LIBDIR // Plugins
|
#define PLUGINDIR LIBDIR // Plugins
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -403,12 +403,12 @@ struct configt
|
||||||
// Don't use this unless you have a dual processor machine!
|
// Don't use this unless you have a dual processor machine!
|
||||||
int icmp_rate; // Max number of ICMP unreachable per second to send
|
int icmp_rate; // Max number of ICMP unreachable per second to send
|
||||||
|
|
||||||
u32 cluster_address; // Multicast address of cluster.
|
u32 cluster_address; // Multicast address of cluster.
|
||||||
// Send to this address to have everyone hear.
|
// Send to this address to have everyone hear.
|
||||||
char cluster_interface[64]; // Which interface to listen for multicast on.
|
char cluster_interface[64]; // Which interface to listen for multicast on.
|
||||||
int cluster_iam_master; // Are we the cluster master???
|
int cluster_iam_master; // Are we the cluster master???
|
||||||
int cluster_iam_uptodate; // Set if we've got a full set of state from the master.
|
int cluster_iam_uptodate; // Set if we've got a full set of state from the master.
|
||||||
u32 cluster_master_address; // The network address of the cluster master.
|
u32 cluster_master_address; // The network address of the cluster master.
|
||||||
// Zero if i am the cluster master.
|
// Zero if i am the cluster master.
|
||||||
int cluster_seq_number; // Sequence number of the next heartbeat we'll send out
|
int cluster_seq_number; // Sequence number of the next heartbeat we'll send out
|
||||||
// (or the seq number we're next expecting if we're a slave).
|
// (or the seq number we're next expecting if we're a slave).
|
||||||
|
|
|
||||||
10
radius.c
10
radius.c
|
|
@ -1,6 +1,6 @@
|
||||||
// L2TPNS Radius Stuff
|
// L2TPNS Radius Stuff
|
||||||
|
|
||||||
char const *cvs_id_radius = "$Id: radius.c,v 1.5 2004-06-28 02:43:13 fred_nerk Exp $";
|
char const *cvs_id_radius = "$Id: radius.c,v 1.6 2004-07-02 07:31:23 bodea Exp $";
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
@ -74,10 +74,10 @@ static u16 new_radius()
|
||||||
{
|
{
|
||||||
return next_radius_id;
|
return next_radius_id;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
log(0, 0, 0, 0, "Can't find a free radius session! This is very bad!\n");
|
log(0, 0, 0, 0, "Can't find a free radius session! This is very bad!\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
u16 radiusnew(sessionidt s)
|
u16 radiusnew(sessionidt s)
|
||||||
|
|
|
||||||
3
tbf.c
3
tbf.c
|
|
@ -1,6 +1,6 @@
|
||||||
// L2TPNS: token bucket filters
|
// L2TPNS: token bucket filters
|
||||||
|
|
||||||
char const *cvs_id_tbf = "$Id: tbf.c,v 1.2 2004-06-28 02:43:13 fred_nerk Exp $";
|
char const *cvs_id_tbf = "$Id: tbf.c,v 1.3 2004-07-02 07:31:23 bodea Exp $";
|
||||||
|
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
@ -406,4 +406,3 @@ int cmd_show_tbf(struct cli_def *cli, char *command, char **argv, int argc)
|
||||||
cli_print(cli, "%d tbf entries used, %d total", count, filter_list_size);
|
cli_print(cli, "%d tbf entries used, %d total", count, filter_list_size);
|
||||||
return CLI_OK;
|
return CLI_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue