avoid endless loop in processipcp, processipv6cp
[l2tpns.git] / Changes
1 * Sat Feb 18 2006 Brendan O'Dea <bod@optus.net> 2.1.16
2 - Send configured magic-no in LCP EchoReq when LCP is opened.
3 - Correct addition of single IP to pool (Jonathan Yarden).
4 - Handle LCP NAK of magic-number.
5 - Ensure session changes from LCP ConfigReq/ConfigNak are sent to cluster.
6 - Verify that RADIUS packets come from a configured server (Jonathan Yarden).
7 - Avoid endless loop in processipcp, processipv6cp.
8
9 * Mon Dec 19 2005 Brendan O'Dea <bod@optus.net> 2.1.15
10 - Drop backtrace.
11 - Reduce logging of LCP EchoReply packets.
12 - Break LCP configure loop with shutdown.
13 - Limit value of MRU of 1492 (rfc2516).
14 - Tun MTU should be MRU (not MRU+4).
15 - Add Service-Type/Framed-Protocol to RADIUS records (Paul Martin).
16
17 * Fri Dec 9 2005 Brendan O'Dea <bod@optus.net> 2.1.14
18 - Run PLUGIN_RADIUS_ACCOUNT for Start records.
19
20 * Wed Dec 7 2005 Brendan O'Dea <bod@optus.net> 2.1.13
21 - Add test/ping-sweep.
22 - Apply spec changes from Charlie Brady: use License header, change
23   BuildRoot to include username.
24 - Fix IPCP negotiation of secondary DNS server, reported by Jon Morby.
25 - Clean up sessiont, removing some unused fields.
26 - Remove unused "MAC" config type.
27 - Reject unknown/unconfigured protocols on the master.
28 - Sanity check MRU before using in ppp_code_rej, protoreject.
29
30 * Thu Nov 17 2005 Brendan O'Dea <bod@optus.net> 2.1.12
31 - Set MTU on tunnel interface so the kernel will re-fragment large
32   packets to within MRU.
33 - Fix TCP checksum recalc.
34 - NAK silly MRU values from peer.
35
36 * Mon Nov 14 2005 Brendan O'Dea <bod@optus.net> 2.1.11
37 - Fix fragment handling in ip_filter.
38 - Exclude counter when comparing filter rules.
39
40 * Sat Nov 5 2005 Brendan O'Dea <bod@optus.net> 2.1.10
41 - Add scripts/l2tpns-capture.
42 - Fix LCP Echo frequency.
43 - Add Framed-Route entries to RADIUS records.
44 - Reset restart counters correctly.
45 - Reset timers on sending ConfigReq.
46 - Only send one RADIUS Start record, even if IPCP is restarted.
47
48 * Tue Oct 11 2005 Brendan O'Dea <bod@optus.net> 2.1.9
49 - Fix Calling-Station-Id in RADIUS accounting records (Slobodan Tomic).
50 - Fix RADIUS authentication on DAE responses.
51 - Don't send tunnel HELLO when there are pending control messages.
52 - Move plugin_radius_reset from *ctl to auto* plugins.
53 - Add Cisco-AVPairs to RADIUS accounting records via plugin_radius_account.
54
55 * Mon Sep 19 2005 Brendan O'Dea <bod@optus.net> 2.1.8
56 - Move code from signal handlers into mainloop, avoiding a race
57   condition when forking CLI.
58
59 * Fri Sep 16 2005 Brendan O'Dea <bod@optus.net> 2.1.7
60 - This time, for sure: really fix Protocol-Reject.
61
62 * Fri Sep 16 2005 Brendan O'Dea <bod@optus.net> 2.1.6
63 - Any traffic on a tunnel resets lastrec, not just control messages.
64 - Use a unique identifier for LCP.
65 - Fix Code-Reject/Protocol-Reject.
66 - Add l2tp_mtu configuration option, used to define MRU, MSS.
67 - Adjust TCP MSS options in SYN and SYN,ACK packets to avoid
68   fragmentation of tcp packets.
69
70 * Sat Sep 3 2005 Brendan O'Dea <bod@optus.net> 2.1.5
71 - Avoid Code-Reject loop.
72 - Increase size of PPP buffers to MAXETHER.
73 - Bug fixes for CLI ringbuffer and tunnel HELLO from Yuri.
74 - Restart rather than halt BGP on receipt of CEASE (Dominique Rousseau).
75 - Add cluster_mcast_ttl option to allow a cluster to span multiple
76   subnets (suggested by Tim Devries).
77
78 * Mon Aug 29 2005 Brendan O'Dea <bod@optus.net> 2.1.4
79 - Drop level of "Unexpected CHAP message" log.
80 - Fix parsing of ProtocolRej (allow 1 or two byte protocols).
81 - Handle rejection of MRU negotiation by peer.
82 - Use local hostname for tunnel in SCCRP (Alex Kiernan).
83
84 * Wed Aug 17 2005 Brendan O'Dea <bod@optus.net> 2.1.3
85 - Fail IPCP negotiation only on ConfigRej of IP-Address.
86
87 * Wed Aug 10 2005 Brendan O'Dea <bod@optus.net> 2.1.2
88 - Clear cluster_master on election so that slaves will accept a new master.
89 - Provide more comments/defaults in etc/startup-config.default.
90 - Add DAE support (PoD/CoA) from Vladislav Bjelic.
91 - Clean up new warnings from gcc 4.0.
92 - Replace flags used for LCP/IPCP with state machine.
93 - Include Acct-Session-Time in interim records.
94 - Fix DAE vector, generateload (Alex Kiernan).
95 - Replace RSA MD5 with public domain version.
96
97 * Tue Jun 14 2005 Brendan O'Dea <bod@optusnet.com.au> 2.1.1
98 - Add missing newline to backtrace macro.
99 - Don't send CDN for each session when shutting down tunnels (this is
100   implicit).
101 - Move tunnel shutdown from SIGQUIT signal handler to be run once from
102   still_busy().  Reject new tunnels/sessions while in the process of
103   shutting down.
104 - Clarify usage of shutdown signals in documentation.
105 - Always initialise PRNG.
106 - Sanity check length of random_vector.
107 - Fix segv in unhide_value.
108 - Ping new master when we get C_MASTER and delay next election to allow
109   the unicast limp-along code to kick in if required.
110
111 * Sun Jun 5 2005 Brendan O'Dea <bod@optusnet.com.au> 2.1.0
112 - Add IPv6 support from Jonathan McDowell.
113 - Add CHAP support from Jordan Hrycaj.
114 - Add interim accounting support from Vladislav Bjelic.
115 - Negotiate MRU, default 1458 to avoid fragmentation.
116 - Sanity check that cluster_send_session is not called from a child
117   process.
118 - Use bounds-checking lookup functions for string constants.
119 - Add enum for RADIUS codes.
120 - Make "call_" prefix implict in CSTAT() macro.
121 - Fix some format string problems.
122 - Remove "save_state" option.  Not maintained anymore; use clustering
123   to retain state across restarts.
124 - Simplify AVP unhiding code.
125 - Add optional "username" parameter to ungarden control, allowing the
126   username to be reset before going online.
127 - Add result/error codes and message to StopCCN when shutting down tunnels.
128 - Add result/error codes to CDN when shutting down sessions.  Sends 2/7
129   (general error, try another LNS) when out of IP addresses, and 3
130   (adminstrative) for everything else (suggestion from Chris Gates).
131 - Use cli_error() for error messages and help.
132 - Don't use LOG() macro in initdata() until the config struct has been
133   allocated (uses config->debug).
134 - Initialise log_stream to stderr to catch errors before the config file
135   is read.
136 - Make "show running-config" a privileged command (contains clear text
137   shared secrets).
138 - Add sessionctl plugin to provide drop/kill via nsctl.
139 - New config option: allow_duplicate_users which determines whether
140   or not to kill older sessions with the same username.
141 - Fix byte counters in accounting records.
142 - Add Acct-Output-Gigawords, Acct-Input-Gigawords attributes to RADIUS
143   accounting packets.
144 - Fix icmp host unreachable to use router address.
145 - Include endpoint address in accounting dump files.
146 - Convert mainloop to use epoll rather than select.
147 - Add note about fragmentation in Docs/manual.html, and a sample
148   iptables rule for MSS clamping.
149 - Merge 2.0.22:
150   + Show session open time in "show session"/"show user" detailed output.
151   + Have slaves with BGP configured drop BGP on receipt of a shutdown
152     signal, but hang about for an additional 5s to process any remaining
153     traffic.
154   + Run regular_cleanups after processing the results of the select,
155     looking at a sufficient slice of each table to ensure that all
156     entries are examined at least once per second.
157 - Merge 2.0.21:
158   + Cluster changes from Michael, intended to prevent a stray master
159     from trashing a cluster:
160     = Ignore heartbeats from peers claiming to be the master before the
161       timeout on the old master has expired.
162     = A master receiving a stray heartbeat sends a unicast HB back, which
163       should cause the rogue to die due to the tie-breaker code.
164     = Keep probing the master for late heartbeats.
165     = Drop BGP as soon as we become master with the minumum required peers.
166     = Any PING seen from a master forces an election (rather than just
167       where basetime is zero).
168     = A slave which receives a LASTSEEN message (presumably a restarted
169       master) sends back new message type, C_MASTER which indicates the
170       address of the current master.
171   + New config option: cluster_master_min_adv which determines the minimum
172     number of up to date slaves required before the master will drop
173     routes.
174 - Merge 2.0.20:
175   + Add handling of "throttle=N" RADIUS attributes.
176   + Fix RADIUS indexing (should have 16K entries with 64 sockets).
177 - Merge 2.0.19:
178   + Fix leak in session freelist when initial RADIUS session allocation
179     fails.
180 - Merge 2.0.18:
181   + Add a Cisco-Avpair with intercept details to RADIUS Start/Stop
182     records.
183 - Merge 2.0.17:
184   + Only send RADIUS stop record in sessionshutdown when there's an ip address.
185   + Reset .die on master takeover (so that dying sessions don't have to
186     hang around until the new master has the same uptime as the old one).
187   + Update .last_packet in cluster_handle_bytes only when there have
188     been bytes received from the modem (dead sessions were having the
189     idle timeout reset by stray packets).
190 - Merge 2.0.16:
191   + Ensure that sessionkill is not called on an unopened session (borks
192     the freelist).
193   + Bump MAXSESSION to 60K.
194   + Fix off-by-one errors in session/tunnel initialisation and
195     sessiont <-> sessionidt functions.
196   + Use session[s].opened consistently when checking for in-use sessions
197     (rather than session[s].tunnel).
198   + Use <= cluster_highest_sessionid rather than < MAXSESSION in a
199     couple of loops.
200   + Don't kill a whole tunnel if we're out of sessions.
201   + Change session[s].ip to 0 if set from RADIUS to 255.255.255.254;
202     avoids the possibility that it will be interpreted as a valid IP
203     address.
204   + Avoid a possible buffer overflow in processpap.
205   + Kill session if authentication was rejected.
206 - Merge 2.0.15:
207   + More DoS prevention:  add packet_limit option to apply a hard limit
208     to downstream packets per session.
209   + Fix "clear counters".
210   + Log "Accepted connection to CLI" at 4 when connection is from localhost
211     to reduce noise in logs.
212   + Show time since last counter reset in "show counters".
213 - Merge 2.0.14:
214   + Throttle outgoing LASTSEEN packets to at most one per second for a
215     given seq#.
216
217 * Fri Dec 17 2004 Brendan O'Dea <bod@optusnet.com.au> 2.0.13
218 - Better cluster master collision resolution: keep a counter of state
219   changes, propagated in the heartbeats; the master with the highest #
220   of changes (that has kept in contact with the LAC through the
221   outage) prevails.
222 - Skip newlines in ringbuffer messages to CLI.
223 - Drop "Session N is closing" message level to 4; don't process PPPIP
224   packets in this state.
225 - Use gzip --best for man pages, include pid_file in sample
226   startup-config (from Jonathan's Debian package patches).
227 - Read multiple packets off cluster_sockfd as well as udpfd, tunfd in an
228   attempt to avoid losing the cluster in high load (DoS) conditions.
229 - Add counters for select_called, multi_read_used and multi_read_exceeded.
230 - Compress logs.
231 - Retain counters of shutdown sessions to dump once per minute.
232 - Use standard uintN_t types for portability.
233
234 * Wed Dec 1 2004 Brendan O'Dea <bod@optusnet.com.au> 2.0.12
235 - The "This time, for sure!" release.
236 - Fix throttlectl plugin argument parsing.
237
238 * Wed Dec 1 2004 Brendan O'Dea <bod@optusnet.com.au> 2.0.11
239 - Don't send a RADIUS start record when ungardening on shutdown.
240
241 * Wed Dec 1 2004 Brendan O'Dea <bod@optusnet.com.au> 2.0.10
242 - Fix byte ordering of LCP header length (thanks Yuri).
243 - Increase ip_conntrack_max due to dropped packets.
244
245 * Tue Nov 30 2004 Brendan O'Dea <bod@optusnet.com.au> 2.0.9
246 - Revise CCP, send ConfigReq once only.
247 - Don't copy the old buffer into Config{Nak,Rej} LCP responses (oops);
248   add length checks when appending.
249 - Do copy the identifier from the request and update length.
250 - Have makeppp print a backtrace on overflow.
251 - Check control serial before clearing window, prevents looping tunnel
252   setup in some instances.
253 - Implement named access-lists which may be applied to a session
254   either via Filter-Id RADIUS responses, or using the CLI.
255 - Drop ip address from LOG.
256 - autothrottle: revise parsing; ignore lcp:interface-config avpairs
257   which don't start with serv[ice-policy].
258 - Add THANKS file.
259
260 * Sat Nov 20 2004 Brendan O'Dea <bod@optusnet.com.au> 2.0.8
261 - Ignore gateway address in Framed-Route (from Jonathan McDowell).
262 - Don't route Framed-IP-Address if contained in a Framed-Route.
263 - Call sessionshutdown() when a tunnel is dropped rather than
264   sessionkill() to ensure that RADIUS stop records are sent.
265 - Cleanup: make a bunch of global functions/variables static.
266 - Remove reference to old -a command line argument.
267 - Add l2tpns(8) and nsctl(8) manpages from Jonathan McDowell.
268 - Add startup-config(5) manpage.
269 - Revise nsctl to allow arbitrary strings/args to be passed to plugins.
270 - Add snoopctl, throttlectl plugins.
271 - Fix deletion from linked list.
272 - Allow LCP re-negotiation after connection completes (thanks Yuri).
273
274 * Mon Nov 15 2004 Brendan O'Dea <bod@optusnet.com.au> 2.0.7
275 - Fix socket creation in host_unreachable() (thanks to Bjørn Augestad)
276 - Don't assume BGP peer sends back negotiated hold time, pick smallest
277
278 * Thu Nov 11 2004 Brendan O'Dea <bod@optusnet.com.au> 2.0.6
279 - Make BGP keepalive/hold time configurable
280 - Revise BGP config to use "router bgp AS" syntax (requires libcli >= 1.8.2)
281
282 * Tue Nov 9 2004 Brendan O'Dea <bod@optusnet.com.au> 2.0.5
283 - Handle routing properly in lone-master case 
284 - Fix intercepts:  don't double-snoop throttled customers, ensure
285   byte/packet counts are only updated once
286 - Add a callback to allow plugins to fetch values from the running config
287
288 * Mon Nov 8 2004 Brendan O'Dea <bod@optusnet.com.au> 2.0.4
289 - Added setrxspeed plugin
290 - Added peer_address config option
291 - Rename wrapper macros to LOG()/LOG_HEX(), use p->log() in plugins
292 - Replace some PPP{PAP,CHAP} magic numebrs with constants
293 - Nak asyncmap (unless == 0)
294 - Bundle ConfigRej options
295 - Clean up initlcp handling
296
297 * Wed Nov 3 2004 Brendan O'Dea <bod@optusnet.com.au> 2.0.3
298 - Added support for hidden AVPs by Robert Clark
299 - l2tpns-chap-response.patch from Robert Clark
300 - Merge l2tpns-config-hostname.patch from Robert Clark
301 - l2tpns-dont-timeshift-unidirectional-traffic.patch from Robert Clark - Dump accounting data if cin OR cout is non-zero
302 - Don't write accounting files if no accounting dir is set - Yuri
303 - Fix checking for mmap success
304 - Renegotiate MRU - Yuri
305 - Take LCP ConfigReq length from the packet length field - Yuri
306 - Hostname set via command line not config
307 - Make number of throttle buckets configurable
308 - Shared_malloc returns NULL on failure
309 - Sync changes
310 - Unfsck 4->8 indenting change
311 - Use 2 seperate u16 values for throttle rate in/out
312 - Defer adding radius fds to the select loop until become_master
313
314 * Thu Sep 02 2004 David Parrish <david@dparrish.com> 2.0.2
315 - Combined LCP patches from Iain and Yuri. This should allow Windows 2k/XP
316   clients to connect, as well Linksys DSL modems.
317 - Apply patch to fix -v option from Juergen Kammer.
318 - Makefile fix from Juergen Kammer to not overwrite existing config files on
319   make install
320 - Configurable radius port patch from Juergen Kammer.
321 - Send my_address if no bind_address when doing IPCP
322 - Write pid file if filename is set
323 - Add startup script and monitor script from Yuri
324 - Some logging correctness fixes from Iain Wade
325 - Add support for LCP Ident and CallBack (rejection only) from Yuri
326 - Initiate LCP if not attempted by the client, or in renegotiation - Yuri
327 - Indentation and style cleanups
328 - Per-user upload and download throttle rates - Yuri
329 - Make autothrottle.so understand cisco lcp:interface-config - Yuri
330 - Show filter stats in show session - Yuri
331 - Cleanup from Michael to change sid to unique_id
332 - Add plugin to remove domain name from auth requests
333 - Add .spec file for RPM generation
334
335 * Tue Jul 13 2004 Brendan O'Dea <bod@optusnet.com.au> 2.0.1
336 - Update INSTALL, Docs/manual.html documentation.
337 - Add INTERNALS documentation.
338 - Add lock_pages option.
339 - TerminateAck fix from Yuri
340 - Adject cli_loop args for libcli 1.8.0
341 - Allow for backward compatabity in C_PING packets
342 - Don't send RADIUS stop messages from sessionshutdown when called from
343   sessionkill.
344 - s/tap/tun/ .
345 - Fix for LASTSEEN breakage:  don't do anything in the CLI other than
346   flag changes to be made by the parent.
347 - Split out master parts from cluster_check_master() into cluster_check_slaves().
348 - Set hostname in CLI prompt.
349 - Make cluster_hb_interval work; include interval/timeout in heartbeats
350   so that a change on the master is propagated immediately to the slaves.
351 - Use fast heartbeats when there are slaves not up to date.
352 - Ensure basetime of shut down master is set to zero (prevent delayed election).
353 - Fix radius session leak on IPCP timeout.
354 - Fix some off-by-one errors in tunnel/session loops.
355 - Add "limp along" fix for when a slave drops temporarily from the mcast group.
356 - Rename l2tpns.cfg as startup-config to match CONFIGFILE.
357 - Update cli callbacks to work with libcli 1.6.
358   This supports privileged and unprivileged commands, as well as a configuration
359   mode.
360 - Add help for all cli commands.
361 - Add "show version" command.
362 - Fix uptime counter display.
363 - Fix nasty bug where cluster basetime can be set to 0 when sending initial
364   heartbeat.
365 - Don't rmmod ip_conntrack, as this can take a lot of time.
366 - Re-order logging in routeset such that the action is given before any error.
367 - Use the correct gateway address when deleting routes.
368 - Remove any routes when address changes.
369 - Require authentication if telnet from remote ip.
370 - Require enable password always.
371 - Return error if show pool done on slave.
372 - We MUST immediately exit if we're the wrong master!
373
374 * Wed Jun 23 2004 David Parrish <david@dparrish.com> 2.0.0
375 - Major release
376 - Completely replace active/standby clustering with a new peer-to-peer
377   clustering method which allows much greater throughput and is a lot more fault
378   tolerant
379 - Add internal tbf implementation for throttling without relying on tc and
380   kernel HTB
381 - Add support for iBGP and eBGP to advertise routes
382 - Add cli commands "show cluster", "show bgp", "show ipcache", "show throttle",
383   "show tbf", "suspend bgp", "restart bgp", "show user"
384 - Interception destination must be set per-user
385 - If SMP machine, allow use of SCHED_FIFO, which should improve performance
386 - Added config option to send GARP at startup
387 - Added plugin_become_master and plugin_new_session_master plugin hooks
388 - Remove useless sessionsendarp(). This isn't needed now that we are using TUN
389   instead of TAP.
390 - ICMP rate limiting so not every unreachable packet is replied with an ICMP
391   unreachable message
392 - mangle table is not required on anything but the cluster master, so slaves
393   will drop the mangle table and attempt to unload the ip_conntrack module
394 - Statically assigned IP addresses (by Radius) work now
395 - Add -d command-line flag to detach and become a daemon
396 - Configuration file is now "/etc/l2tpns/startup-config"
397 - Reduced MIN_IP_SIZE to 0x19 to stop a pile of Short IP warnings
398 - Resend initial IPCP request until it's acknowleged by the client
399 - Better radius session cleanup logic
400 - Many miscellaenous bugfixes and performance enhancements
401 - Thanks to Michael O'Reilly and Brendan O'Dea for most of these new features
402
403 * Mon May 24 2004 David Parrish <david@dparrish.com> 1.2.0
404 - Fix SEGFAULT in garden module
405 - Use multiple radius sockets to allow more concurrent authentication requests
406 - Add username parameter to "show users" command
407 - Fix counting tunnel rx errors as tunnel tx errors
408 - Add "show throttle" command
409 - Add gcc __attribute__ to logging functions
410 - Fix warnings shown by __attribute__
411 - Make sure regular cleanup happens regularly under high load
412 - Add variable cleanup_interval for changing cleanup interval
413 - Add support for reading more than one packet per fd in each processing loop
414 - This is configurable with the multi_read_count variable
415 - Remove segv handler so core dumps can happen
416 - Use nonblocking sockets
417 - Increase tun queue length
418 - Fix minimum length of IP packets
419 - Remove per-packet plugin hooks (they are slow)
420 - Don't drop session if no free RADIUS
421 - Don't expire more than 1000 sessions per cleanup interval
422 - Remove -a and -c command-line options. They don't work anyway
423 - Don't require file: in log_filename
424 - Bump version to 1.2.0
425 - Check return code when throttling users
426
427 * Mon Apr 5 2004 David Parrish <david@dparrish.com> 1.1.1
428 - Don't mention configure anymore, it's not used
429 - Added the autosnoop and autothrottle modules
430 - Don't default to using a htb for the class root
431
432 * Fri Mar 5 2004 David Parrish <david@dparrish.com> 1.1.0
433 - Change all strcpy() calls to strncpy() to avoid buffer overflow potential
434 - Add ICMP host unreachable support
435 - Logging to syslog if log_file = "syslog:facility"
436 - Now requires libcli 1.5
437 - All configuration moves to a config structure
438 - Ability to modify and write config on the fly through command-line interface
439 - Config file support is removed, and now handled by the cli
440 - Show hostname in cli prompt
441 - Keep current state type for tunnels
442 - Add uptime command do CLI, which also shows real-time bandwidth utilisation
443 - Add goodbye command to cluster master, which forces droppping a slave
444 - Cache IP address allocation, so that reconnecting users get the same address
445 - Fix tunnel resend timeouts, so that dead tunnels will be cleaned up
446 - Allocate tunnels and radius without using a linked list which had issues
447 - Fix some off-by-one errors in tunnel and session and radius arrays
448 - Save and reload ip address pool when dieing
449 - Check version and size of reloaded data when restarting
450 - Remove plugin_config support
451 - Remove old support for TBF which didn't work anyway. HTB is required to do throttling now.
452 - Add COPYING and Changes files