Commit graph

51 commits

Author SHA1 Message Date
Brendan O'Dea
5faf075c8d add Multilink support from Khaled Al Hamwi 2006-04-27 09:53:49 +00:00
Brendan O'Dea
0251304ce2 set source address for DAE responses 2006-04-05 02:13:48 +00:00
Brendan O'Dea
b3eeda4574 unused: sessiont.{ns,nr} 2005-12-05 14:10:42 +00:00
Brendan O'Dea
57cf90e184 fix CTUNNEL decompress error message 2005-12-05 12:47:12 +00:00
Brendan O'Dea
10c35633a5 - Reset restart counters correctly.
- Reset timers on sending ConfigReq.
- Only send one RADIUS Start record, even if IPCP is restarted.
2005-11-04 14:41:50 +00:00
Brendan O'Dea
2b05f31dc7 add cluster_mcast_ttl option 2005-09-02 23:59:56 +00:00
Brendan O'Dea
aabf1d3fe9 - Replace flags used for LCP/IPCP with state machine.
- Use openssl MD5, fix DAE vector (Alex Kiernan).
2005-07-31 10:04:09 +00:00
Brendan O'Dea
a685501f64 add DAE support (PoD/CoA) from Vladislav Bjelic 2005-06-28 14:48:17 +00:00
Brendan O'Dea
e5695ec41c clear cluster_master on election so that slaves will accept a new master 2005-06-27 04:52:54 +00:00
Brendan O'Dea
973c5fd008 Ping new master when we get C_MASTER and delay next election to allow
the unicast limp-along code to kick in if required.
2005-06-14 05:37:09 +00:00
Brendan O'Dea
b830a899ca Include endpoint address in accounting dump files.
Convert mainloop to use epoll rather than select.
2005-06-04 15:42:35 +00:00
Brendan O'Dea
bd2ec60149 merge in changes from 2.0 branch; fix byte counters in accounting records, add gigawords 2005-06-02 11:32:30 +00:00
Brendan O'Dea
83699acac6 merge cluster fixes from release_2_0 branch 2005-05-26 12:17:30 +00:00
Brendan O'Dea
211cb9427c back out C_LASTSEEN change (to be replaced by different solution in merge from 2.0) 2005-05-24 07:45:13 +00:00
Brendan O'Dea
93151dffc9 session structure has changed: bump heartbeat version and convert old format heartbeats 2005-05-08 08:00:49 +00:00
Brendan O'Dea
ecd6721a85 Don't process C_LASTSEEN unless we're a master (otherwise a crashed
master kills all slaves once restarted).
2005-05-07 10:14:33 +00:00
Brendan O'Dea
8eebdb18f2 Add interim accounting support from Vladislav Bjelic 2005-05-05 10:02:06 +00:00
Brendan O'Dea
7514d053bc Update .last_packet in cluster_handle_bytes only when there have
been bytes received from the modem (dead sessions were having the
idle timeout reset by stray packets).
2005-05-02 09:06:05 +00:00
Brendan O'Dea
804d90bb98 missed merge from stable branch 2005-04-01 08:55:29 +00:00
Brendan O'Dea
d7fbaf8b70 reset .die on master takeover 2005-04-01 08:46:03 +00:00
Brendan O'Dea
983b38e12f merge back 2.0 branch changes 2005-02-14 06:58:38 +00:00
Brendan O'Dea
df834e98ff use constant 2005-02-09 02:38:51 +00:00
Brendan O'Dea
17fd46618e rename sess_count to sess_local, fiddle with packet_limit log output 2005-01-13 07:57:35 +00:00
Brendan O'Dea
5c3bc79ed4 typo 2004-12-22 05:30:58 +00:00
Brendan O'Dea
8454a49d0c sanity check that cluster_send_session is not called from a child process
throttle outgoing LASTSEEN packets to at most one per second for a given seq#
2004-12-20 07:23:41 +00:00
Brendan O'Dea
0ab682e580 add counters for select_called, select_ready and select_processed
fix cli_print format strings
2004-12-16 23:40:30 +00:00
Brendan O'Dea
9d199a1046 use standard uintN_t types for portability 2004-12-16 08:49:52 +00:00
Brendan O'Dea
c1a9baad0e typo 2004-12-15 02:56:38 +00:00
Brendan O'Dea
24836565c0 skip where our table version is greater (rather than falling through) 2004-12-15 01:04:34 +00:00
Brendan O'Dea
32fbf3a470 make cluster_sockfd non-blocking 2004-12-13 05:09:55 +00:00
Brendan O'Dea
cdc0c4887c typo in log message 2004-12-09 00:38:44 +00:00
Brendan O'Dea
f5fb6dea86 better cluster master collision resolution 2004-12-03 06:40:02 +00:00
Brendan O'Dea
2f5b811429 make "established" a different tcp flag match
add fragment handling
drop IP address from LOG macro (function)
2004-11-29 02:17:17 +00:00
Brendan O'Dea
4f5ea4fbe0 - Ignore gateway address in Framed-Route (from Jonathan McDowell).
- Call sessionshutdown() when a tunnel is dropped rather than
  sessionkill() to ensure that RADIUS stop records are sent.
- Cleanup: make a bunch of global functions/variables static.
2004-11-16 07:54:32 +00:00
Brendan O'Dea
9cc63de624 handle routing properly in lone-master case 2004-11-09 03:09:12 +00:00
Brendan O'Dea
4e0597cd50 use LOG for logging macro
clean up initlcp handling
2004-11-05 04:55:25 +00:00
Brendan O'Dea
14013054f3 - Use 2 seperate u16 values for throttle rate in/out
- Defer adding radius fds to the select loop until become_master
2004-11-02 04:35:03 +00:00
Brendan O'Dea
8e9fcdba98 slaves get new tbf indexes on becoming master anyway 2004-10-30 07:35:00 +00:00
Brendan O'Dea
79d49cacd9 sync changes 2004-10-29 04:25:40 +00:00
David Parrish
8eab46f578 foo 2004-09-21 04:30:46 +00:00
David Parrish
d52f68e6d3 Cleanups and sync 2004-09-02 04:18:07 +00:00
David Parrish
5779efc7ae Allow cli session changes to happen if the session is timing out 2004-08-02 06:06:28 +00:00
Brendan O'Dea
eae3c0527f - TerminateAck fix from Yuri
- Adject cli_loop args for libcli 1.8.0
- Allow for backward compatabity in C_PING packets
- Don't send RADIUS stop messages from sessionshutdown when called from
  sessionkill.
2004-07-11 07:57:33 +00:00
Brendan O'Dea
6adc660b49 - s/tap/tun/
- fix for LASTSEEN breakage:  don't do anything in the CLI other than
  flag changes to be made by the parent
- split out master parts from cluster_check_master() into cluster_check_slaves()
2004-07-08 16:54:35 +00:00
Brendan O'Dea
4ad7536258 - set hostname in CLI prompt
- add assertions to help identify odd LASTSEEN breakage
- make cluster_hb_interval work; include interval/timeout in heartbeats
  so that a change on the master is propagated immediately to the slaves
- use fast heartbeats when there are slaves not up to date
- ensure basetime of shut down master is set to zero (prevent delayed election)
- fix radius session leak on IPCP timeout
- fix some off-by-one errors in tunnel/session loops
2004-07-07 09:09:53 +00:00
Brendan O'Dea
d78201b5d7 roll in Michael's "limp along" fix for when a slave drops temporarily from the mcast group 2004-07-05 06:54:01 +00:00
Brendan O'Dea
f4ff96a03e fold back in changes from production 2004-07-02 07:30:43 +00:00
David Parrish
7aa420ce9f * Update cli callbacks to work with libcli 1.6.
This supports privileged and unprivileged commands, as well as a configuration
  mode
* Add help for all cli commands
* Add "show version" command
* Fix uptime counter display
* Fix nasty bug where cluster basetime can be set to 0 when sending initial
  heartbeat
* Don't rmmod ip_conntrack, as this can take a lot of time
* Re-order logging in routeset such that the action is given before any error
* Use the correct gateway address when deleting routes
* Remove any routes when address changes
* Require authentication if telnet from remote ip
* Require enable password always
* Return error if show pool done on slave
* We MUST immediately exit if we're the wrong master!
2004-06-28 02:43:13 +00:00
David Parrish
c239d4b228 * Wed Jun 23 2004 David Parrish <david@dparrish.com> 2.0.0
- Major release
- Completely replace active/standby clustering with a new peer-to-peer
  clustering method which allows much greater throughput and is a lot more fault
  tolerant
- Add internal tbf implementation for throttling without relying on tc and
  kernel HTB
- Add support for iBGP and eBGP to advertise routes
- Add cli commands "show cluster", "show bgp", "show ipcache", "show throttle",
  "show tbf", "suspend bgp", "restart bgp", "show user"
- Interception destination must be set per-user
- If SMP machine, allow use of SCHED_FIFO, which should improve performance
- Added config option to send GARP at startup
- Added plugin_become_master and plugin_new_session_master plugin hooks
- Remove useless sessionsendarp(). This isn't needed now that we are using TUN
  instead of TAP.
- ICMP rate limiting so not every unreachable packet is replied with an ICMP
  unreachable message
- mangle table is not required on anything but the cluster master, so slaves
  will drop the mangle table and attempt to unload the ip_conntrack module
- Statically assigned IP addresses (by Radius) work now
- Add -d command-line flag to detach and become a daemon
- Configuration file is now "/etc/l2tpns/startup-config"
- Reduced MIN_IP_SIZE to 0x19 to stop a pile of Short IP warnings
- Resend initial IPCP request until it's acknowleged by the client
- Better radius session cleanup logic
- Many miscellaenous bugfixes and performance enhancements
- Thanks to Michael O'Reilly and Brendan O'Dea for most of these new features
2004-06-23 03:52:24 +00:00
David Parrish
fc0a363208 * Fri Mar 5 2004 David Parrish <david@dparrish.com> 1.1.0
- Change all strcpy() calls to strncpy() to avoid buffer overflow potential
- Add ICMP host unreachable support
- Logging to syslog if log_file = "syslog:facility"
- Now requires libcli 1.5
- All configuration moves to a config structure
- Ability to modify and write config on the fly through command-line interface
- Config file support is removed, and now handled by the cli
- Show hostname in cli prompt
- Keep current state type for tunnels
- Add uptime command do CLI, which also shows real-time bandwidth utilisation
- Add goodbye command to cluster master, which forces droppping a slave
- Cache IP address allocation, so that reconnecting users get the same address
- Fix tunnel resend timeouts, so that dead tunnels will be cleaned up
- Allocate tunnels and radius without using a linked list which had issues
- Fix some off-by-one errors in tunnel and session and radius arrays
- Save and reload ip address pool when dieing
- Check version and size of reloaded data when restarting
- Remove plugin_config support
- Remove old support for TBF which didn't work anyway. HTB is required to do throttling now.
- Add COPYING and Changes files
2004-03-05 00:09:03 +00:00