0d0520b161
Release 1.7.0: (27th July 2005) - silently discard packets not for the call [Cameron/Jenkins] - adopt sigpipe for use with SIGALRM on control connection [Wolter/Cameron] - fixes known valgrind heap violations in 1.6.0 [Cameron/Thorne] - properly report control connection echo reply loss [Wolter] Release 1.6.0: (18th February 2005) - fix double-free on stop control connection reply [Kivity] - add --idle-wait option [Cameron] - fix segfault on fatal connection error [Kivity] - prevent a possible signal race [Kivity] - prevent kill of init [Shurdeek] - portability fix for non-Linux systems [Quinot] - rename package from pptp-linux to pptp [Cameron] Release 1.5.0: (22nd June 2004) - fix statistics when buffering disabled [Wilson] - do not inherit the GRE socket [Cameron] - fix a case of non-shutdown of call manager [Klazes] - add --nobuffer option to eliminate all buffering of packets [Wilson] - fix corruption of command line as shown by ps [Howarth] - fix CPU loop after pppd killed [Cameron] - fix compile for ARM architecture [Hopf] - add documentation for command-line options [Wilson] - do not hang when a connection is refused [McCurdy] - better describe a cause of EMSGSIZE [Cameron] Release 1.4.0: (2nd January 2004) - support options before hostname [Wilson] - defer OCRQ until after SCCRP [Cameron] - include uninstall target [Pieter] - only issue a warning if sync mode is different to pppd [Klazes] - reformat and tidy code [Klazes] - reduce transmitted ack-only packets from 40% to 0.8% [Klazes] Release 1.3.1: (11th June 2003) - fixed bug introduced since 1.2.0 that prevented simultaneous tunnels. Release 1.3.0: (10th June 2003) - rewrite command usage text. - increase call disconnect notification log message verbosity. - inherit more make command line options. - remove execute permissions on man page. - fixed inefficient acknowledgement immediately followed by data packet. - added statistics for link quality monitoring. - remove include of callmgr, do separate compile. - remove duplicate messages caused by code in header file. - compilation fixes for Apple MacOS X. - support multiple clients on alias IP addresses. Release 1.2.0: (14th February 2003) - subsecond packet timeout to improve performance on fast links. - rewrite INSTALL. - add man page to install target. - fix response to dropped packets. - fix man page, address must be before options. - adopt man page contributed by Thomas Quinot. - close stderr to prevent holding open ssh sessions. - minor hint added in case of EIO on read() of pty. - support synchronous HDLC ppp encoding. Synchronous mode results in an important improvement of the CPU efficiency. - handle out-of-order packets arriving on the GRE socket by buffering. - bind GRE socket early to prevent ICMP Unreachable response by client. Release 1.1.0: (20th March 2002) - New release engineer. - allow activation as a psuedo-tty child process from pppd. This allows on demand pptp links or automatically reconnect. - ADSL modem quirks handler by mulix@actcom.co.il. Workarounds for Orckit ADSL modem. - workaround for Cisco PIX connection drop after 60 seconds. - enhance bad FCS error message. - ported to FreeBSD and NetBSD. - integrated call manager into pptp binary. - many bugfixes improving stability. Release 1.0.3: (7th May 2001) - New maintaining team. - Various bug fixes from the Debian package and FreeBSD port. - Incorporate patch to support erroneous return code with Alcatel ADSL 1000 modems. - Fix incorrect call id error. - New command line option: --phone (specify phone number). (Needed by the Dutch Mxstream ADSL service.) Contributed by Rein Klazes <rklazes@xs4all.nl>
47 lines
1.8 KiB
Text
47 lines
1.8 KiB
Text
$NetBSD: patch-ad,v 1.3 2006/03/14 13:53:57 rillig Exp $
|
|
|
|
Added more logging.
|
|
|
|
--- pptp_gre.c.orig 2005-07-28 03:15:11.000000000 +0200
|
|
+++ pptp_gre.c 2006-03-14 14:15:51.000000000 +0100
|
|
@@ -44,12 +44,12 @@ int dequeue_gre(callback_t callback, int
|
|
|
|
#if 1
|
|
#include <stdio.h>
|
|
-void print_packet(int fd, void *pack, unsigned int len)
|
|
+void print_packet(int fd, void *pack, unsigned int len, const char *msg)
|
|
{
|
|
unsigned char *b = (unsigned char *)pack;
|
|
unsigned int i,j;
|
|
FILE *out = fdopen(fd, "w");
|
|
- fprintf(out,"-- begin packet (%u) --\n", len);
|
|
+ fprintf(out,"-- begin %s packet (%u) --\n", msg, len);
|
|
for (i = 0; i < len; i += 16) {
|
|
for (j = 0; j < 8; j++)
|
|
if (i + 2 * j + 1 < len)
|
|
@@ -234,6 +234,8 @@ int decaps_hdlc(int fd, int (*cb)(int cl
|
|
if ( start + len <= end)
|
|
if ((status = cb (cl, buffer + start, len)) < 0)
|
|
return status; /* error-check */
|
|
+ if (status == 0)
|
|
+ return -1; /* avoid an endless loop */
|
|
start += len;
|
|
}
|
|
return 0;
|
|
@@ -329,6 +331,7 @@ int decaps_gre (int fd, callback_t callb
|
|
if ((buffer[0] & 0xF0) == 0x40)
|
|
ip_len = (buffer[0] & 0xF) * 4;
|
|
header = (struct pptp_gre_header *)(buffer + ip_len);
|
|
+ /* print_packet(2, buffer, status, "in"); */
|
|
/* verify packet (else discard) */
|
|
if ( /* version should be 1 */
|
|
((ntoh8(header->ver) & 0x7F) != PPTP_GRE_VER) ||
|
|
@@ -508,7 +511,7 @@ int encaps_gre (int fd, void *pack, unsi
|
|
/* record and increment sequence numbers */
|
|
seq_sent = seq; seq++;
|
|
/* write this baby out to the net */
|
|
- /* print_packet(2, u.buffer, header_len + len); */
|
|
+ /* print_packet(2, u.buffer, header_len + len, "out"); */
|
|
rc = write(fd, u.buffer, header_len + len);
|
|
if (rc < 0) {
|
|
stats.tx_failed++;
|