1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-12 00:03:44 +02:00

[ppp] refresh patches

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15958 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
hauke 2009-05-21 10:49:21 +00:00
parent 5ef9698654
commit 641c4de73d
22 changed files with 277 additions and 332 deletions

View File

@ -2,11 +2,9 @@
Use values exported from $(TOPDIR)/rules.mk for determining Use values exported from $(TOPDIR)/rules.mk for determining
the target system instead of the host configuration the target system instead of the host configuration
Index: ppp-2.4.3/configure --- a/configure
=================================================================== +++ b/configure
--- ppp-2.4.3.orig/configure 2007-06-04 13:22:08.549555552 +0200 @@ -8,9 +8,9 @@ SYSCONF=/etc
+++ ppp-2.4.3/configure 2007-06-04 13:22:08.618545064 +0200
@@ -8,9 +8,9 @@
# if [ -d /NextApps ]; then # if [ -d /NextApps ]; then
# system="NeXTStep" # system="NeXTStep"
# else # else

View File

@ -1,7 +1,6 @@
diff -Naur ppp-2.4.4.orig/pppd/ipcp.c ppp-2.4.4/pppd/ipcp.c --- a/pppd/ipcp.c
--- ppp-2.4.4.orig/pppd/ipcp.c 2005-08-25 19:59:34.000000000 -0400 +++ b/pppd/ipcp.c
+++ ppp-2.4.4/pppd/ipcp.c 2009-05-07 15:47:29.000000000 -0400 @@ -1850,7 +1850,7 @@ ipcp_up(f)
@@ -1850,7 +1850,7 @@
*/ */
if (ipcp_script_state == s_down && ipcp_script_pid == 0) { if (ipcp_script_state == s_down && ipcp_script_pid == 0) {
ipcp_script_state = s_up; ipcp_script_state = s_up;
@ -10,7 +9,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ipcp.c ppp-2.4.4/pppd/ipcp.c
} }
} }
@@ -1900,7 +1900,7 @@ @@ -1900,7 +1900,7 @@ ipcp_down(f)
/* Execute the ip-down script */ /* Execute the ip-down script */
if (ipcp_script_state == s_up && ipcp_script_pid == 0) { if (ipcp_script_state == s_up && ipcp_script_pid == 0) {
ipcp_script_state = s_down; ipcp_script_state = s_down;
@ -19,7 +18,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ipcp.c ppp-2.4.4/pppd/ipcp.c
} }
} }
@@ -1954,13 +1954,13 @@ @@ -1954,13 +1954,13 @@ ipcp_script_done(arg)
case s_up: case s_up:
if (ipcp_fsm[0].state != OPENED) { if (ipcp_fsm[0].state != OPENED) {
ipcp_script_state = s_down; ipcp_script_state = s_down;
@ -35,10 +34,9 @@ diff -Naur ppp-2.4.4.orig/pppd/ipcp.c ppp-2.4.4/pppd/ipcp.c
} }
break; break;
} }
diff -Naur ppp-2.4.4.orig/pppd/main.c ppp-2.4.4/pppd/main.c --- a/pppd/main.c
--- ppp-2.4.4.orig/pppd/main.c 2006-06-03 23:52:50.000000000 -0400 +++ b/pppd/main.c
+++ ppp-2.4.4/pppd/main.c 2009-05-07 15:47:29.000000000 -0400 @@ -315,6 +315,9 @@ main(argc, argv)
@@ -315,6 +315,9 @@
struct protent *protp; struct protent *protp;
char numbuf[16]; char numbuf[16];
@ -48,10 +46,9 @@ diff -Naur ppp-2.4.4.orig/pppd/main.c ppp-2.4.4/pppd/main.c
link_stats_valid = 0; link_stats_valid = 0;
new_phase(PHASE_INITIALIZE); new_phase(PHASE_INITIALIZE);
diff -Naur ppp-2.4.4.orig/pppd/options.c ppp-2.4.4/pppd/options.c --- a/pppd/options.c
--- ppp-2.4.4.orig/pppd/options.c 2006-06-18 07:26:00.000000000 -0400 +++ b/pppd/options.c
+++ ppp-2.4.4/pppd/options.c 2009-05-07 15:47:29.000000000 -0400 @@ -113,6 +113,8 @@ char linkname[MAXPATHLEN]; /* logical na
@@ -113,6 +113,8 @@
bool tune_kernel; /* may alter kernel settings */ bool tune_kernel; /* may alter kernel settings */
int connect_delay = 1000; /* wait this many ms after connect script */ int connect_delay = 1000; /* wait this many ms after connect script */
int req_unit = -1; /* requested interface unit */ int req_unit = -1; /* requested interface unit */
@ -60,7 +57,7 @@ diff -Naur ppp-2.4.4.orig/pppd/options.c ppp-2.4.4/pppd/options.c
bool multilink = 0; /* Enable multilink operation */ bool multilink = 0; /* Enable multilink operation */
char *bundle_name = NULL; /* bundle name for multilink */ char *bundle_name = NULL; /* bundle name for multilink */
bool dump_options; /* print out option values */ bool dump_options; /* print out option values */
@@ -281,6 +283,13 @@ @@ -281,6 +283,13 @@ option_t general_options[] = {
"Number of seconds to wait for child processes at exit", "Number of seconds to wait for child processes at exit",
OPT_PRIO }, OPT_PRIO },
@ -74,10 +71,9 @@ diff -Naur ppp-2.4.4.orig/pppd/options.c ppp-2.4.4/pppd/options.c
#ifdef HAVE_MULTILINK #ifdef HAVE_MULTILINK
{ "multilink", o_bool, &multilink, { "multilink", o_bool, &multilink,
"Enable multilink operation", OPT_PRIO | 1 }, "Enable multilink operation", OPT_PRIO | 1 },
diff -Naur ppp-2.4.4.orig/pppd/pppd.h ppp-2.4.4/pppd/pppd.h --- a/pppd/pppd.h
--- ppp-2.4.4.orig/pppd/pppd.h 2005-08-25 19:59:34.000000000 -0400 +++ b/pppd/pppd.h
+++ ppp-2.4.4/pppd/pppd.h 2009-05-07 15:47:29.000000000 -0400 @@ -312,6 +312,8 @@ extern bool tune_kernel; /* May alter ke
@@ -312,6 +312,8 @@
extern int connect_delay; /* Time to delay after connect script */ extern int connect_delay; /* Time to delay after connect script */
extern int max_data_rate; /* max bytes/sec through charshunt */ extern int max_data_rate; /* max bytes/sec through charshunt */
extern int req_unit; /* interface unit number to use */ extern int req_unit; /* interface unit number to use */

View File

@ -1,7 +1,6 @@
diff -Naur ppp-2.4.4.orig/pppd/sys-linux.c ppp-2.4.4/pppd/sys-linux.c --- a/pppd/sys-linux.c
--- ppp-2.4.4.orig/pppd/sys-linux.c 2005-08-26 18:44:35.000000000 -0400 +++ b/pppd/sys-linux.c
+++ ppp-2.4.4/pppd/sys-linux.c 2009-05-07 15:50:00.000000000 -0400 @@ -453,6 +453,13 @@ int generic_establish_ppp (int fd)
@@ -453,6 +453,13 @@
if (new_style_driver) { if (new_style_driver) {
int flags; int flags;

View File

@ -1,7 +1,6 @@
diff -Naur ppp-2.4.4.orig/pppd/main.c ppp-2.4.4/pppd/main.c --- a/pppd/main.c
--- ppp-2.4.4.orig/pppd/main.c 2009-05-07 15:49:34.000000000 -0400 +++ b/pppd/main.c
+++ ppp-2.4.4/pppd/main.c 2009-05-07 15:53:42.000000000 -0400 @@ -1570,6 +1570,8 @@ safe_fork(int infd, int outfd, int errfd
@@ -1570,6 +1570,8 @@
if (errfd == 0 || errfd == 1) if (errfd == 0 || errfd == 1)
errfd = dup(errfd); errfd = dup(errfd);
@ -10,7 +9,7 @@ diff -Naur ppp-2.4.4.orig/pppd/main.c ppp-2.4.4/pppd/main.c
/* dup the in, out, err fds to 0, 1, 2 */ /* dup the in, out, err fds to 0, 1, 2 */
if (infd != 0) if (infd != 0)
dup2(infd, 0); dup2(infd, 0);
@@ -1578,7 +1580,6 @@ @@ -1578,7 +1580,6 @@ safe_fork(int infd, int outfd, int errfd
if (errfd != 2) if (errfd != 2)
dup2(errfd, 2); dup2(errfd, 2);

View File

@ -1,7 +1,6 @@
diff -Naur ppp-2.4.4.orig/pppd/main.c ppp-2.4.4/pppd/main.c --- a/pppd/main.c
--- ppp-2.4.4.orig/pppd/main.c 2009-05-07 15:58:00.000000000 -0400 +++ b/pppd/main.c
+++ ppp-2.4.4/pppd/main.c 2009-05-07 15:58:19.000000000 -0400 @@ -772,8 +772,7 @@ detach()
@@ -772,8 +772,7 @@
/* update pid files if they have been written already */ /* update pid files if they have been written already */
if (pidfilename[0]) if (pidfilename[0])
create_pidfile(pid); create_pidfile(pid);

View File

@ -1,7 +1,6 @@
diff -Naur ppp-2.4.4.orig/pppd/chap_ms.c ppp-2.4.4/pppd/chap_ms.c --- a/pppd/chap_ms.c
--- ppp-2.4.4.orig/pppd/chap_ms.c 2006-05-21 07:56:40.000000000 -0400 +++ b/pppd/chap_ms.c
+++ ppp-2.4.4/pppd/chap_ms.c 2009-05-07 16:13:09.000000000 -0400 @@ -852,7 +852,7 @@ ChapMS2(u_char *rchallenge, u_char *Peer
@@ -852,7 +852,7 @@
u_char *p = &response[MS_CHAP2_PEER_CHALLENGE]; u_char *p = &response[MS_CHAP2_PEER_CHALLENGE];
int i; int i;

View File

@ -1,6 +1,5 @@
diff -Naur ppp-2.4.4.orig/pppd/demand.c ppp-2.4.4/pppd/demand.c --- a/pppd/demand.c
--- ppp-2.4.4.orig/pppd/demand.c 2005-08-25 08:14:18.000000000 -0400 +++ b/pppd/demand.c
+++ ppp-2.4.4/pppd/demand.c 2009-05-07 16:16:20.000000000 -0400
@@ -36,6 +36,8 @@ @@ -36,6 +36,8 @@
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
@ -19,7 +18,7 @@ diff -Naur ppp-2.4.4.orig/pppd/demand.c ppp-2.4.4/pppd/demand.c
#ifdef PPP_FILTER #ifdef PPP_FILTER
#include <pcap-bpf.h> #include <pcap-bpf.h>
#endif #endif
@@ -221,6 +225,14 @@ @@ -221,6 +225,14 @@ loop_chars(p, n)
int c, rv; int c, rv;
rv = 0; rv = 0;
@ -34,7 +33,7 @@ diff -Naur ppp-2.4.4.orig/pppd/demand.c ppp-2.4.4/pppd/demand.c
for (; n > 0; --n) { for (; n > 0; --n) {
c = *p++; c = *p++;
if (c == PPP_FLAG) { if (c == PPP_FLAG) {
@@ -299,17 +311,102 @@ @@ -299,17 +311,102 @@ loop_frame(frame, len)
* loopback, now that the real serial link is up. * loopback, now that the real serial link is up.
*/ */
void void
@ -138,10 +137,9 @@ diff -Naur ppp-2.4.4.orig/pppd/demand.c ppp-2.4.4/pppd/demand.c
output(0, pkt->data, pkt->length); output(0, pkt->data, pkt->length);
free(pkt); free(pkt);
} else { } else {
diff -Naur ppp-2.4.4.orig/pppd/ipcp.c ppp-2.4.4/pppd/ipcp.c --- a/pppd/ipcp.c
--- ppp-2.4.4.orig/pppd/ipcp.c 2009-05-07 15:49:34.000000000 -0400 +++ b/pppd/ipcp.c
+++ ppp-2.4.4/pppd/ipcp.c 2009-05-07 16:16:20.000000000 -0400 @@ -1776,7 +1776,7 @@ ipcp_up(f)
@@ -1776,7 +1776,7 @@
proxy_arp_set[f->unit] = 1; proxy_arp_set[f->unit] = 1;
} }
@ -150,10 +148,9 @@ diff -Naur ppp-2.4.4.orig/pppd/ipcp.c ppp-2.4.4/pppd/ipcp.c
sifnpmode(f->unit, PPP_IP, NPMODE_PASS); sifnpmode(f->unit, PPP_IP, NPMODE_PASS);
} else { } else {
diff -Naur ppp-2.4.4.orig/pppd/ipv6cp.c ppp-2.4.4/pppd/ipv6cp.c --- a/pppd/ipv6cp.c
--- ppp-2.4.4.orig/pppd/ipv6cp.c 2005-08-25 19:59:34.000000000 -0400 +++ b/pppd/ipv6cp.c
+++ ppp-2.4.4/pppd/ipv6cp.c 2009-05-07 16:16:20.000000000 -0400 @@ -1232,7 +1232,7 @@ ipv6cp_up(f)
@@ -1232,7 +1232,7 @@
} }
} }
@ -162,10 +159,9 @@ diff -Naur ppp-2.4.4.orig/pppd/ipv6cp.c ppp-2.4.4/pppd/ipv6cp.c
sifnpmode(f->unit, PPP_IPV6, NPMODE_PASS); sifnpmode(f->unit, PPP_IPV6, NPMODE_PASS);
} else { } else {
diff -Naur ppp-2.4.4.orig/pppd/pppd.h ppp-2.4.4/pppd/pppd.h --- a/pppd/pppd.h
--- ppp-2.4.4.orig/pppd/pppd.h 2009-05-07 15:49:34.000000000 -0400 +++ b/pppd/pppd.h
+++ ppp-2.4.4/pppd/pppd.h 2009-05-07 16:16:20.000000000 -0400 @@ -565,7 +565,7 @@ void demand_conf __P((void)); /* config
@@ -565,7 +565,7 @@
void demand_block __P((void)); /* set all NPs to queue up packets */ void demand_block __P((void)); /* set all NPs to queue up packets */
void demand_unblock __P((void)); /* set all NPs to pass packets */ void demand_unblock __P((void)); /* set all NPs to pass packets */
void demand_discard __P((void)); /* set all NPs to discard packets */ void demand_discard __P((void)); /* set all NPs to discard packets */

View File

@ -1,7 +1,6 @@
diff -Naur ppp-2.4.4.orig/pppd/chap-new.c ppp-2.4.4/pppd/chap-new.c --- a/pppd/chap-new.c
--- ppp-2.4.4.orig/pppd/chap-new.c 2005-07-13 06:41:58.000000000 -0400 +++ b/pppd/chap-new.c
+++ ppp-2.4.4/pppd/chap-new.c 2009-05-07 16:18:37.000000000 -0400 @@ -57,6 +57,7 @@ int (*chap_verify_hook)(char *name, char
@@ -57,6 +57,7 @@
int chap_timeout_time = 3; int chap_timeout_time = 3;
int chap_max_transmits = 10; int chap_max_transmits = 10;
int chap_rechallenge_time = 0; int chap_rechallenge_time = 0;
@ -9,7 +8,7 @@ diff -Naur ppp-2.4.4.orig/pppd/chap-new.c ppp-2.4.4/pppd/chap-new.c
/* /*
* Command-line options. * Command-line options.
@@ -68,6 +69,8 @@ @@ -68,6 +69,8 @@ static option_t chap_option_list[] = {
"Set max #xmits for challenge", OPT_PRIO }, "Set max #xmits for challenge", OPT_PRIO },
{ "chap-interval", o_int, &chap_rechallenge_time, { "chap-interval", o_int, &chap_rechallenge_time,
"Set interval for rechallenge", OPT_PRIO }, "Set interval for rechallenge", OPT_PRIO },
@ -18,7 +17,7 @@ diff -Naur ppp-2.4.4.orig/pppd/chap-new.c ppp-2.4.4/pppd/chap-new.c
{ NULL } { NULL }
}; };
@@ -335,6 +338,14 @@ @@ -335,6 +338,14 @@ chap_handle_response(struct chap_server_
/* Null terminate and clean remote name. */ /* Null terminate and clean remote name. */
slprintf(rname, sizeof(rname), "%.*v", len, name); slprintf(rname, sizeof(rname), "%.*v", len, name);
name = rname; name = rname;

View File

@ -1,7 +1,6 @@
diff -Naur ppp-2.4.4.orig/pppd/plugins/pppoatm/pppoatm.c ppp-2.4.4/pppd/plugins/pppoatm/pppoatm.c --- a/pppd/plugins/pppoatm/pppoatm.c
--- ppp-2.4.4.orig/pppd/plugins/pppoatm/pppoatm.c 2006-05-21 08:44:41.000000000 -0400 +++ b/pppd/plugins/pppoatm/pppoatm.c
+++ ppp-2.4.4/pppd/plugins/pppoatm/pppoatm.c 2009-05-07 16:22:22.000000000 -0400 @@ -70,18 +70,20 @@ static int setdevname_pppoatm(const char
@@ -70,18 +70,20 @@
{ {
struct sockaddr_atmpvc addr; struct sockaddr_atmpvc addr;
extern struct stat devstat; extern struct stat devstat;
@ -29,7 +28,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/pppoatm/pppoatm.c ppp-2.4.4/pppd/plugins/
memcpy(&pvcaddr, &addr, sizeof pvcaddr); memcpy(&pvcaddr, &addr, sizeof pvcaddr);
strlcpy(devnam, cp, sizeof devnam); strlcpy(devnam, cp, sizeof devnam);
devstat.st_mode = S_IFSOCK; devstat.st_mode = S_IFSOCK;
@@ -93,7 +95,6 @@ @@ -93,7 +95,6 @@ static int setdevname_pppoatm(const char
lcp_allowoptions[0].neg_asyncmap = 0; lcp_allowoptions[0].neg_asyncmap = 0;
lcp_wantoptions[0].neg_pcompression = 0; lcp_wantoptions[0].neg_pcompression = 0;
} }
@ -37,7 +36,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/pppoatm/pppoatm.c ppp-2.4.4/pppd/plugins/
device_got_set = 1; device_got_set = 1;
return 1; return 1;
} }
@@ -108,6 +109,7 @@ @@ -108,6 +109,7 @@ static void no_device_given_pppoatm(void
static void set_line_discipline_pppoatm(int fd) static void set_line_discipline_pppoatm(int fd)
{ {
struct atm_backend_ppp be; struct atm_backend_ppp be;
@ -45,7 +44,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/pppoatm/pppoatm.c ppp-2.4.4/pppd/plugins/
be.backend_num = ATM_BACKEND_PPP; be.backend_num = ATM_BACKEND_PPP;
if (!llc_encaps) if (!llc_encaps)
be.encaps = PPPOATM_ENCAPS_VC; be.encaps = PPPOATM_ENCAPS_VC;
@@ -115,6 +117,7 @@ @@ -115,6 +117,7 @@ static void set_line_discipline_pppoatm(
be.encaps = PPPOATM_ENCAPS_LLC; be.encaps = PPPOATM_ENCAPS_LLC;
else else
be.encaps = PPPOATM_ENCAPS_AUTODETECT; be.encaps = PPPOATM_ENCAPS_AUTODETECT;
@ -53,7 +52,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/pppoatm/pppoatm.c ppp-2.4.4/pppd/plugins/
if (ioctl(fd, ATM_SETBACKEND, &be) < 0) if (ioctl(fd, ATM_SETBACKEND, &be) < 0)
fatal("ioctl(ATM_SETBACKEND): %m"); fatal("ioctl(ATM_SETBACKEND): %m");
} }
@@ -175,16 +178,19 @@ @@ -175,16 +178,19 @@ static void send_config_pppoa(int mtu,
{ {
int sock; int sock;
struct ifreq ifr; struct ifreq ifr;
@ -74,7 +73,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/pppoatm/pppoatm.c ppp-2.4.4/pppd/plugins/
} }
static void recv_config_pppoa(int mru, static void recv_config_pppoa(int mru,
@@ -198,7 +204,7 @@ @@ -198,7 +204,7 @@ static void recv_config_pppoa(int mru,
void plugin_init(void) void plugin_init(void)
{ {
@ -83,7 +82,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/pppoatm/pppoatm.c ppp-2.4.4/pppd/plugins/
extern int new_style_driver; /* From sys-linux.c */ extern int new_style_driver; /* From sys-linux.c */
if (!ppp_available() && !new_style_driver) if (!ppp_available() && !new_style_driver)
fatal("Kernel doesn't support ppp_generic - " fatal("Kernel doesn't support ppp_generic - "
@@ -206,9 +212,9 @@ @@ -206,9 +212,9 @@ void plugin_init(void)
#else #else
fatal("No PPPoATM support on this OS"); fatal("No PPPoATM support on this OS");
#endif #endif

View File

@ -1,7 +1,6 @@
diff -Naur ppp-2.4.4.orig/pppd/plugins/pppoatm/pppoatm.c ppp-2.4.4/pppd/plugins/pppoatm/pppoatm.c --- a/pppd/plugins/pppoatm/pppoatm.c
--- ppp-2.4.4.orig/pppd/plugins/pppoatm/pppoatm.c 2009-05-07 16:23:41.000000000 -0400 +++ b/pppd/plugins/pppoatm/pppoatm.c
+++ ppp-2.4.4/pppd/plugins/pppoatm/pppoatm.c 2009-05-07 16:23:57.000000000 -0400 @@ -179,8 +179,11 @@ static void send_config_pppoa(int mtu,
@@ -179,8 +179,11 @@
int sock; int sock;
struct ifreq ifr; struct ifreq ifr;
@ -15,7 +14,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/pppoatm/pppoatm.c ppp-2.4.4/pppd/plugins/
sock = socket(AF_INET, SOCK_DGRAM, 0); sock = socket(AF_INET, SOCK_DGRAM, 0);
if (sock < 0) if (sock < 0)
@@ -198,8 +201,11 @@ @@ -198,8 +201,11 @@ static void recv_config_pppoa(int mru,
int pcomp, int pcomp,
int accomp) int accomp)
{ {

View File

@ -1,7 +1,6 @@
diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/common.c ppp-2.4.4/pppd/plugins/rp-pppoe/common.c --- a/pppd/plugins/rp-pppoe/common.c
--- ppp-2.4.4.orig/pppd/plugins/rp-pppoe/common.c 2004-02-01 22:36:46.000000000 -0500 +++ b/pppd/plugins/rp-pppoe/common.c
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/common.c 2009-05-07 17:01:46.000000000 -0400 @@ -18,10 +18,6 @@ static char const RCSID[] =
@@ -18,10 +18,6 @@
#include "pppoe.h" #include "pppoe.h"
@ -12,7 +11,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/common.c ppp-2.4.4/pppd/plugins/
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <stdlib.h> #include <stdlib.h>
@@ -50,17 +46,17 @@ @@ -50,17 +46,17 @@ parsePacket(PPPoEPacket *packet, ParseFu
UINT16_t tagType, tagLen; UINT16_t tagType, tagLen;
if (packet->ver != 1) { if (packet->ver != 1) {
@ -33,7 +32,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/common.c ppp-2.4.4/pppd/plugins/
return -1; return -1;
} }
@@ -76,7 +72,7 @@ @@ -76,7 +72,7 @@ parsePacket(PPPoEPacket *packet, ParseFu
return 0; return 0;
} }
if ((curTag - packet->payload) + tagLen + TAG_HDR_SIZE > len) { if ((curTag - packet->payload) + tagLen + TAG_HDR_SIZE > len) {
@ -42,7 +41,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/common.c ppp-2.4.4/pppd/plugins/
return -1; return -1;
} }
func(tagType, tagLen, curTag+TAG_HDR_SIZE, extra); func(tagType, tagLen, curTag+TAG_HDR_SIZE, extra);
@@ -105,17 +101,17 @@ @@ -105,17 +101,17 @@ findTag(PPPoEPacket *packet, UINT16_t ty
UINT16_t tagType, tagLen; UINT16_t tagType, tagLen;
if (packet->ver != 1) { if (packet->ver != 1) {
@ -63,7 +62,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/common.c ppp-2.4.4/pppd/plugins/
return NULL; return NULL;
} }
@@ -131,7 +127,7 @@ @@ -131,7 +127,7 @@ findTag(PPPoEPacket *packet, UINT16_t ty
return NULL; return NULL;
} }
if ((curTag - packet->payload) + tagLen + TAG_HDR_SIZE > len) { if ((curTag - packet->payload) + tagLen + TAG_HDR_SIZE > len) {
@ -72,7 +71,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/common.c ppp-2.4.4/pppd/plugins/
return NULL; return NULL;
} }
if (tagType == type) { if (tagType == type) {
@@ -143,6 +139,7 @@ @@ -143,6 +139,7 @@ findTag(PPPoEPacket *packet, UINT16_t ty
return NULL; return NULL;
} }
@ -80,7 +79,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/common.c ppp-2.4.4/pppd/plugins/
/********************************************************************** /**********************************************************************
*%FUNCTION: printErr *%FUNCTION: printErr
*%ARGUMENTS: *%ARGUMENTS:
@@ -158,6 +155,7 @@ @@ -158,6 +155,7 @@ printErr(char const *str)
fprintf(stderr, "pppoe: %s\n", str); fprintf(stderr, "pppoe: %s\n", str);
syslog(LOG_ERR, "%s", str); syslog(LOG_ERR, "%s", str);
} }
@ -88,7 +87,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/common.c ppp-2.4.4/pppd/plugins/
/********************************************************************** /**********************************************************************
@@ -172,7 +170,7 @@ @@ -172,7 +170,7 @@ strDup(char const *str)
{ {
char *copy = malloc(strlen(str)+1); char *copy = malloc(strlen(str)+1);
if (!copy) { if (!copy) {
@ -97,7 +96,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/common.c ppp-2.4.4/pppd/plugins/
} }
strcpy(copy, str); strcpy(copy, str);
return copy; return copy;
@@ -467,9 +465,10 @@ @@ -467,9 +465,10 @@ sendPADT(PPPoEConnection *conn, char con
fprintf(conn->debugFile, "\n"); fprintf(conn->debugFile, "\n");
fflush(conn->debugFile); fflush(conn->debugFile);
} }
@ -109,16 +108,15 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/common.c ppp-2.4.4/pppd/plugins/
/********************************************************************** /**********************************************************************
*%FUNCTION: parseLogErrs *%FUNCTION: parseLogErrs
*%ARGUMENTS: *%ARGUMENTS:
@@ -501,4 +500,5 @@ @@ -501,4 +500,5 @@ parseLogErrs(UINT16_t type, UINT16_t len
break; break;
} }
} }
+#endif +#endif
diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/discovery.c ppp-2.4.4/pppd/plugins/rp-pppoe/discovery.c --- a/pppd/plugins/rp-pppoe/discovery.c
--- ppp-2.4.4.orig/pppd/plugins/rp-pppoe/discovery.c 2005-03-22 05:22:32.000000000 -0500 +++ b/pppd/plugins/rp-pppoe/discovery.c
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/discovery.c 2009-05-07 17:01:46.000000000 -0400 @@ -13,10 +13,6 @@ static char const RCSID[] =
@@ -13,10 +13,6 @@
#include "pppoe.h" #include "pppoe.h"
@ -129,7 +127,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/discovery.c ppp-2.4.4/pppd/plugi
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <errno.h> #include <errno.h>
@@ -167,24 +163,21 @@ @@ -167,24 +163,21 @@ parsePADOTags(UINT16_t type, UINT16_t le
if (conn->printACNames) { if (conn->printACNames) {
printf("Got a Service-Name-Error tag: %.*s\n", (int) len, data); printf("Got a Service-Name-Error tag: %.*s\n", (int) len, data);
} else { } else {
@ -157,7 +155,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/discovery.c ppp-2.4.4/pppd/plugi
} }
break; break;
} }
@@ -209,20 +202,14 @@ @@ -209,20 +202,14 @@ parsePADSTags(UINT16_t type, UINT16_t le
PPPoEConnection *conn = (PPPoEConnection *) extra; PPPoEConnection *conn = (PPPoEConnection *) extra;
switch(type) { switch(type) {
case TAG_SERVICE_NAME: case TAG_SERVICE_NAME:
@ -182,7 +180,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/discovery.c ppp-2.4.4/pppd/plugi
case TAG_RELAY_SESSION_ID: case TAG_RELAY_SESSION_ID:
conn->relayId.type = htons(type); conn->relayId.type = htons(type);
conn->relayId.length = htons(len); conn->relayId.length = htons(len);
@@ -336,7 +323,7 @@ @@ -336,7 +323,7 @@ waitForPADO(PPPoEConnection *conn, int t
if (r >= 0 || errno != EINTR) break; if (r >= 0 || errno != EINTR) break;
} }
if (r < 0) { if (r < 0) {
@ -191,7 +189,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/discovery.c ppp-2.4.4/pppd/plugi
} }
if (r == 0) return; /* Timed out */ if (r == 0) return; /* Timed out */
} }
@@ -346,8 +333,7 @@ @@ -346,8 +333,7 @@ waitForPADO(PPPoEConnection *conn, int t
/* Check length */ /* Check length */
if (ntohs(packet.length) + HDR_SIZE > len) { if (ntohs(packet.length) + HDR_SIZE > len) {
@ -201,7 +199,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/discovery.c ppp-2.4.4/pppd/plugi
continue; continue;
} }
@@ -366,16 +352,16 @@ @@ -366,16 +352,16 @@ waitForPADO(PPPoEConnection *conn, int t
if (packet.code == CODE_PADO) { if (packet.code == CODE_PADO) {
if (BROADCAST(packet.ethHdr.h_source)) { if (BROADCAST(packet.ethHdr.h_source)) {
@ -221,7 +219,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/discovery.c ppp-2.4.4/pppd/plugi
continue; continue;
} }
conn->numPADOs++; conn->numPADOs++;
@@ -513,7 +499,7 @@ @@ -513,7 +499,7 @@ waitForPADS(PPPoEConnection *conn, int t
if (r >= 0 || errno != EINTR) break; if (r >= 0 || errno != EINTR) break;
} }
if (r < 0) { if (r < 0) {
@ -230,7 +228,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/discovery.c ppp-2.4.4/pppd/plugi
} }
if (r == 0) return; if (r == 0) return;
} }
@@ -523,8 +509,7 @@ @@ -523,8 +509,7 @@ waitForPADS(PPPoEConnection *conn, int t
/* Check length */ /* Check length */
if (ntohs(packet.length) + HDR_SIZE > len) { if (ntohs(packet.length) + HDR_SIZE > len) {
@ -240,7 +238,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/discovery.c ppp-2.4.4/pppd/plugi
continue; continue;
} }
@@ -556,11 +541,12 @@ @@ -556,11 +541,12 @@ waitForPADS(PPPoEConnection *conn, int t
/* Don't bother with ntohs; we'll just end up converting it back... */ /* Don't bother with ntohs; we'll just end up converting it back... */
conn->session = packet.session; conn->session = packet.session;
@ -255,7 +253,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/discovery.c ppp-2.4.4/pppd/plugi
} }
} }
@@ -620,7 +606,7 @@ @@ -620,7 +606,7 @@ discovery(PPPoEConnection *conn)
/* If we're only printing access concentrator names, we're done */ /* If we're only printing access concentrator names, we're done */
if (conn->printACNames) { if (conn->printACNames) {
@ -264,10 +262,9 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/discovery.c ppp-2.4.4/pppd/plugi
} }
timeout = PADI_TIMEOUT; timeout = PADI_TIMEOUT;
diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-pppoe/if.c --- a/pppd/plugins/rp-pppoe/if.c
--- ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c 2001-12-13 21:55:20.000000000 -0500 +++ b/pppd/plugins/rp-pppoe/if.c
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/if.c 2009-05-07 17:01:46.000000000 -0400 @@ -40,10 +40,6 @@ static char const RCSID[] =
@@ -40,10 +40,6 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#endif #endif
@ -278,7 +275,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
#include <errno.h> #include <errno.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@@ -127,7 +123,7 @@ @@ -127,7 +123,7 @@ etherType(PPPoEPacket *packet)
{ {
UINT16_t type = (UINT16_t) ntohs(packet->ethHdr.h_proto); UINT16_t type = (UINT16_t) ntohs(packet->ethHdr.h_proto);
if (type != Eth_PPPOE_Discovery && type != Eth_PPPOE_Session) { if (type != Eth_PPPOE_Discovery && type != Eth_PPPOE_Session) {
@ -287,7 +284,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} }
return type; return type;
} }
@@ -156,7 +152,7 @@ @@ -156,7 +152,7 @@ getHWaddr(int sock, char const *ifname,
ifc.ifc_len = sizeof(inbuf); ifc.ifc_len = sizeof(inbuf);
ifc.ifc_buf = inbuf; ifc.ifc_buf = inbuf;
if (ioctl(sock, SIOCGIFCONF, &ifc) < 0) { if (ioctl(sock, SIOCGIFCONF, &ifc) < 0) {
@ -296,7 +293,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} }
ifr = ifc.ifc_req; ifr = ifc.ifc_req;
ifreq.ifr_name[0] = '\0'; ifreq.ifr_name[0] = '\0';
@@ -172,9 +168,7 @@ @@ -172,9 +168,7 @@ getHWaddr(int sock, char const *ifname,
(sdl->sdl_alen == ETH_ALEN) && (sdl->sdl_alen == ETH_ALEN) &&
!strncmp(ifname, ifr->ifr_name, sizeof(ifr->ifr_name))) { !strncmp(ifname, ifr->ifr_name, sizeof(ifr->ifr_name))) {
if (found) { if (found) {
@ -307,7 +304,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} else { } else {
found = 1; found = 1;
memcpy(hwaddr, LLADDR(sdl), ETH_ALEN); memcpy(hwaddr, LLADDR(sdl), ETH_ALEN);
@@ -183,9 +177,7 @@ @@ -183,9 +177,7 @@ getHWaddr(int sock, char const *ifname,
} }
} }
if (!found) { if (!found) {
@ -318,7 +315,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} }
} }
@@ -252,7 +244,7 @@ @@ -252,7 +244,7 @@ initFilter(int fd, UINT16_t type, unsign
/* Apply the filter */ /* Apply the filter */
if (ioctl(fd, BIOCSETF, &bpfProgram) < 0) { if (ioctl(fd, BIOCSETF, &bpfProgram) < 0) {
@ -327,7 +324,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} }
} }
} }
@@ -298,42 +290,36 @@ @@ -298,42 +290,36 @@ openInterface(char const *ifname, UINT16
if (fd < 0) { if (fd < 0) {
switch (errno) { switch (errno) {
case EACCES: /* permission denied */ case EACCES: /* permission denied */
@ -378,7 +375,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} }
getHWaddr(sock, ifname, hwaddr); getHWaddr(sock, ifname, hwaddr);
initFilter(fd, type, hwaddr); initFilter(fd, type, hwaddr);
@@ -342,58 +328,52 @@ @@ -342,58 +328,52 @@ openInterface(char const *ifname, UINT16
#if !defined(__OpenBSD__) #if !defined(__OpenBSD__)
strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
if (ioctl(sock, SIOCGIFMTU, &ifr) < 0) { if (ioctl(sock, SIOCGIFMTU, &ifr) < 0) {
@ -448,7 +445,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
ifname, ifname,
hwaddr[0], hwaddr[1], hwaddr[2], hwaddr[0], hwaddr[1], hwaddr[2],
hwaddr[3], hwaddr[4], hwaddr[5], hwaddr[3], hwaddr[4], hwaddr[5],
@@ -442,48 +422,41 @@ @@ -442,48 +422,41 @@ openInterface(char const *ifname, UINT16
if ((fd = socket(domain, stype, htons(type))) < 0) { if ((fd = socket(domain, stype, htons(type))) < 0) {
/* Give a more helpful message for the common error case */ /* Give a more helpful message for the common error case */
if (errno == EPERM) { if (errno == EPERM) {
@ -507,7 +504,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} }
#ifdef HAVE_STRUCT_SOCKADDR_LL #ifdef HAVE_STRUCT_SOCKADDR_LL
@@ -493,7 +466,7 @@ @@ -493,7 +466,7 @@ openInterface(char const *ifname, UINT16
strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
if (ioctl(fd, SIOCGIFINDEX, &ifr) < 0) { if (ioctl(fd, SIOCGIFINDEX, &ifr) < 0) {
@ -516,7 +513,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} }
sa.sll_ifindex = ifr.ifr_ifindex; sa.sll_ifindex = ifr.ifr_ifindex;
@@ -503,7 +476,7 @@ @@ -503,7 +476,7 @@ openInterface(char const *ifname, UINT16
/* We're only interested in packets on specified interface */ /* We're only interested in packets on specified interface */
if (bind(fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) { if (bind(fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) {
@ -525,7 +522,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} }
return fd; return fd;
@@ -527,13 +500,11 @@ @@ -527,13 +500,11 @@ sendPacket(PPPoEConnection *conn, int so
{ {
#if defined(USE_BPF) #if defined(USE_BPF)
if (write(sock, pkt, size) < 0) { if (write(sock, pkt, size) < 0) {
@ -541,7 +538,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} }
#else #else
#ifdef USE_DLPI #ifdef USE_DLPI
@@ -577,12 +548,11 @@ @@ -577,12 +548,11 @@ sendPacket(PPPoEConnection *conn, int so
struct sockaddr sa; struct sockaddr sa;
if (!conn) { if (!conn) {
@ -556,7 +553,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} }
#endif #endif
#endif #endif
@@ -632,26 +602,24 @@ @@ -632,26 +602,24 @@ receivePacket(int sock, PPPoEPacket *pkt
if (bpfSize <= 0) { if (bpfSize <= 0) {
bpfOffset = 0; bpfOffset = 0;
if ((bpfSize = read(sock, bpfBuffer, bpfLength)) < 0) { if ((bpfSize = read(sock, bpfBuffer, bpfLength)) < 0) {
@ -587,7 +584,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
clearPacketHeader(pkt); /* resets bpfSize and bpfOffset */ clearPacketHeader(pkt); /* resets bpfSize and bpfOffset */
return 0; return 0;
} }
@@ -676,16 +644,14 @@ @@ -676,16 +644,14 @@ receivePacket(int sock, PPPoEPacket *pkt
data.len = 0; data.len = 0;
if ((retval = getmsg(sock, NULL, &data, &flags)) < 0) { if ((retval = getmsg(sock, NULL, &data, &flags)) < 0) {
@ -606,7 +603,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} }
#endif #endif
#endif #endif
@@ -716,7 +682,7 @@ @@ -716,7 +682,7 @@ openInterface(char const *ifname, UINT16
int ppa; int ppa;
if(strlen(ifname) > PATH_MAX) { if(strlen(ifname) > PATH_MAX) {
@ -615,7 +612,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} }
ppa = atoi(&ifname[strlen(ifname)-1]); ppa = atoi(&ifname[strlen(ifname)-1]);
@@ -729,9 +695,9 @@ @@ -729,9 +695,9 @@ openInterface(char const *ifname, UINT16
if (( fd = open(base_dev, O_RDWR)) < 0) { if (( fd = open(base_dev, O_RDWR)) < 0) {
/* Give a more helpful message for the common error case */ /* Give a more helpful message for the common error case */
if (errno == EPERM) { if (errno == EPERM) {
@ -627,7 +624,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} }
/* rearranged order of DLPI code - delphys 20010803 */ /* rearranged order of DLPI code - delphys 20010803 */
@@ -747,17 +713,18 @@ @@ -747,17 +713,18 @@ openInterface(char const *ifname, UINT16
dl_abssaplen = ABS(dlp->info_ack.dl_sap_length); dl_abssaplen = ABS(dlp->info_ack.dl_sap_length);
dl_saplen = dlp->info_ack.dl_sap_length; dl_saplen = dlp->info_ack.dl_sap_length;
if (ETHERADDRL != (dlp->info_ack.dl_addr_length - dl_abssaplen)) if (ETHERADDRL != (dlp->info_ack.dl_addr_length - dl_abssaplen))
@ -649,7 +646,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
return fd; return fd;
} }
@@ -780,7 +747,7 @@ @@ -780,7 +747,7 @@ void dlpromisconreq(int fd, u_long level
flags = 0; flags = 0;
if (putmsg(fd, &ctl, (struct strbuf*) NULL, flags) < 0) if (putmsg(fd, &ctl, (struct strbuf*) NULL, flags) < 0)
@ -658,7 +655,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} }
@@ -799,7 +766,7 @@ @@ -799,7 +766,7 @@ void dlinforeq(int fd)
flags = RS_HIPRI; flags = RS_HIPRI;
if (putmsg(fd, &ctl, (struct strbuf*) NULL, flags) < 0) if (putmsg(fd, &ctl, (struct strbuf*) NULL, flags) < 0)
@ -667,7 +664,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} }
void dlunitdatareq(int fd, u_char *addrp, int addrlen, u_long minpri, u_long maxpri, u_char *datap, int datalen) void dlunitdatareq(int fd, u_char *addrp, int addrlen, u_long minpri, u_long maxpri, u_char *datap, int datalen)
@@ -827,7 +794,7 @@ @@ -827,7 +794,7 @@ void dlunitdatareq(int fd, u_char *addrp
data.buf = (char *) datap; data.buf = (char *) datap;
if (putmsg(fd, &ctl, &data, 0) < 0) if (putmsg(fd, &ctl, &data, 0) < 0)
@ -676,7 +673,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} }
void dlinfoack(int fd, char *bufp) void dlinfoack(int fd, char *bufp)
@@ -847,18 +814,14 @@ @@ -847,18 +814,14 @@ void dlinfoack(int fd, char *bufp)
expecting(DL_INFO_ACK, dlp); expecting(DL_INFO_ACK, dlp);
if (ctl.len < sizeof (dl_info_ack_t)) { if (ctl.len < sizeof (dl_info_ack_t)) {
@ -698,7 +695,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} }
} }
@@ -882,7 +845,7 @@ @@ -882,7 +845,7 @@ void dlbindreq(int fd, u_long sap, u_lon
flags = 0; flags = 0;
if (putmsg(fd, &ctl, (struct strbuf*) NULL, flags) < 0) if (putmsg(fd, &ctl, (struct strbuf*) NULL, flags) < 0)
@ -707,7 +704,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} }
void dlattachreq(int fd, u_long ppa) void dlattachreq(int fd, u_long ppa)
@@ -901,7 +864,7 @@ @@ -901,7 +864,7 @@ void dlattachreq(int fd, u_long ppa)
flags = 0; flags = 0;
if (putmsg(fd, &ctl, (struct strbuf*) NULL, flags) < 0) if (putmsg(fd, &ctl, (struct strbuf*) NULL, flags) < 0)
@ -716,7 +713,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} }
void dlokack(int fd, char *bufp) void dlokack(int fd, char *bufp)
@@ -921,18 +884,14 @@ @@ -921,18 +884,14 @@ void dlokack(int fd, char *bufp)
expecting(DL_OK_ACK, dlp); expecting(DL_OK_ACK, dlp);
if (ctl.len < sizeof (dl_ok_ack_t)) { if (ctl.len < sizeof (dl_ok_ack_t)) {
@ -738,7 +735,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} }
} }
@@ -953,12 +912,10 @@ @@ -953,12 +912,10 @@ void dlbindack(int fd, char *bufp)
expecting(DL_BIND_ACK, dlp); expecting(DL_BIND_ACK, dlp);
if (flags != RS_HIPRI) if (flags != RS_HIPRI)
@ -753,7 +750,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} }
} }
@@ -989,8 +946,7 @@ @@ -989,8 +946,7 @@ void strgetmsg(int fd, struct strbuf *ct
*/ */
(void) signal(SIGALRM, sigalrm); (void) signal(SIGALRM, sigalrm);
if (alarm(MAXWAIT) < 0) { if (alarm(MAXWAIT) < 0) {
@ -763,7 +760,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} }
/* /*
@@ -998,61 +954,48 @@ @@ -998,61 +954,48 @@ void strgetmsg(int fd, struct strbuf *ct
*/ */
*flagsp = 0; *flagsp = 0;
if ((rc = getmsg(fd, ctlp, datap, flagsp)) < 0) { if ((rc = getmsg(fd, ctlp, datap, flagsp)) < 0) {
@ -833,10 +830,9 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/pppd/plugins/rp-p
} }
} }
diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/Makefile.linux ppp-2.4.4/pppd/plugins/rp-pppoe/Makefile.linux --- a/pppd/plugins/rp-pppoe/Makefile.linux
--- ppp-2.4.4.orig/pppd/plugins/rp-pppoe/Makefile.linux 2006-06-04 01:07:46.000000000 -0400 +++ b/pppd/plugins/rp-pppoe/Makefile.linux
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/Makefile.linux 2009-05-07 17:01:46.000000000 -0400 @@ -28,8 +28,8 @@ COPTS=-O2 -g
@@ -28,8 +28,8 @@
CFLAGS=$(COPTS) -I../../../include/linux CFLAGS=$(COPTS) -I../../../include/linux
all: rp-pppoe.so pppoe-discovery all: rp-pppoe.so pppoe-discovery
@ -847,10 +843,9 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/Makefile.linux ppp-2.4.4/pppd/pl
pppoe-discovery.o: pppoe-discovery.c pppoe-discovery.o: pppoe-discovery.c
$(CC) $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o pppoe-discovery.o pppoe-discovery.c $(CC) $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o pppoe-discovery.o pppoe-discovery.c
diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/plugin.c ppp-2.4.4/pppd/plugins/rp-pppoe/plugin.c --- a/pppd/plugins/rp-pppoe/plugin.c
--- ppp-2.4.4.orig/pppd/plugins/rp-pppoe/plugin.c 2006-05-29 19:29:16.000000000 -0400 +++ b/pppd/plugins/rp-pppoe/plugin.c
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/plugin.c 2009-05-07 17:01:46.000000000 -0400 @@ -35,7 +35,6 @@ static char const RCSID[] =
@@ -35,7 +35,6 @@
#include "pppd/pathnames.h" #include "pppd/pathnames.h"
#include <linux/types.h> #include <linux/types.h>
@ -858,7 +853,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/plugin.c ppp-2.4.4/pppd/plugins/
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
@@ -173,10 +172,8 @@ @@ -173,10 +172,8 @@ PPPOEConnectDevice(void)
(unsigned) conn->peerEth[5]); (unsigned) conn->peerEth[5]);
if (connect(conn->sessionSocket, (struct sockaddr *) &sp, if (connect(conn->sessionSocket, (struct sockaddr *) &sp,
@ -870,7 +865,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/plugin.c ppp-2.4.4/pppd/plugins/
return conn->sessionSocket; return conn->sessionSocket;
} }
@@ -320,11 +317,9 @@ @@ -320,11 +317,9 @@ plugin_init(void)
} }
add_options(Options); add_options(Options);
@ -883,7 +878,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/plugin.c ppp-2.4.4/pppd/plugins/
/********************************************************************** /**********************************************************************
*%FUNCTION: fatalSys *%FUNCTION: fatalSys
*%ARGUMENTS: *%ARGUMENTS:
@@ -378,6 +373,7 @@ @@ -378,6 +373,7 @@ sysErr(char const *str)
{ {
rp_fatal(str); rp_fatal(str);
} }
@ -891,9 +886,8 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/plugin.c ppp-2.4.4/pppd/plugins/
void pppoe_check_options(void) void pppoe_check_options(void)
{ {
diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/pppoe-discovery.c ppp-2.4.4/pppd/plugins/rp-pppoe/pppoe-discovery.c --- a/pppd/plugins/rp-pppoe/pppoe-discovery.c
--- ppp-2.4.4.orig/pppd/plugins/rp-pppoe/pppoe-discovery.c 2004-11-13 07:12:05.000000000 -0500 +++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/pppoe-discovery.c 2009-05-07 17:01:46.000000000 -0400
@@ -17,14 +17,8 @@ @@ -17,14 +17,8 @@
#include "pppoe.h" #include "pppoe.h"
@ -909,7 +903,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/pppoe-discovery.c ppp-2.4.4/pppd
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
int opt; int opt;
@@ -32,17 +26,17 @@ @@ -32,17 +26,17 @@ int main(int argc, char *argv[])
conn = malloc(sizeof(PPPoEConnection)); conn = malloc(sizeof(PPPoEConnection));
if (!conn) if (!conn)
@ -930,7 +924,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/pppoe-discovery.c ppp-2.4.4/pppd
break; break;
case 'U': case 'U':
conn->useHostUniq = 1; conn->useHostUniq = 1;
@@ -57,7 +51,7 @@ @@ -57,7 +51,7 @@ int main(int argc, char *argv[])
fprintf(conn->debugFile, "pppoe-discovery %s\n", VERSION); fprintf(conn->debugFile, "pppoe-discovery %s\n", VERSION);
break; break;
case 'I': case 'I':
@ -939,7 +933,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/pppoe-discovery.c ppp-2.4.4/pppd
break; break;
case 'A': case 'A':
/* this is the default */ /* this is the default */
@@ -74,7 +68,7 @@ @@ -74,7 +68,7 @@ int main(int argc, char *argv[])
/* default interface name */ /* default interface name */
if (!conn->ifName) if (!conn->ifName)
@ -948,7 +942,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/pppoe-discovery.c ppp-2.4.4/pppd
conn->discoverySocket = -1; conn->discoverySocket = -1;
conn->sessionSocket = -1; conn->sessionSocket = -1;
@@ -84,39 +78,6 @@ @@ -84,39 +78,6 @@ int main(int argc, char *argv[])
exit(0); exit(0);
} }
@ -988,10 +982,9 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/pppoe-discovery.c ppp-2.4.4/pppd
void usage(void) void usage(void)
{ {
fprintf(stderr, "Usage: pppoe-discovery [options]\n"); fprintf(stderr, "Usage: pppoe-discovery [options]\n");
diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/pppoe.h ppp-2.4.4/pppd/plugins/rp-pppoe/pppoe.h --- a/pppd/plugins/rp-pppoe/pppoe.h
--- ppp-2.4.4.orig/pppd/plugins/rp-pppoe/pppoe.h 2004-11-04 05:07:37.000000000 -0500 +++ b/pppd/plugins/rp-pppoe/pppoe.h
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/pppoe.h 2009-05-07 17:01:46.000000000 -0400 @@ -307,12 +307,18 @@ void discovery(PPPoEConnection *conn);
@@ -307,12 +307,18 @@
unsigned char *findTag(PPPoEPacket *packet, UINT16_t tagType, unsigned char *findTag(PPPoEPacket *packet, UINT16_t tagType,
PPPoETag *tag); PPPoETag *tag);
@ -1011,9 +1004,8 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/pppoe.h ppp-2.4.4/pppd/plugins/r
return; \ return; \
} \ } \
} while(0) } while(0)
diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/utils.c ppp-2.4.4/pppd/plugins/rp-pppoe/utils.c --- /dev/null
--- ppp-2.4.4.orig/pppd/plugins/rp-pppoe/utils.c 1969-12-31 19:00:00.000000000 -0500 +++ b/pppd/plugins/rp-pppoe/utils.c
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/utils.c 2009-05-07 17:01:46.000000000 -0400
@@ -0,0 +1,62 @@ @@ -0,0 +1,62 @@
+#include <stdio.h> +#include <stdio.h>
+#include <stdlib.h> +#include <stdlib.h>

View File

@ -1,7 +1,6 @@
diff -Naur ppp-2.4.4.orig/pppd/ipcp.c ppp-2.4.4/pppd/ipcp.c --- a/pppd/ipcp.c
--- ppp-2.4.4.orig/pppd/ipcp.c 2009-05-09 02:55:46.000000000 -0400 +++ b/pppd/ipcp.c
+++ ppp-2.4.4/pppd/ipcp.c 2009-05-09 02:58:31.000000000 -0400 @@ -197,6 +197,14 @@ static option_t ipcp_option_list[] = {
@@ -197,6 +197,14 @@
"disable defaultroute option", OPT_ALIAS | OPT_A2CLR, "disable defaultroute option", OPT_ALIAS | OPT_A2CLR,
&ipcp_wantoptions[0].default_route }, &ipcp_wantoptions[0].default_route },
@ -16,7 +15,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ipcp.c ppp-2.4.4/pppd/ipcp.c
{ "proxyarp", o_bool, &ipcp_wantoptions[0].proxy_arp, { "proxyarp", o_bool, &ipcp_wantoptions[0].proxy_arp,
"Add proxy ARP entry", OPT_ENABLE|1, &ipcp_allowoptions[0].proxy_arp }, "Add proxy ARP entry", OPT_ENABLE|1, &ipcp_allowoptions[0].proxy_arp },
{ "noproxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp, { "noproxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp,
@@ -263,7 +271,7 @@ @@ -263,7 +271,7 @@ struct protent ipcp_protent = {
ip_active_pkt ip_active_pkt
}; };
@ -25,7 +24,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ipcp.c ppp-2.4.4/pppd/ipcp.c
static void ipcp_script __P((char *, int)); /* Run an up/down script */ static void ipcp_script __P((char *, int)); /* Run an up/down script */
static void ipcp_script_done __P((void *)); static void ipcp_script_done __P((void *));
@@ -1660,7 +1668,8 @@ @@ -1660,7 +1668,8 @@ ip_demand_conf(u)
if (!sifnpmode(u, PPP_IP, NPMODE_QUEUE)) if (!sifnpmode(u, PPP_IP, NPMODE_QUEUE))
return 0; return 0;
if (wo->default_route) if (wo->default_route)
@ -35,7 +34,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ipcp.c ppp-2.4.4/pppd/ipcp.c
default_route_set[u] = 1; default_route_set[u] = 1;
if (wo->proxy_arp) if (wo->proxy_arp)
if (sifproxyarp(u, wo->hisaddr)) if (sifproxyarp(u, wo->hisaddr))
@@ -1742,7 +1751,8 @@ @@ -1742,7 +1751,8 @@ ipcp_up(f)
*/ */
if (demand) { if (demand) {
if (go->ouraddr != wo->ouraddr || ho->hisaddr != wo->hisaddr) { if (go->ouraddr != wo->ouraddr || ho->hisaddr != wo->hisaddr) {
@ -45,7 +44,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ipcp.c ppp-2.4.4/pppd/ipcp.c
if (go->ouraddr != wo->ouraddr) { if (go->ouraddr != wo->ouraddr) {
warn("Local IP address changed to %I", go->ouraddr); warn("Local IP address changed to %I", go->ouraddr);
script_setenv("OLDIPLOCAL", ip_ntoa(wo->ouraddr), 0); script_setenv("OLDIPLOCAL", ip_ntoa(wo->ouraddr), 0);
@@ -1767,7 +1777,8 @@ @@ -1767,7 +1777,8 @@ ipcp_up(f)
/* assign a default route through the interface if required */ /* assign a default route through the interface if required */
if (ipcp_wantoptions[f->unit].default_route) if (ipcp_wantoptions[f->unit].default_route)
@ -55,7 +54,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ipcp.c ppp-2.4.4/pppd/ipcp.c
default_route_set[f->unit] = 1; default_route_set[f->unit] = 1;
/* Make a proxy ARP entry if requested. */ /* Make a proxy ARP entry if requested. */
@@ -1817,7 +1828,8 @@ @@ -1817,7 +1828,8 @@ ipcp_up(f)
/* assign a default route through the interface if required */ /* assign a default route through the interface if required */
if (ipcp_wantoptions[f->unit].default_route) if (ipcp_wantoptions[f->unit].default_route)
@ -65,7 +64,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ipcp.c ppp-2.4.4/pppd/ipcp.c
default_route_set[f->unit] = 1; default_route_set[f->unit] = 1;
/* Make a proxy ARP entry if requested. */ /* Make a proxy ARP entry if requested. */
@@ -1894,7 +1906,7 @@ @@ -1894,7 +1906,7 @@ ipcp_down(f)
sifnpmode(f->unit, PPP_IP, NPMODE_DROP); sifnpmode(f->unit, PPP_IP, NPMODE_DROP);
sifdown(f->unit); sifdown(f->unit);
ipcp_clear_addrs(f->unit, ipcp_gotoptions[f->unit].ouraddr, ipcp_clear_addrs(f->unit, ipcp_gotoptions[f->unit].ouraddr,
@ -74,7 +73,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ipcp.c ppp-2.4.4/pppd/ipcp.c
} }
/* Execute the ip-down script */ /* Execute the ip-down script */
@@ -1910,16 +1922,25 @@ @@ -1910,16 +1922,25 @@ ipcp_down(f)
* proxy arp entries, etc. * proxy arp entries, etc.
*/ */
static void static void
@ -102,10 +101,9 @@ diff -Naur ppp-2.4.4.orig/pppd/ipcp.c ppp-2.4.4/pppd/ipcp.c
cifdefaultroute(unit, ouraddr, hisaddr); cifdefaultroute(unit, ouraddr, hisaddr);
default_route_set[unit] = 0; default_route_set[unit] = 0;
} }
diff -Naur ppp-2.4.4.orig/pppd/ipcp.h ppp-2.4.4/pppd/ipcp.h --- a/pppd/ipcp.h
--- ppp-2.4.4.orig/pppd/ipcp.h 2009-05-09 02:54:59.000000000 -0400 +++ b/pppd/ipcp.h
+++ ppp-2.4.4/pppd/ipcp.h 2009-05-09 02:58:31.000000000 -0400 @@ -70,6 +70,7 @@ typedef struct ipcp_options {
@@ -70,6 +70,7 @@
bool old_addrs; /* Use old (IP-Addresses) option? */ bool old_addrs; /* Use old (IP-Addresses) option? */
bool req_addr; /* Ask peer to send IP address? */ bool req_addr; /* Ask peer to send IP address? */
bool default_route; /* Assign default route through interface? */ bool default_route; /* Assign default route through interface? */
@ -113,10 +111,9 @@ diff -Naur ppp-2.4.4.orig/pppd/ipcp.h ppp-2.4.4/pppd/ipcp.h
bool proxy_arp; /* Make proxy ARP entry for peer? */ bool proxy_arp; /* Make proxy ARP entry for peer? */
bool neg_vj; /* Van Jacobson Compression? */ bool neg_vj; /* Van Jacobson Compression? */
bool old_vj; /* use old (short) form of VJ option? */ bool old_vj; /* use old (short) form of VJ option? */
diff -Naur ppp-2.4.4.orig/pppd/pppd.8 ppp-2.4.4/pppd/pppd.8 --- a/pppd/pppd.8
--- ppp-2.4.4.orig/pppd/pppd.8 2009-05-09 02:54:59.000000000 -0400 +++ b/pppd/pppd.8
+++ ppp-2.4.4/pppd/pppd.8 2009-05-09 02:58:31.000000000 -0400 @@ -121,6 +121,11 @@ the gateway, when IPCP negotiation is su
@@ -121,6 +121,11 @@
This entry is removed when the PPP connection is broken. This option This entry is removed when the PPP connection is broken. This option
is privileged if the \fInodefaultroute\fR option has been specified. is privileged if the \fInodefaultroute\fR option has been specified.
.TP .TP
@ -128,7 +125,7 @@ diff -Naur ppp-2.4.4.orig/pppd/pppd.8 ppp-2.4.4/pppd/pppd.8
.B disconnect \fIscript .B disconnect \fIscript
Execute the command specified by \fIscript\fR, by passing it to a Execute the command specified by \fIscript\fR, by passing it to a
shell, after shell, after
@@ -706,7 +711,12 @@ @@ -706,7 +711,12 @@ disable both forms of hardware flow cont
.TP .TP
.B nodefaultroute .B nodefaultroute
Disable the \fIdefaultroute\fR option. The system administrator who Disable the \fIdefaultroute\fR option. The system administrator who
@ -142,10 +139,9 @@ diff -Naur ppp-2.4.4.orig/pppd/pppd.8 ppp-2.4.4/pppd/pppd.8
can do so by placing this option in the /etc/ppp/options file. can do so by placing this option in the /etc/ppp/options file.
.TP .TP
.B nodeflate .B nodeflate
diff -Naur ppp-2.4.4.orig/pppd/pppd.h ppp-2.4.4/pppd/pppd.h --- a/pppd/pppd.h
--- ppp-2.4.4.orig/pppd/pppd.h 2009-05-09 02:55:46.000000000 -0400 +++ b/pppd/pppd.h
+++ ppp-2.4.4/pppd/pppd.h 2009-05-09 02:58:31.000000000 -0400 @@ -644,7 +644,7 @@ int sif6addr __P((int, eui64_t, eui64_t
@@ -644,7 +644,7 @@
int cif6addr __P((int, eui64_t, eui64_t)); int cif6addr __P((int, eui64_t, eui64_t));
/* Remove an IPv6 address from i/f */ /* Remove an IPv6 address from i/f */
#endif #endif
@ -154,10 +150,9 @@ diff -Naur ppp-2.4.4.orig/pppd/pppd.h ppp-2.4.4/pppd/pppd.h
/* Create default route through i/f */ /* Create default route through i/f */
int cifdefaultroute __P((int, u_int32_t, u_int32_t)); int cifdefaultroute __P((int, u_int32_t, u_int32_t));
/* Delete default route through i/f */ /* Delete default route through i/f */
diff -Naur ppp-2.4.4.orig/pppd/sys-linux.c ppp-2.4.4/pppd/sys-linux.c --- a/pppd/sys-linux.c
--- ppp-2.4.4.orig/pppd/sys-linux.c 2009-05-09 02:55:46.000000000 -0400 +++ b/pppd/sys-linux.c
+++ ppp-2.4.4/pppd/sys-linux.c 2009-05-09 02:58:31.000000000 -0400 @@ -206,6 +206,8 @@ static unsigned char inbuf[512]; /* buff
@@ -206,6 +206,8 @@
static int if_is_up; /* Interface has been marked up */ static int if_is_up; /* Interface has been marked up */
static int have_default_route; /* Gateway for default route added */ static int have_default_route; /* Gateway for default route added */
@ -166,7 +161,7 @@ diff -Naur ppp-2.4.4.orig/pppd/sys-linux.c ppp-2.4.4/pppd/sys-linux.c
static u_int32_t proxy_arp_addr; /* Addr for proxy arp entry added */ static u_int32_t proxy_arp_addr; /* Addr for proxy arp entry added */
static char proxy_arp_dev[16]; /* Device for proxy arp entry */ static char proxy_arp_dev[16]; /* Device for proxy arp entry */
static u_int32_t our_old_addr; /* for detecting address changes */ static u_int32_t our_old_addr; /* for detecting address changes */
@@ -1520,6 +1522,9 @@ @@ -1520,6 +1522,9 @@ static int read_route_table(struct rtent
p = NULL; p = NULL;
} }
@ -176,7 +171,7 @@ diff -Naur ppp-2.4.4.orig/pppd/sys-linux.c ppp-2.4.4/pppd/sys-linux.c
SIN_ADDR(rt->rt_dst) = strtoul(cols[route_dest_col], NULL, 16); SIN_ADDR(rt->rt_dst) = strtoul(cols[route_dest_col], NULL, 16);
SIN_ADDR(rt->rt_gateway) = strtoul(cols[route_gw_col], NULL, 16); SIN_ADDR(rt->rt_gateway) = strtoul(cols[route_gw_col], NULL, 16);
SIN_ADDR(rt->rt_genmask) = strtoul(cols[route_mask_col], NULL, 16); SIN_ADDR(rt->rt_genmask) = strtoul(cols[route_mask_col], NULL, 16);
@@ -1589,20 +1594,51 @@ @@ -1589,20 +1594,51 @@ int have_route_to(u_int32_t addr)
/******************************************************************** /********************************************************************
* *
* sifdefaultroute - assign a default route through the address given. * sifdefaultroute - assign a default route through the address given.
@ -241,7 +236,7 @@ diff -Naur ppp-2.4.4.orig/pppd/sys-linux.c ppp-2.4.4/pppd/sys-linux.c
} }
memset (&rt, 0, sizeof (rt)); memset (&rt, 0, sizeof (rt));
@@ -1617,10 +1653,16 @@ @@ -1617,10 +1653,16 @@ int sifdefaultroute (int unit, u_int32_t
rt.rt_flags = RTF_UP; rt.rt_flags = RTF_UP;
if (ioctl(sock_fd, SIOCADDRT, &rt) < 0) { if (ioctl(sock_fd, SIOCADDRT, &rt) < 0) {
@ -259,7 +254,7 @@ diff -Naur ppp-2.4.4.orig/pppd/sys-linux.c ppp-2.4.4/pppd/sys-linux.c
have_default_route = 1; have_default_route = 1;
return 1; return 1;
@@ -1649,11 +1691,21 @@ @@ -1649,11 +1691,21 @@ int cifdefaultroute (int unit, u_int32_t
rt.rt_flags = RTF_UP; rt.rt_flags = RTF_UP;
if (ioctl(sock_fd, SIOCDELRT, &rt) < 0 && errno != ESRCH) { if (ioctl(sock_fd, SIOCDELRT, &rt) < 0 && errno != ESRCH) {
if (still_ppp()) { if (still_ppp()) {
@ -282,10 +277,9 @@ diff -Naur ppp-2.4.4.orig/pppd/sys-linux.c ppp-2.4.4/pppd/sys-linux.c
return 1; return 1;
} }
diff -Naur ppp-2.4.4.orig/pppd/sys-solaris.c ppp-2.4.4/pppd/sys-solaris.c --- a/pppd/sys-solaris.c
--- ppp-2.4.4.orig/pppd/sys-solaris.c 2009-05-09 02:54:59.000000000 -0400 +++ b/pppd/sys-solaris.c
+++ ppp-2.4.4/pppd/sys-solaris.c 2009-05-09 02:58:31.000000000 -0400 @@ -2036,12 +2036,18 @@ cifaddr(u, o, h)
@@ -2036,12 +2036,18 @@
* sifdefaultroute - assign a default route through the address given. * sifdefaultroute - assign a default route through the address given.
*/ */
int int

View File

@ -1,7 +1,6 @@
diff -Naur ppp-2.4.4.orig/pppd/Makefile.linux ppp-2.4.4/pppd/Makefile.linux --- a/pppd/Makefile.linux
--- ppp-2.4.4.orig/pppd/Makefile.linux 2009-05-08 23:17:17.000000000 -0400 +++ b/pppd/Makefile.linux
+++ ppp-2.4.4/pppd/Makefile.linux 2009-05-08 23:18:37.000000000 -0400 @@ -48,21 +48,21 @@ MPPE=y
@@ -48,21 +48,21 @@
# Uncomment the next line to include support for PPP packet filtering. # Uncomment the next line to include support for PPP packet filtering.
# This requires that the libpcap library and headers be installed # This requires that the libpcap library and headers be installed
# and that the kernel driver support PPP packet filtering. # and that the kernel driver support PPP packet filtering.
@ -28,7 +27,7 @@ diff -Naur ppp-2.4.4.orig/pppd/Makefile.linux ppp-2.4.4/pppd/Makefile.linux
# Enable plugins # Enable plugins
PLUGIN=y PLUGIN=y
@@ -77,7 +77,7 @@ @@ -77,7 +77,7 @@ MAXOCTETS=y
INCLUDE_DIRS= -I../include INCLUDE_DIRS= -I../include
@ -37,7 +36,7 @@ diff -Naur ppp-2.4.4.orig/pppd/Makefile.linux ppp-2.4.4/pppd/Makefile.linux
CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS) '-DDESTDIR="@DESTDIR@"' CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS) '-DDESTDIR="@DESTDIR@"'
@@ -117,10 +117,10 @@ @@ -117,10 +117,10 @@ CFLAGS += -DHAS_SHADOW
#LIBS += -lshadow $(LIBS) #LIBS += -lshadow $(LIBS)
endif endif

View File

@ -1,6 +1,5 @@
diff -Naur ppp-2.4.4.orig/include/linux/ppp-comp.h ppp-2.4.4/include/linux/ppp-comp.h --- a/include/linux/ppp-comp.h
--- ppp-2.4.4.orig/include/linux/ppp-comp.h 2009-05-09 03:44:09.000000000 -0400 +++ b/include/linux/ppp-comp.h
+++ ppp-2.4.4/include/linux/ppp-comp.h 2009-05-09 03:45:52.000000000 -0400
@@ -36,7 +36,7 @@ @@ -36,7 +36,7 @@
*/ */
@ -10,7 +9,7 @@ diff -Naur ppp-2.4.4.orig/include/linux/ppp-comp.h ppp-2.4.4/include/linux/ppp-c
* *
* NOTE TO MAINTAINERS: * NOTE TO MAINTAINERS:
* If you modify this file at all, please set the above date. * If you modify this file at all, please set the above date.
@@ -86,7 +86,7 @@ @@ -86,7 +86,7 @@ struct compressor {
/* Compress a packet */ /* Compress a packet */
int (*compress) (void *state, unsigned char *rptr, int (*compress) (void *state, unsigned char *rptr,
@ -19,7 +18,7 @@ diff -Naur ppp-2.4.4.orig/include/linux/ppp-comp.h ppp-2.4.4/include/linux/ppp-c
/* Return compression statistics */ /* Return compression statistics */
void (*comp_stat) (void *state, struct compstat *stats); void (*comp_stat) (void *state, struct compstat *stats);
@@ -107,7 +107,7 @@ @@ -107,7 +107,7 @@ struct compressor {
/* Decompress a packet. */ /* Decompress a packet. */
int (*decompress) (void *state, unsigned char *ibuf, int isize, int (*decompress) (void *state, unsigned char *ibuf, int isize,
@ -28,7 +27,7 @@ diff -Naur ppp-2.4.4.orig/include/linux/ppp-comp.h ppp-2.4.4/include/linux/ppp-c
/* Update state for an incompressible packet received */ /* Update state for an incompressible packet received */
void (*incomp) (void *state, unsigned char *ibuf, int icnt); void (*incomp) (void *state, unsigned char *ibuf, int icnt);
@@ -288,6 +288,33 @@ @@ -288,6 +288,33 @@ struct compressor {
opts |= MPPE_OPT_UNKNOWN; \ opts |= MPPE_OPT_UNKNOWN; \
} while (/* CONSTCOND */ 0) } while (/* CONSTCOND */ 0)
@ -62,10 +61,9 @@ diff -Naur ppp-2.4.4.orig/include/linux/ppp-comp.h ppp-2.4.4/include/linux/ppp-c
/* /*
* Definitions for other, as yet unsupported, compression methods. * Definitions for other, as yet unsupported, compression methods.
*/ */
diff -Naur ppp-2.4.4.orig/include/net/ppp-comp.h ppp-2.4.4/include/net/ppp-comp.h --- a/include/net/ppp-comp.h
--- ppp-2.4.4.orig/include/net/ppp-comp.h 2009-05-09 03:44:09.000000000 -0400 +++ b/include/net/ppp-comp.h
+++ ppp-2.4.4/include/net/ppp-comp.h 2009-05-09 03:45:52.000000000 -0400 @@ -255,6 +255,33 @@ struct compressor {
@@ -255,6 +255,33 @@
opts |= MPPE_OPT_UNKNOWN; \ opts |= MPPE_OPT_UNKNOWN; \
} while (/* CONSTCOND */ 0) } while (/* CONSTCOND */ 0)
@ -99,10 +97,9 @@ diff -Naur ppp-2.4.4.orig/include/net/ppp-comp.h ppp-2.4.4/include/net/ppp-comp.
/* /*
* Definitions for other, as yet unsupported, compression methods. * Definitions for other, as yet unsupported, compression methods.
*/ */
diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c --- a/pppd/ccp.c
--- ppp-2.4.4.orig/pppd/ccp.c 2009-05-09 03:44:09.000000000 -0400 +++ b/pppd/ccp.c
+++ ppp-2.4.4/pppd/ccp.c 2009-05-09 03:45:52.000000000 -0400 @@ -62,12 +62,10 @@ static int setdeflate __P((char **));
@@ -62,12 +62,10 @@
static char bsd_value[8]; static char bsd_value[8];
static char deflate_value[8]; static char deflate_value[8];
@ -118,7 +115,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
static option_t ccp_option_list[] = { static option_t ccp_option_list[] = {
{ "noccp", o_bool, &ccp_protent.enabled_flag, { "noccp", o_bool, &ccp_protent.enabled_flag,
@@ -108,54 +106,36 @@ @@ -108,54 +106,36 @@ static option_t ccp_option_list[] = {
"don't allow Predictor-1", OPT_ALIAS | OPT_PRIOSUB | OPT_A2CLR, "don't allow Predictor-1", OPT_ALIAS | OPT_PRIOSUB | OPT_A2CLR,
&ccp_allowoptions[0].predictor_1 }, &ccp_allowoptions[0].predictor_1 },
@ -202,7 +199,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
#endif /* MPPE */ #endif /* MPPE */
{ NULL } { NULL }
@@ -241,7 +221,7 @@ @@ -241,7 +221,7 @@ static fsm_callbacks ccp_callbacks = {
*/ */
#define ANY_COMPRESS(opt) ((opt).deflate || (opt).bsd_compress \ #define ANY_COMPRESS(opt) ((opt).deflate || (opt).bsd_compress \
|| (opt).predictor_1 || (opt).predictor_2 \ || (opt).predictor_1 || (opt).predictor_2 \
@ -211,7 +208,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
/* /*
* Local state (mainly for handling reset-reqs and reset-acks). * Local state (mainly for handling reset-reqs and reset-acks).
@@ -344,6 +324,100 @@ @@ -344,6 +324,100 @@ setdeflate(argv)
return 1; return 1;
} }
@ -312,7 +309,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
/* /*
* ccp_init - initialize CCP. * ccp_init - initialize CCP.
*/ */
@@ -378,6 +452,30 @@ @@ -378,6 +452,30 @@ ccp_init(unit)
ccp_allowoptions[0].bsd_bits = BSD_MAX_BITS; ccp_allowoptions[0].bsd_bits = BSD_MAX_BITS;
ccp_allowoptions[0].predictor_1 = 1; ccp_allowoptions[0].predictor_1 = 1;
@ -343,7 +340,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
} }
/* /*
@@ -455,11 +553,11 @@ @@ -455,11 +553,11 @@ ccp_input(unit, p, len)
if (oldstate == OPENED && p[0] == TERMREQ && f->state != OPENED) { if (oldstate == OPENED && p[0] == TERMREQ && f->state != OPENED) {
notice("Compression disabled by peer."); notice("Compression disabled by peer.");
#ifdef MPPE #ifdef MPPE
@ -357,7 +354,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
} }
/* /*
@@ -487,6 +585,15 @@ @@ -487,6 +585,15 @@ ccp_extcode(f, code, id, p, len)
break; break;
/* send a reset-ack, which the transmitter will see and /* send a reset-ack, which the transmitter will see and
reset its compression state. */ reset its compression state. */
@ -373,7 +370,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
fsm_sdata(f, CCP_RESETACK, id, NULL, 0); fsm_sdata(f, CCP_RESETACK, id, NULL, 0);
break; break;
@@ -515,12 +622,11 @@ @@ -515,12 +622,11 @@ ccp_protrej(unit)
fsm_lowerdown(&ccp_fsm[unit]); fsm_lowerdown(&ccp_fsm[unit]);
#ifdef MPPE #ifdef MPPE
@ -388,7 +385,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
} }
/* /*
@@ -537,7 +643,7 @@ @@ -537,7 +643,7 @@ ccp_resetci(f)
all_rejected[f->unit] = 0; all_rejected[f->unit] = 0;
#ifdef MPPE #ifdef MPPE
@ -397,7 +394,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
ccp_options *ao = &ccp_allowoptions[f->unit]; ccp_options *ao = &ccp_allowoptions[f->unit];
int auth_mschap_bits = auth_done[f->unit]; int auth_mschap_bits = auth_done[f->unit];
int numbits; int numbits;
@@ -551,80 +657,109 @@ @@ -551,80 +657,109 @@ ccp_resetci(f)
* NB: If MPPE is required, all other compression opts are invalid. * NB: If MPPE is required, all other compression opts are invalid.
* So, we return right away if we can't do it. * So, we return right away if we can't do it.
*/ */
@ -573,7 +570,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
if (go->bsd_compress) { if (go->bsd_compress) {
opt_buf[0] = CI_BSD_COMPRESS; opt_buf[0] = CI_BSD_COMPRESS;
opt_buf[1] = CILEN_BSD_COMPRESS; opt_buf[1] = CILEN_BSD_COMPRESS;
@@ -679,7 +814,8 @@ @@ -679,7 +814,8 @@ ccp_cilen(f)
+ (go->deflate? CILEN_DEFLATE: 0) + (go->deflate? CILEN_DEFLATE: 0)
+ (go->predictor_1? CILEN_PREDICTOR_1: 0) + (go->predictor_1? CILEN_PREDICTOR_1: 0)
+ (go->predictor_2? CILEN_PREDICTOR_2: 0) + (go->predictor_2? CILEN_PREDICTOR_2: 0)
@ -583,7 +580,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
} }
/* /*
@@ -693,6 +829,8 @@ @@ -693,6 +829,8 @@ ccp_addci(f, p, lenp)
{ {
int res; int res;
ccp_options *go = &ccp_gotoptions[f->unit]; ccp_options *go = &ccp_gotoptions[f->unit];
@ -592,7 +589,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
u_char *p0 = p; u_char *p0 = p;
/* /*
@@ -701,22 +839,43 @@ @@ -701,22 +839,43 @@ ccp_addci(f, p, lenp)
* in case it gets Acked. * in case it gets Acked.
*/ */
#ifdef MPPE #ifdef MPPE
@ -645,7 +642,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
if (go->deflate) { if (go->deflate) {
p[0] = go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT; p[0] = go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT;
p[1] = CILEN_DEFLATE; p[1] = CILEN_DEFLATE;
@@ -802,7 +961,7 @@ @@ -802,7 +961,7 @@ ccp_addci(f, p, lenp)
/* /*
* ccp_ackci - process a received configure-ack, and return * ccp_ackci - process a received configure-ack, and return
@ -654,7 +651,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
*/ */
static int static int
ccp_ackci(f, p, len) ccp_ackci(f, p, len)
@@ -811,24 +970,44 @@ @@ -811,24 +970,44 @@ ccp_ackci(f, p, len)
int len; int len;
{ {
ccp_options *go = &ccp_gotoptions[f->unit]; ccp_options *go = &ccp_gotoptions[f->unit];
@ -708,7 +705,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
if (go->deflate) { if (go->deflate) {
if (len < CILEN_DEFLATE if (len < CILEN_DEFLATE
|| p[0] != (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT) || p[0] != (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT)
@@ -891,7 +1070,7 @@ @@ -891,7 +1070,7 @@ ccp_ackci(f, p, len)
/* /*
* ccp_nakci - process received configure-nak. * ccp_nakci - process received configure-nak.
@ -717,7 +714,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
*/ */
static int static int
ccp_nakci(f, p, len, treat_as_reject) ccp_nakci(f, p, len, treat_as_reject)
@@ -901,6 +1080,8 @@ @@ -901,6 +1080,8 @@ ccp_nakci(f, p, len, treat_as_reject)
int treat_as_reject; int treat_as_reject;
{ {
ccp_options *go = &ccp_gotoptions[f->unit]; ccp_options *go = &ccp_gotoptions[f->unit];
@ -726,7 +723,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
ccp_options no; /* options we've seen already */ ccp_options no; /* options we've seen already */
ccp_options try; /* options to ask for next time */ ccp_options try; /* options to ask for next time */
@@ -908,28 +1089,100 @@ @@ -908,28 +1089,100 @@ ccp_nakci(f, p, len, treat_as_reject)
try = *go; try = *go;
#ifdef MPPE #ifdef MPPE
@ -845,7 +842,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
if (go->deflate && len >= CILEN_DEFLATE if (go->deflate && len >= CILEN_DEFLATE
&& p[0] == (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT) && p[0] == (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT)
&& p[1] == CILEN_DEFLATE) { && p[1] == CILEN_DEFLATE) {
@@ -1002,14 +1255,50 @@ @@ -1002,14 +1255,50 @@ ccp_rejci(f, p, len)
return -1; return -1;
#ifdef MPPE #ifdef MPPE
@ -900,7 +897,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
if (go->deflate_correct && len >= CILEN_DEFLATE if (go->deflate_correct && len >= CILEN_DEFLATE
&& p[0] == CI_DEFLATE && p[1] == CILEN_DEFLATE) { && p[0] == CI_DEFLATE && p[1] == CILEN_DEFLATE) {
if (p[2] != DEFLATE_MAKE_OPT(go->deflate_size) if (p[2] != DEFLATE_MAKE_OPT(go->deflate_size)
@@ -1073,14 +1362,15 @@ @@ -1073,14 +1362,15 @@ ccp_reqci(f, p, lenp, dont_nak)
int dont_nak; int dont_nak;
{ {
int ret, newret, res; int ret, newret, res;
@ -920,7 +917,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
ret = CONFACK; ret = CONFACK;
retp = p0 = p; retp = p0 = p;
@@ -1103,106 +1393,302 @@ @@ -1103,106 +1393,302 @@ ccp_reqci(f, p, lenp, dont_nak)
switch (type) { switch (type) {
#ifdef MPPE #ifdef MPPE
case CI_MPPE: case CI_MPPE:
@ -1316,7 +1313,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
case CI_DEFLATE: case CI_DEFLATE:
case CI_DEFLATE_DRAFT: case CI_DEFLATE_DRAFT:
if (!ao->deflate || clen != CILEN_DEFLATE if (!ao->deflate || clen != CILEN_DEFLATE
@@ -1344,12 +1830,6 @@ @@ -1344,12 +1830,6 @@ ccp_reqci(f, p, lenp, dont_nak)
else else
*lenp = retp - p0; *lenp = retp - p0;
} }
@ -1329,7 +1326,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
return ret; return ret;
} }
@@ -1371,24 +1851,35 @@ @@ -1371,24 +1851,35 @@ method_name(opt, opt2)
char *p = result; char *p = result;
char *q = result + sizeof(result); /* 1 past result */ char *q = result + sizeof(result); /* 1 past result */
@ -1381,7 +1378,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
case CI_DEFLATE: case CI_DEFLATE:
case CI_DEFLATE_DRAFT: case CI_DEFLATE_DRAFT:
if (opt2 != NULL && opt2->deflate_size != opt->deflate_size) if (opt2 != NULL && opt2->deflate_size != opt->deflate_size)
@@ -1444,12 +1935,12 @@ @@ -1444,12 +1935,12 @@ ccp_up(f)
} else if (ANY_COMPRESS(*ho)) } else if (ANY_COMPRESS(*ho))
notice("%s transmit compression enabled", method_name(ho, NULL)); notice("%s transmit compression enabled", method_name(ho, NULL));
#ifdef MPPE #ifdef MPPE
@ -1396,7 +1393,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
} }
/* /*
@@ -1472,7 +1963,7 @@ @@ -1472,7 +1963,7 @@ ccp_down(f)
lcp_close(f->unit, "MPPE disabled"); lcp_close(f->unit, "MPPE disabled");
} }
} }
@ -1405,7 +1402,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
} }
/* /*
@@ -1532,24 +2023,28 @@ @@ -1532,24 +2023,28 @@ ccp_printpkt(p, plen, printer, arg)
#ifdef MPPE #ifdef MPPE
case CI_MPPE: case CI_MPPE:
if (optlen >= CILEN_MPPE) { if (optlen >= CILEN_MPPE) {
@ -1446,7 +1443,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
case CI_DEFLATE: case CI_DEFLATE:
case CI_DEFLATE_DRAFT: case CI_DEFLATE_DRAFT:
if (optlen >= CILEN_DEFLATE) { if (optlen >= CILEN_DEFLATE) {
@@ -1635,6 +2130,7 @@ @@ -1635,6 +2130,7 @@ ccp_datainput(unit, pkt, len)
error("Lost compression sync: disabling compression"); error("Lost compression sync: disabling compression");
ccp_close(unit, "Lost compression sync"); ccp_close(unit, "Lost compression sync");
#ifdef MPPE #ifdef MPPE
@ -1454,7 +1451,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
/* /*
* If we were doing MPPE, we must also take the link down. * If we were doing MPPE, we must also take the link down.
*/ */
@@ -1642,9 +2138,18 @@ @@ -1642,9 +2138,18 @@ ccp_datainput(unit, pkt, len)
error("Too many MPPE errors, closing LCP"); error("Too many MPPE errors, closing LCP");
lcp_close(unit, "Too many MPPE errors"); lcp_close(unit, "Too many MPPE errors");
} }
@ -1474,15 +1471,14 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
* Send a reset-request to reset the peer's compressor. * Send a reset-request to reset the peer's compressor.
* We don't do that if we are still waiting for an * We don't do that if we are still waiting for an
* acknowledgement to a previous reset-request. * acknowledgement to a previous reset-request.
@@ -1675,4 +2180,3 @@ @@ -1675,4 +2180,3 @@ ccp_rack_timeout(arg)
} else } else
ccp_localstate[f->unit] &= ~RACK_PENDING; ccp_localstate[f->unit] &= ~RACK_PENDING;
} }
- -
diff -Naur ppp-2.4.4.orig/pppd/ccp.h ppp-2.4.4/pppd/ccp.h --- a/pppd/ccp.h
--- ppp-2.4.4.orig/pppd/ccp.h 2009-05-09 03:44:09.000000000 -0400 +++ b/pppd/ccp.h
+++ ppp-2.4.4/pppd/ccp.h 2009-05-09 03:45:52.000000000 -0400 @@ -37,9 +37,17 @@ typedef struct ccp_options {
@@ -37,9 +37,17 @@
bool predictor_2; /* do Predictor-2? */ bool predictor_2; /* do Predictor-2? */
bool deflate_correct; /* use correct code for deflate? */ bool deflate_correct; /* use correct code for deflate? */
bool deflate_draft; /* use draft RFC code for deflate? */ bool deflate_draft; /* use draft RFC code for deflate? */
@ -1500,10 +1496,9 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.h ppp-2.4.4/pppd/ccp.h
short method; /* code for chosen compression method */ short method; /* code for chosen compression method */
} ccp_options; } ccp_options;
diff -Naur ppp-2.4.4.orig/pppd/chap_ms.c ppp-2.4.4/pppd/chap_ms.c --- a/pppd/chap_ms.c
--- ppp-2.4.4.orig/pppd/chap_ms.c 2009-05-09 03:45:07.000000000 -0400 +++ b/pppd/chap_ms.c
+++ ppp-2.4.4/pppd/chap_ms.c 2009-05-09 03:45:52.000000000 -0400 @@ -897,13 +897,17 @@ set_mppe_enc_types(int policy, int types
@@ -897,13 +897,17 @@
/* /*
* Disable undesirable encryption types. Note that we don't ENABLE * Disable undesirable encryption types. Note that we don't ENABLE
* any encryption types, to avoid overriding manual configuration. * any encryption types, to avoid overriding manual configuration.

View File

@ -1,7 +1,6 @@
diff -Naur ppp-2.4.4.orig/chat/Makefile.linux ppp-2.4.4/chat/Makefile.linux --- a/chat/Makefile.linux
--- ppp-2.4.4.orig/chat/Makefile.linux 2006-06-04 01:07:46.000000000 -0400 +++ b/chat/Makefile.linux
+++ ppp-2.4.4/chat/Makefile.linux 2009-05-07 18:04:23.000000000 -0400 @@ -25,7 +25,7 @@ chat.o: chat.c
@@ -25,7 +25,7 @@
install: chat install: chat
mkdir -p $(BINDIR) $(MANDIR) mkdir -p $(BINDIR) $(MANDIR)
@ -10,10 +9,9 @@ diff -Naur ppp-2.4.4.orig/chat/Makefile.linux ppp-2.4.4/chat/Makefile.linux
$(INSTALL) -c -m 644 chat.8 $(MANDIR) $(INSTALL) -c -m 644 chat.8 $(MANDIR)
clean: clean:
diff -Naur ppp-2.4.4.orig/pppd/Makefile.linux ppp-2.4.4/pppd/Makefile.linux --- a/pppd/Makefile.linux
--- ppp-2.4.4.orig/pppd/Makefile.linux 2009-05-07 17:04:21.000000000 -0400 +++ b/pppd/Makefile.linux
+++ ppp-2.4.4/pppd/Makefile.linux 2009-05-07 18:04:23.000000000 -0400 @@ -99,7 +99,7 @@ ifdef USE_SRP
@@ -99,7 +99,7 @@
CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
TARGETS += srp-entry TARGETS += srp-entry
@ -22,7 +20,7 @@ diff -Naur ppp-2.4.4.orig/pppd/Makefile.linux ppp-2.4.4/pppd/Makefile.linux
MANPAGES += srp-entry.8 MANPAGES += srp-entry.8
EXTRACLEAN += srp-entry.o EXTRACLEAN += srp-entry.o
NEEDDES=y NEEDDES=y
@@ -200,7 +200,7 @@ @@ -200,7 +200,7 @@ all: $(TARGETS)
install: pppd install: pppd
mkdir -p $(BINDIR) $(MANDIR) mkdir -p $(BINDIR) $(MANDIR)
$(EXTRAINSTALL) $(EXTRAINSTALL)
@ -31,10 +29,9 @@ diff -Naur ppp-2.4.4.orig/pppd/Makefile.linux ppp-2.4.4/pppd/Makefile.linux
if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \ if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
chmod o-rx,u+s $(BINDIR)/pppd; fi chmod o-rx,u+s $(BINDIR)/pppd; fi
$(INSTALL) -c -m 444 pppd.8 $(MANDIR) $(INSTALL) -c -m 444 pppd.8 $(MANDIR)
diff -Naur ppp-2.4.4.orig/pppd/plugins/radius/Makefile.linux ppp-2.4.4/pppd/plugins/radius/Makefile.linux --- a/pppd/plugins/radius/Makefile.linux
--- ppp-2.4.4.orig/pppd/plugins/radius/Makefile.linux 2006-06-04 01:04:14.000000000 -0400 +++ b/pppd/plugins/radius/Makefile.linux
+++ ppp-2.4.4/pppd/plugins/radius/Makefile.linux 2009-05-07 18:04:23.000000000 -0400 @@ -36,9 +36,9 @@ all: $(PLUGIN)
@@ -36,9 +36,9 @@
install: all install: all
$(INSTALL) -d -m 755 $(LIBDIR) $(INSTALL) -d -m 755 $(LIBDIR)
@ -47,10 +44,9 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/radius/Makefile.linux ppp-2.4.4/pppd/plug
$(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR) $(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)
$(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR) $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/Makefile.linux ppp-2.4.4/pppd/plugins/rp-pppoe/Makefile.linux --- a/pppd/plugins/rp-pppoe/Makefile.linux
--- ppp-2.4.4.orig/pppd/plugins/rp-pppoe/Makefile.linux 2009-05-07 17:02:45.000000000 -0400 +++ b/pppd/plugins/rp-pppoe/Makefile.linux
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/Makefile.linux 2009-05-07 18:04:23.000000000 -0400 @@ -39,9 +39,9 @@ rp-pppoe.so: libplugin.a plugin.o
@@ -39,9 +39,9 @@
install: all install: all
$(INSTALL) -d -m 755 $(LIBDIR) $(INSTALL) -d -m 755 $(LIBDIR)
@ -62,20 +58,18 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/Makefile.linux ppp-2.4.4/pppd/pl
clean: clean:
rm -f *.o *.so rm -f *.o *.so
diff -Naur ppp-2.4.4.orig/pppdump/Makefile.linux ppp-2.4.4/pppdump/Makefile.linux --- a/pppdump/Makefile.linux
--- ppp-2.4.4.orig/pppdump/Makefile.linux 2006-06-04 01:04:14.000000000 -0400 +++ b/pppdump/Makefile.linux
+++ ppp-2.4.4/pppdump/Makefile.linux 2009-05-07 18:04:23.000000000 -0400 @@ -17,5 +17,5 @@ clean:
@@ -17,5 +17,5 @@
install: install:
mkdir -p $(BINDIR) $(MANDIR) mkdir -p $(BINDIR) $(MANDIR)
- $(INSTALL) -s -c pppdump $(BINDIR) - $(INSTALL) -s -c pppdump $(BINDIR)
+ $(INSTALL) -c pppdump $(BINDIR) + $(INSTALL) -c pppdump $(BINDIR)
$(INSTALL) -c -m 444 pppdump.8 $(MANDIR) $(INSTALL) -c -m 444 pppdump.8 $(MANDIR)
diff -Naur ppp-2.4.4.orig/pppstats/Makefile.linux ppp-2.4.4/pppstats/Makefile.linux --- a/pppstats/Makefile.linux
--- ppp-2.4.4.orig/pppstats/Makefile.linux 2006-06-04 01:07:46.000000000 -0400 +++ b/pppstats/Makefile.linux
+++ ppp-2.4.4/pppstats/Makefile.linux 2009-05-07 18:04:23.000000000 -0400 @@ -22,7 +22,7 @@ all: pppstats
@@ -22,7 +22,7 @@
install: pppstats install: pppstats
-mkdir -p $(MANDIR) -mkdir -p $(MANDIR)

View File

@ -1,7 +1,6 @@
diff -Naur ppp-2.4.4.orig/pppd/plugins/radius/Makefile.linux ppp-2.4.4/pppd/plugins/radius/Makefile.linux --- a/pppd/plugins/radius/Makefile.linux
--- ppp-2.4.4.orig/pppd/plugins/radius/Makefile.linux 2009-05-07 18:05:57.000000000 -0400 +++ b/pppd/plugins/radius/Makefile.linux
+++ ppp-2.4.4/pppd/plugins/radius/Makefile.linux 2009-05-07 18:06:23.000000000 -0400 @@ -12,7 +12,8 @@ VERSION = $(shell awk -F '"' '/VERSION/
@@ -12,7 +12,8 @@
INSTALL = install INSTALL = install
PLUGIN=radius.so radattr.so radrealms.so PLUGIN=radius.so radattr.so radrealms.so
@ -11,10 +10,9 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/radius/Makefile.linux ppp-2.4.4/pppd/plug
# Uncomment the next line to include support for Microsoft's # Uncomment the next line to include support for Microsoft's
# MS-CHAP authentication protocol. # MS-CHAP authentication protocol.
diff -Naur ppp-2.4.4.orig/pppdump/Makefile.linux ppp-2.4.4/pppdump/Makefile.linux --- a/pppdump/Makefile.linux
--- ppp-2.4.4.orig/pppdump/Makefile.linux 2009-05-07 18:05:57.000000000 -0400 +++ b/pppdump/Makefile.linux
+++ ppp-2.4.4/pppdump/Makefile.linux 2009-05-07 18:06:23.000000000 -0400 @@ -2,7 +2,8 @@ DESTDIR = $(INSTROOT)@DESTDIR@
@@ -2,7 +2,8 @@
BINDIR = $(DESTDIR)/sbin BINDIR = $(DESTDIR)/sbin
MANDIR = $(DESTDIR)/share/man/man8 MANDIR = $(DESTDIR)/share/man/man8

View File

@ -1,7 +1,6 @@
diff -Naur ppp-2.4.4.orig/pppd/plugins/radius/config.c ppp-2.4.4/pppd/plugins/radius/config.c --- a/pppd/plugins/radius/config.c
--- ppp-2.4.4.orig/pppd/plugins/radius/config.c 2004-11-14 02:26:26.000000000 -0500 +++ b/pppd/plugins/radius/config.c
+++ ppp-2.4.4/pppd/plugins/radius/config.c 2009-05-07 19:31:14.000000000 -0400 @@ -369,31 +369,37 @@ static int test_config(char *filename)
@@ -369,31 +369,37 @@
} }
#endif #endif
@ -39,10 +38,9 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/radius/config.c ppp-2.4.4/pppd/plugins/ra
return 0; return 0;
} }
diff -Naur ppp-2.4.4.orig/pppd/plugins/radius/options.h ppp-2.4.4/pppd/plugins/radius/options.h --- a/pppd/plugins/radius/options.h
--- ppp-2.4.4.orig/pppd/plugins/radius/options.h 2004-11-14 02:26:26.000000000 -0500 +++ b/pppd/plugins/radius/options.h
+++ ppp-2.4.4/pppd/plugins/radius/options.h 2009-05-07 19:31:14.000000000 -0400 @@ -31,24 +31,21 @@ typedef struct _option {
@@ -31,24 +31,21 @@
static SERVER acctserver = {0}; static SERVER acctserver = {0};
static SERVER authserver = {0}; static SERVER authserver = {0};

View File

@ -1,7 +1,6 @@
diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/discovery.c ppp-2.4.4/pppd/plugins/rp-pppoe/discovery.c --- a/pppd/plugins/rp-pppoe/discovery.c
--- ppp-2.4.4.orig/pppd/plugins/rp-pppoe/discovery.c 2009-05-07 19:47:30.000000000 -0400 +++ b/pppd/plugins/rp-pppoe/discovery.c
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/discovery.c 2009-05-07 20:23:04.000000000 -0400 @@ -593,12 +593,14 @@ discovery(PPPoEConnection *conn)
@@ -593,12 +593,14 @@
conn->discoveryState = STATE_SENT_PADI; conn->discoveryState = STATE_SENT_PADI;
waitForPADO(conn, timeout); waitForPADO(conn, timeout);
@ -16,7 +15,7 @@ diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/discovery.c ppp-2.4.4/pppd/plugi
if (conn->printACNames && conn->numPADOs) { if (conn->printACNames && conn->numPADOs) {
break; break;
} }
@@ -621,7 +623,9 @@ @@ -621,7 +623,9 @@ discovery(PPPoEConnection *conn)
sendPADR(conn); sendPADR(conn);
conn->discoveryState = STATE_SENT_PADR; conn->discoveryState = STATE_SENT_PADR;
waitForPADS(conn, timeout); waitForPADS(conn, timeout);

View File

@ -1,6 +1,5 @@
diff -Naur ppp-2.4.4.orig/pppd/main.c ppp-2.4.4/pppd/main.c --- a/pppd/main.c
--- ppp-2.4.4.orig/pppd/main.c 2009-05-07 22:25:24.000000000 -0400 +++ b/pppd/main.c
+++ ppp-2.4.4/pppd/main.c 2009-05-07 22:22:40.000000000 -0400
@@ -90,6 +90,7 @@ @@ -90,6 +90,7 @@
#include <sys/socket.h> #include <sys/socket.h>
#include <netinet/in.h> #include <netinet/in.h>
@ -9,7 +8,7 @@ diff -Naur ppp-2.4.4.orig/pppd/main.c ppp-2.4.4/pppd/main.c
#include "pppd.h" #include "pppd.h"
#include "magic.h" #include "magic.h"
@@ -227,6 +228,7 @@ @@ -227,6 +228,7 @@ static struct subprocess *children;
/* Prototypes for procedures local to this file. */ /* Prototypes for procedures local to this file. */
@ -17,7 +16,7 @@ diff -Naur ppp-2.4.4.orig/pppd/main.c ppp-2.4.4/pppd/main.c
static void setup_signals __P((void)); static void setup_signals __P((void));
static void create_pidfile __P((int pid)); static void create_pidfile __P((int pid));
static void create_linkpidfile __P((int pid)); static void create_linkpidfile __P((int pid));
@@ -532,6 +534,7 @@ @@ -532,6 +534,7 @@ main(argc, argv)
info("Starting link"); info("Starting link");
} }
@ -25,7 +24,7 @@ diff -Naur ppp-2.4.4.orig/pppd/main.c ppp-2.4.4/pppd/main.c
gettimeofday(&start_time, NULL); gettimeofday(&start_time, NULL);
script_unsetenv("CONNECT_TIME"); script_unsetenv("CONNECT_TIME");
script_unsetenv("BYTES_SENT"); script_unsetenv("BYTES_SENT");
@@ -1264,6 +1267,36 @@ @@ -1264,6 +1267,36 @@ struct callout {
static struct callout *callout = NULL; /* Callout list */ static struct callout *callout = NULL; /* Callout list */
static struct timeval timenow; /* Current time */ static struct timeval timenow; /* Current time */
@ -62,7 +61,7 @@ diff -Naur ppp-2.4.4.orig/pppd/main.c ppp-2.4.4/pppd/main.c
/* /*
* timeout - Schedule a timeout. * timeout - Schedule a timeout.
@@ -1334,6 +1367,8 @@ @@ -1334,6 +1367,8 @@ calltimeout()
{ {
struct callout *p; struct callout *p;
@ -71,7 +70,7 @@ diff -Naur ppp-2.4.4.orig/pppd/main.c ppp-2.4.4/pppd/main.c
while (callout != NULL) { while (callout != NULL) {
p = callout; p = callout;
@@ -1361,6 +1396,8 @@ @@ -1361,6 +1396,8 @@ timeleft(tvp)
{ {
if (callout == NULL) if (callout == NULL)
return NULL; return NULL;

View File

@ -1,7 +1,6 @@
diff -Naur ppp-2.4.4.orig/pppd/lcp.c ppp-2.4.4/pppd/lcp.c --- a/pppd/lcp.c
--- ppp-2.4.4.orig/pppd/lcp.c 2009-05-07 22:24:09.000000000 -0400 +++ b/pppd/lcp.c
+++ ppp-2.4.4/pppd/lcp.c 2009-05-07 22:26:57.000000000 -0400 @@ -1904,12 +1904,12 @@ lcp_up(f)
@@ -1904,12 +1904,12 @@
* the interface MTU is set to the lowest of that, the * the interface MTU is set to the lowest of that, the
* MTU we want to use, and our link MRU. * MTU we want to use, and our link MRU.
*/ */

View File

@ -1,7 +1,6 @@
diff -Naur ppp-2.4.4.orig/pppd/Makefile.linux ppp-2.4.4/pppd/Makefile.linux --- a/pppd/Makefile.linux
--- ppp-2.4.4.orig/pppd/Makefile.linux 2009-05-07 22:25:24.000000000 -0400 +++ b/pppd/Makefile.linux
+++ ppp-2.4.4/pppd/Makefile.linux 2009-05-07 22:28:44.000000000 -0400 @@ -170,8 +170,8 @@ endif
@@ -170,8 +170,8 @@
ifdef FILTER ifdef FILTER
ifneq ($(wildcard /usr/include/pcap-bpf.h),) ifneq ($(wildcard /usr/include/pcap-bpf.h),)

View File

@ -1,7 +1,6 @@
diff -Naur ppp-2.4.4.orig/pppd/Makefile.linux ppp-2.4.4/pppd/Makefile.linux --- a/pppd/Makefile.linux
--- ppp-2.4.4.orig/pppd/Makefile.linux 2009-05-07 22:31:54.000000000 -0400 +++ b/pppd/Makefile.linux
+++ ppp-2.4.4/pppd/Makefile.linux 2009-05-07 22:33:12.000000000 -0400 @@ -50,6 +50,9 @@ MPPE=y
@@ -50,6 +50,9 @@
# and that the kernel driver support PPP packet filtering. # and that the kernel driver support PPP packet filtering.
#FILTER=y #FILTER=y
@ -11,7 +10,7 @@ diff -Naur ppp-2.4.4.orig/pppd/Makefile.linux ppp-2.4.4/pppd/Makefile.linux
# Uncomment the next line to enable multilink PPP (enabled by default) # Uncomment the next line to enable multilink PPP (enabled by default)
# Linux distributions: Please leave multilink ENABLED in your builds # Linux distributions: Please leave multilink ENABLED in your builds
# of pppd! # of pppd!
@@ -175,6 +178,14 @@ @@ -175,6 +178,14 @@ CFLAGS += -DPPP_FILTER -I$(STAGING_DIR)
endif endif
endif endif
@ -26,9 +25,8 @@ diff -Naur ppp-2.4.4.orig/pppd/Makefile.linux ppp-2.4.4/pppd/Makefile.linux
ifdef HAVE_INET6 ifdef HAVE_INET6
PPPDSRCS += ipv6cp.c eui64.c PPPDSRCS += ipv6cp.c eui64.c
HEADERS += ipv6cp.h eui64.h HEADERS += ipv6cp.h eui64.h
diff -Naur ppp-2.4.4.orig/pppd/options.c ppp-2.4.4/pppd/options.c --- a/pppd/options.c
--- ppp-2.4.4.orig/pppd/options.c 2009-05-07 22:25:24.000000000 -0400 +++ b/pppd/options.c
+++ ppp-2.4.4/pppd/options.c 2009-05-07 22:38:28.000000000 -0400
@@ -57,6 +57,7 @@ @@ -57,6 +57,7 @@
#ifdef PPP_FILTER #ifdef PPP_FILTER
@ -37,7 +35,7 @@ diff -Naur ppp-2.4.4.orig/pppd/options.c ppp-2.4.4/pppd/options.c
/* /*
* There have been 3 or 4 different names for this in libpcap CVS, but * There have been 3 or 4 different names for this in libpcap CVS, but
* this seems to be what they have settled on... * this seems to be what they have settled on...
@@ -160,6 +161,13 @@ @@ -160,6 +161,13 @@ static int setlogfile __P((char **));
static int loadplugin __P((char **)); static int loadplugin __P((char **));
#endif #endif
@ -51,7 +49,7 @@ diff -Naur ppp-2.4.4.orig/pppd/options.c ppp-2.4.4/pppd/options.c
#ifdef PPP_FILTER #ifdef PPP_FILTER
static int setpassfilter __P((char **)); static int setpassfilter __P((char **));
static int setactivefilter __P((char **)); static int setactivefilter __P((char **));
@@ -317,6 +325,14 @@ @@ -317,6 +325,14 @@ option_t general_options[] = {
"set filter for active pkts", OPT_PRIO }, "set filter for active pkts", OPT_PRIO },
#endif #endif
@ -66,7 +64,7 @@ diff -Naur ppp-2.4.4.orig/pppd/options.c ppp-2.4.4/pppd/options.c
#ifdef MAXOCTETS #ifdef MAXOCTETS
{ "maxoctets", o_int, &maxoctets, { "maxoctets", o_int, &maxoctets,
"Set connection traffic limit", "Set connection traffic limit",
@@ -1456,6 +1472,29 @@ @@ -1456,6 +1472,29 @@ callfile(argv)
return ok; return ok;
} }
@ -96,9 +94,8 @@ diff -Naur ppp-2.4.4.orig/pppd/options.c ppp-2.4.4/pppd/options.c
#ifdef PPP_FILTER #ifdef PPP_FILTER
/* /*
* setpassfilter - Set the pass filter for packets * setpassfilter - Set the pass filter for packets
diff -Naur ppp-2.4.4.orig/pppd/pcap_pcc.c ppp-2.4.4/pppd/pcap_pcc.c --- /dev/null
--- ppp-2.4.4.orig/pppd/pcap_pcc.c 1969-12-31 19:00:00.000000000 -0500 +++ b/pppd/pcap_pcc.c
+++ ppp-2.4.4/pppd/pcap_pcc.c 2009-05-07 22:33:12.000000000 -0400
@@ -0,0 +1,74 @@ @@ -0,0 +1,74 @@
+#include <pcap.h> +#include <pcap.h>
+#include <pcap-bpf.h> +#include <pcap-bpf.h>
@ -174,9 +171,8 @@ diff -Naur ppp-2.4.4.orig/pppd/pcap_pcc.c ppp-2.4.4/pppd/pcap_pcc.c
+ fclose (f); + fclose (f);
+ return 0; + return 0;
+} +}
diff -Naur ppp-2.4.4.orig/pppd/pcap_pcc.h ppp-2.4.4/pppd/pcap_pcc.h --- /dev/null
--- ppp-2.4.4.orig/pppd/pcap_pcc.h 1969-12-31 19:00:00.000000000 -0500 +++ b/pppd/pcap_pcc.h
+++ ppp-2.4.4/pppd/pcap_pcc.h 2009-05-07 22:33:12.000000000 -0400
@@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
+#ifndef PCAP_PCC_H +#ifndef PCAP_PCC_H
+#define PCAP_PCC_H +#define PCAP_PCC_H