add peer_address config option
This commit is contained in:
parent
7d7afb67c8
commit
1a8d1e7b24
4 changed files with 14 additions and 5 deletions
4
Changes
4
Changes
|
|
@ -1,3 +1,7 @@
|
||||||
|
? Brendan O'Dea <bod@optusnet.com.au> 2.0.4
|
||||||
|
- Added setrxspeed plugin
|
||||||
|
- Added peer_address config option
|
||||||
|
|
||||||
* Wed Nov 3 2004 Brendan O'Dea <bod@optusnet.com.au> 2.0.3
|
* Wed Nov 3 2004 Brendan O'Dea <bod@optusnet.com.au> 2.0.3
|
||||||
- Added support for hidden AVPs by Robert Clark
|
- Added support for hidden AVPs by Robert Clark
|
||||||
- l2tpns-chap-response.patch from Robert Clark
|
- l2tpns-chap-response.patch from Robert Clark
|
||||||
|
|
|
||||||
4
cli.c
4
cli.c
|
|
@ -2,7 +2,7 @@
|
||||||
// vim: sw=8 ts=8
|
// vim: sw=8 ts=8
|
||||||
|
|
||||||
char const *cvs_name = "$Name: $";
|
char const *cvs_name = "$Name: $";
|
||||||
char const *cvs_id_cli = "$Id: cli.c,v 1.22 2004-11-04 23:41:54 bodea Exp $";
|
char const *cvs_id_cli = "$Id: cli.c,v 1.23 2004-11-05 02:47:47 bodea Exp $";
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
@ -538,7 +538,7 @@ int cmd_show_tunnels(struct cli_def *cli, char *command, char **argv, int argc)
|
||||||
for (i = 1; i < MAXTUNNEL; i++)
|
for (i = 1; i < MAXTUNNEL; i++)
|
||||||
{
|
{
|
||||||
int sessions = 0;
|
int sessions = 0;
|
||||||
if (!show_all && (!tunnel[i].ip || tunnel[i].die || !tunnel[i].hostname[0])) continue;
|
if (!show_all && (!tunnel[i].ip || tunnel[i].die)) continue;
|
||||||
|
|
||||||
for (x = 0; x < MAXSESSION; x++) if (session[x].tunnel == i && session[x].opened && !session[x].die) sessions++;
|
for (x = 0; x < MAXSESSION; x++) if (session[x].tunnel == i && session[x].opened && !session[x].die) sessions++;
|
||||||
cli_print(cli, "%4d %20s %20s %6s %6d",
|
cli_print(cli, "%4d %20s %20s %6s %6d",
|
||||||
|
|
|
||||||
8
l2tpns.c
8
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.42 2004-11-05 02:25:25 bodea Exp $";
|
char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.43 2004-11-05 02:47:47 bodea Exp $";
|
||||||
|
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
@ -107,6 +107,7 @@ struct config_descriptt config_values[] = {
|
||||||
CONFIG("radius_accounting", radius_accounting, BOOL),
|
CONFIG("radius_accounting", radius_accounting, BOOL),
|
||||||
CONFIG("radius_secret", radiussecret, STRING),
|
CONFIG("radius_secret", radiussecret, STRING),
|
||||||
CONFIG("bind_address", bind_address, IP),
|
CONFIG("bind_address", bind_address, IP),
|
||||||
|
CONFIG("peer_address", peer_address, IP),
|
||||||
CONFIG("send_garp", send_garp, BOOL),
|
CONFIG("send_garp", send_garp, BOOL),
|
||||||
CONFIG("throttle_speed", rl_rate, UNSIGNED_LONG),
|
CONFIG("throttle_speed", rl_rate, UNSIGNED_LONG),
|
||||||
CONFIG("throttle_buckets", num_tbfs, INT),
|
CONFIG("throttle_buckets", num_tbfs, INT),
|
||||||
|
|
@ -1127,7 +1128,10 @@ void sendipcp(tunnelidt t, sessionidt s)
|
||||||
*(u16 *) (q + 2) = htons(10);
|
*(u16 *) (q + 2) = htons(10);
|
||||||
q[4] = 3;
|
q[4] = 3;
|
||||||
q[5] = 6;
|
q[5] = 6;
|
||||||
*(u32 *) (q + 6) = config->bind_address ? config->bind_address : my_address; // send my IP
|
*(u32 *) (q + 6) = config->peer_address ? config->peer_address :
|
||||||
|
config->bind_address ? config->bind_address :
|
||||||
|
my_address; // send my IP
|
||||||
|
|
||||||
tunnelsend(buf, 10 + (q - buf), t); // send it
|
tunnelsend(buf, 10 + (q - buf), t); // send it
|
||||||
session[s].flags &= ~SF_IPCP_ACKED; // Clear flag.
|
session[s].flags &= ~SF_IPCP_ACKED; // Clear flag.
|
||||||
}
|
}
|
||||||
|
|
|
||||||
3
l2tpns.h
3
l2tpns.h
|
|
@ -1,5 +1,5 @@
|
||||||
// L2TPNS Global Stuff
|
// L2TPNS Global Stuff
|
||||||
// $Id: l2tpns.h,v 1.28 2004-11-03 13:23:59 bodea Exp $
|
// $Id: l2tpns.h,v 1.29 2004-11-05 02:47:47 bodea Exp $
|
||||||
|
|
||||||
#ifndef __L2TPNS_H__
|
#ifndef __L2TPNS_H__
|
||||||
#define __L2TPNS_H__
|
#define __L2TPNS_H__
|
||||||
|
|
@ -427,6 +427,7 @@ struct configt
|
||||||
int save_state;
|
int save_state;
|
||||||
char accounting_dir[128];
|
char accounting_dir[128];
|
||||||
ipt bind_address;
|
ipt bind_address;
|
||||||
|
ipt peer_address;
|
||||||
int send_garp; // Set to true to garp for vip address on startup
|
int send_garp; // Set to true to garp for vip address on startup
|
||||||
|
|
||||||
int target_uid;
|
int target_uid;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue