refresh patches

SVN-Revision: 15958
This commit is contained in:
Hauke Mehrtens 2009-05-21 10:49:21 +00:00
parent b97b54291d
commit d21f38210a
22 changed files with 277 additions and 332 deletions

View File

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

View File

@ -1,7 +1,6 @@
diff -Naur ppp-2.4.4.orig/pppd/ipcp.c ppp-2.4.4/pppd/ipcp.c
--- ppp-2.4.4.orig/pppd/ipcp.c 2005-08-25 19:59:34.000000000 -0400
+++ ppp-2.4.4/pppd/ipcp.c 2009-05-07 15:47:29.000000000 -0400
@@ -1850,7 +1850,7 @@
--- a/pppd/ipcp.c
+++ b/pppd/ipcp.c
@@ -1850,7 +1850,7 @@ ipcp_up(f)
*/
if (ipcp_script_state == s_down && ipcp_script_pid == 0) {
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 */
if (ipcp_script_state == s_up && ipcp_script_pid == 0) {
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:
if (ipcp_fsm[0].state != OPENED) {
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;
}
diff -Naur ppp-2.4.4.orig/pppd/main.c ppp-2.4.4/pppd/main.c
--- ppp-2.4.4.orig/pppd/main.c 2006-06-03 23:52:50.000000000 -0400
+++ ppp-2.4.4/pppd/main.c 2009-05-07 15:47:29.000000000 -0400
@@ -315,6 +315,9 @@
--- a/pppd/main.c
+++ b/pppd/main.c
@@ -315,6 +315,9 @@ main(argc, argv)
struct protent *protp;
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;
new_phase(PHASE_INITIALIZE);
diff -Naur ppp-2.4.4.orig/pppd/options.c ppp-2.4.4/pppd/options.c
--- ppp-2.4.4.orig/pppd/options.c 2006-06-18 07:26:00.000000000 -0400
+++ ppp-2.4.4/pppd/options.c 2009-05-07 15:47:29.000000000 -0400
@@ -113,6 +113,8 @@
--- a/pppd/options.c
+++ b/pppd/options.c
@@ -113,6 +113,8 @@ char linkname[MAXPATHLEN]; /* logical na
bool tune_kernel; /* may alter kernel settings */
int connect_delay = 1000; /* wait this many ms after connect script */
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 */
char *bundle_name = NULL; /* bundle name for multilink */
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",
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
{ "multilink", o_bool, &multilink,
"Enable multilink operation", OPT_PRIO | 1 },
diff -Naur ppp-2.4.4.orig/pppd/pppd.h ppp-2.4.4/pppd/pppd.h
--- ppp-2.4.4.orig/pppd/pppd.h 2005-08-25 19:59:34.000000000 -0400
+++ ppp-2.4.4/pppd/pppd.h 2009-05-07 15:47:29.000000000 -0400
@@ -312,6 +312,8 @@
--- a/pppd/pppd.h
+++ b/pppd/pppd.h
@@ -312,6 +312,8 @@ extern bool tune_kernel; /* May alter ke
extern int connect_delay; /* Time to delay after connect script */
extern int max_data_rate; /* max bytes/sec through charshunt */
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
--- ppp-2.4.4.orig/pppd/sys-linux.c 2005-08-26 18:44:35.000000000 -0400
+++ ppp-2.4.4/pppd/sys-linux.c 2009-05-07 15:50:00.000000000 -0400
@@ -453,6 +453,13 @@
--- a/pppd/sys-linux.c
+++ b/pppd/sys-linux.c
@@ -453,6 +453,13 @@ int generic_establish_ppp (int fd)
if (new_style_driver) {
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
--- ppp-2.4.4.orig/pppd/main.c 2009-05-07 15:49:34.000000000 -0400
+++ ppp-2.4.4/pppd/main.c 2009-05-07 15:53:42.000000000 -0400
@@ -1570,6 +1570,8 @@
--- a/pppd/main.c
+++ b/pppd/main.c
@@ -1570,6 +1570,8 @@ safe_fork(int infd, int outfd, int errfd
if (errfd == 0 || errfd == 1)
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 */
if (infd != 0)
dup2(infd, 0);
@@ -1578,7 +1580,6 @@
@@ -1578,7 +1580,6 @@ safe_fork(int infd, int outfd, int errfd
if (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
--- ppp-2.4.4.orig/pppd/main.c 2009-05-07 15:58:00.000000000 -0400
+++ ppp-2.4.4/pppd/main.c 2009-05-07 15:58:19.000000000 -0400
@@ -772,8 +772,7 @@
--- a/pppd/main.c
+++ b/pppd/main.c
@@ -772,8 +772,7 @@ detach()
/* update pid files if they have been written already */
if (pidfilename[0])
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
--- ppp-2.4.4.orig/pppd/chap_ms.c 2006-05-21 07:56:40.000000000 -0400
+++ ppp-2.4.4/pppd/chap_ms.c 2009-05-07 16:13:09.000000000 -0400
@@ -852,7 +852,7 @@
--- a/pppd/chap_ms.c
+++ b/pppd/chap_ms.c
@@ -852,7 +852,7 @@ ChapMS2(u_char *rchallenge, u_char *Peer
u_char *p = &response[MS_CHAP2_PEER_CHALLENGE];
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
--- ppp-2.4.4.orig/pppd/demand.c 2005-08-25 08:14:18.000000000 -0400
+++ ppp-2.4.4/pppd/demand.c 2009-05-07 16:16:20.000000000 -0400
--- a/pppd/demand.c
+++ b/pppd/demand.c
@@ -36,6 +36,8 @@
#include <errno.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
#include <pcap-bpf.h>
#endif
@@ -221,6 +225,14 @@
@@ -221,6 +225,14 @@ loop_chars(p, n)
int c, rv;
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) {
c = *p++;
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.
*/
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);
free(pkt);
} else {
diff -Naur ppp-2.4.4.orig/pppd/ipcp.c ppp-2.4.4/pppd/ipcp.c
--- ppp-2.4.4.orig/pppd/ipcp.c 2009-05-07 15:49:34.000000000 -0400
+++ ppp-2.4.4/pppd/ipcp.c 2009-05-07 16:16:20.000000000 -0400
@@ -1776,7 +1776,7 @@
--- a/pppd/ipcp.c
+++ b/pppd/ipcp.c
@@ -1776,7 +1776,7 @@ ipcp_up(f)
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);
} else {
diff -Naur ppp-2.4.4.orig/pppd/ipv6cp.c ppp-2.4.4/pppd/ipv6cp.c
--- ppp-2.4.4.orig/pppd/ipv6cp.c 2005-08-25 19:59:34.000000000 -0400
+++ ppp-2.4.4/pppd/ipv6cp.c 2009-05-07 16:16:20.000000000 -0400
@@ -1232,7 +1232,7 @@
--- a/pppd/ipv6cp.c
+++ b/pppd/ipv6cp.c
@@ -1232,7 +1232,7 @@ ipv6cp_up(f)
}
}
@ -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);
} else {
diff -Naur ppp-2.4.4.orig/pppd/pppd.h ppp-2.4.4/pppd/pppd.h
--- ppp-2.4.4.orig/pppd/pppd.h 2009-05-07 15:49:34.000000000 -0400
+++ ppp-2.4.4/pppd/pppd.h 2009-05-07 16:16:20.000000000 -0400
@@ -565,7 +565,7 @@
--- a/pppd/pppd.h
+++ b/pppd/pppd.h
@@ -565,7 +565,7 @@ void demand_conf __P((void)); /* config
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_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
--- ppp-2.4.4.orig/pppd/chap-new.c 2005-07-13 06:41:58.000000000 -0400
+++ ppp-2.4.4/pppd/chap-new.c 2009-05-07 16:18:37.000000000 -0400
@@ -57,6 +57,7 @@
--- a/pppd/chap-new.c
+++ b/pppd/chap-new.c
@@ -57,6 +57,7 @@ int (*chap_verify_hook)(char *name, char
int chap_timeout_time = 3;
int chap_max_transmits = 10;
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.
@@ -68,6 +69,8 @@
@@ -68,6 +69,8 @@ static option_t chap_option_list[] = {
"Set max #xmits for challenge", OPT_PRIO },
{ "chap-interval", o_int, &chap_rechallenge_time,
"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 }
};
@@ -335,6 +338,14 @@
@@ -335,6 +338,14 @@ chap_handle_response(struct chap_server_
/* Null terminate and clean remote name. */
slprintf(rname, sizeof(rname), "%.*v", len, name);
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
--- ppp-2.4.4.orig/pppd/plugins/pppoatm/pppoatm.c 2006-05-21 08:44:41.000000000 -0400
+++ ppp-2.4.4/pppd/plugins/pppoatm/pppoatm.c 2009-05-07 16:22:22.000000000 -0400
@@ -70,18 +70,20 @@
--- a/pppd/plugins/pppoatm/pppoatm.c
+++ b/pppd/plugins/pppoatm/pppoatm.c
@@ -70,18 +70,20 @@ static int setdevname_pppoatm(const char
{
struct sockaddr_atmpvc addr;
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);
strlcpy(devnam, cp, sizeof devnam);
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_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;
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)
{
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;
if (!llc_encaps)
be.encaps = PPPOATM_ENCAPS_VC;
@@ -115,6 +117,7 @@
@@ -115,6 +117,7 @@ static void set_line_discipline_pppoatm(
be.encaps = PPPOATM_ENCAPS_LLC;
else
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)
fatal("ioctl(ATM_SETBACKEND): %m");
}
@@ -175,16 +178,19 @@
@@ -175,16 +178,19 @@ static void send_config_pppoa(int mtu,
{
int sock;
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,
@@ -198,7 +204,7 @@
@@ -198,7 +204,7 @@ static void recv_config_pppoa(int mru,
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 */
if (!ppp_available() && !new_style_driver)
fatal("Kernel doesn't support ppp_generic - "
@@ -206,9 +212,9 @@
@@ -206,9 +212,9 @@ void plugin_init(void)
#else
fatal("No PPPoATM support on this OS");
#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
--- ppp-2.4.4.orig/pppd/plugins/pppoatm/pppoatm.c 2009-05-07 16:23:41.000000000 -0400
+++ ppp-2.4.4/pppd/plugins/pppoatm/pppoatm.c 2009-05-07 16:23:57.000000000 -0400
@@ -179,8 +179,11 @@
--- a/pppd/plugins/pppoatm/pppoatm.c
+++ b/pppd/plugins/pppoatm/pppoatm.c
@@ -179,8 +179,11 @@ static void send_config_pppoa(int mtu,
int sock;
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);
if (sock < 0)
@@ -198,8 +201,11 @@
@@ -198,8 +201,11 @@ static void recv_config_pppoa(int mru,
int pcomp,
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
--- ppp-2.4.4.orig/pppd/plugins/rp-pppoe/common.c 2004-02-01 22:36:46.000000000 -0500
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/common.c 2009-05-07 17:01:46.000000000 -0400
@@ -18,10 +18,6 @@
--- a/pppd/plugins/rp-pppoe/common.c
+++ b/pppd/plugins/rp-pppoe/common.c
@@ -18,10 +18,6 @@ static char const RCSID[] =
#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 <errno.h>
#include <stdlib.h>
@@ -50,17 +46,17 @@
@@ -50,17 +46,17 @@ parsePacket(PPPoEPacket *packet, ParseFu
UINT16_t tagType, tagLen;
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;
}
@@ -76,7 +72,7 @@
@@ -76,7 +72,7 @@ parsePacket(PPPoEPacket *packet, ParseFu
return 0;
}
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;
}
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;
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;
}
@@ -131,7 +127,7 @@
@@ -131,7 +127,7 @@ findTag(PPPoEPacket *packet, UINT16_t ty
return NULL;
}
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;
}
if (tagType == type) {
@@ -143,6 +139,7 @@
@@ -143,6 +139,7 @@ findTag(PPPoEPacket *packet, UINT16_t ty
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
*%ARGUMENTS:
@@ -158,6 +155,7 @@
@@ -158,6 +155,7 @@ printErr(char const *str)
fprintf(stderr, "pppoe: %s\n", 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);
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);
return copy;
@@ -467,9 +465,10 @@
@@ -467,9 +465,10 @@ sendPADT(PPPoEConnection *conn, char con
fprintf(conn->debugFile, "\n");
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
*%ARGUMENTS:
@@ -501,4 +500,5 @@
@@ -501,4 +500,5 @@ parseLogErrs(UINT16_t type, UINT16_t len
break;
}
}
+#endif
diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/discovery.c ppp-2.4.4/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
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/discovery.c 2009-05-07 17:01:46.000000000 -0400
@@ -13,10 +13,6 @@
--- a/pppd/plugins/rp-pppoe/discovery.c
+++ b/pppd/plugins/rp-pppoe/discovery.c
@@ -13,10 +13,6 @@ static char const RCSID[] =
#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 <stdlib.h>
#include <errno.h>
@@ -167,24 +163,21 @@
@@ -167,24 +163,21 @@ parsePADOTags(UINT16_t type, UINT16_t le
if (conn->printACNames) {
printf("Got a Service-Name-Error tag: %.*s\n", (int) len, data);
} 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;
}
@@ -209,20 +202,14 @@
@@ -209,20 +202,14 @@ parsePADSTags(UINT16_t type, UINT16_t le
PPPoEConnection *conn = (PPPoEConnection *) extra;
switch(type) {
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:
conn->relayId.type = htons(type);
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) {
@ -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 */
}
@@ -346,8 +333,7 @@
@@ -346,8 +333,7 @@ waitForPADO(PPPoEConnection *conn, int t
/* Check length */
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;
}
@@ -366,16 +352,16 @@
@@ -366,16 +352,16 @@ waitForPADO(PPPoEConnection *conn, int t
if (packet.code == CODE_PADO) {
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;
}
conn->numPADOs++;
@@ -513,7 +499,7 @@
@@ -513,7 +499,7 @@ waitForPADS(PPPoEConnection *conn, int t
if (r >= 0 || errno != EINTR) break;
}
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;
}
@@ -523,8 +509,7 @@
@@ -523,8 +509,7 @@ waitForPADS(PPPoEConnection *conn, int t
/* Check length */
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;
}
@@ -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... */
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 (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;
diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.4/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
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/if.c 2009-05-07 17:01:46.000000000 -0400
@@ -40,10 +40,6 @@
--- a/pppd/plugins/rp-pppoe/if.c
+++ b/pppd/plugins/rp-pppoe/if.c
@@ -40,10 +40,6 @@ static char const RCSID[] =
#include <sys/ioctl.h>
#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 <stdlib.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);
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;
}
@@ -156,7 +152,7 @@
@@ -156,7 +152,7 @@ getHWaddr(int sock, char const *ifname,
ifc.ifc_len = sizeof(inbuf);
ifc.ifc_buf = inbuf;
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;
ifreq.ifr_name[0] = '\0';
@@ -172,9 +168,7 @@
@@ -172,9 +168,7 @@ getHWaddr(int sock, char const *ifname,
(sdl->sdl_alen == ETH_ALEN) &&
!strncmp(ifname, ifr->ifr_name, sizeof(ifr->ifr_name))) {
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 {
found = 1;
memcpy(hwaddr, LLADDR(sdl), ETH_ALEN);
@@ -183,9 +177,7 @@
@@ -183,9 +177,7 @@ getHWaddr(int sock, char const *ifname,
}
}
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 */
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) {
switch (errno) {
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);
initFilter(fd, type, hwaddr);
@@ -342,58 +328,52 @@
@@ -342,58 +328,52 @@ openInterface(char const *ifname, UINT16
#if !defined(__OpenBSD__)
strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
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,
hwaddr[0], hwaddr[1], hwaddr[2],
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) {
/* Give a more helpful message for the common error case */
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
@@ -493,7 +466,7 @@
@@ -493,7 +466,7 @@ openInterface(char const *ifname, UINT16
strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
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;
@@ -503,7 +476,7 @@
@@ -503,7 +476,7 @@ openInterface(char const *ifname, UINT16
/* We're only interested in packets on specified interface */
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;
@@ -527,13 +500,11 @@
@@ -527,13 +500,11 @@ sendPacket(PPPoEConnection *conn, int so
{
#if defined(USE_BPF)
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
#ifdef USE_DLPI
@@ -577,12 +548,11 @@
@@ -577,12 +548,11 @@ sendPacket(PPPoEConnection *conn, int so
struct sockaddr sa;
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
@@ -632,26 +602,24 @@
@@ -632,26 +602,24 @@ receivePacket(int sock, PPPoEPacket *pkt
if (bpfSize <= 0) {
bpfOffset = 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 */
return 0;
}
@@ -676,16 +644,14 @@
@@ -676,16 +644,14 @@ receivePacket(int sock, PPPoEPacket *pkt
data.len = 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
@@ -716,7 +682,7 @@
@@ -716,7 +682,7 @@ openInterface(char const *ifname, UINT16
int ppa;
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]);
@@ -729,9 +695,9 @@
@@ -729,9 +695,9 @@ openInterface(char const *ifname, UINT16
if (( fd = open(base_dev, O_RDWR)) < 0) {
/* Give a more helpful message for the common error case */
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 */
@@ -747,17 +713,18 @@
@@ -747,17 +713,18 @@ openInterface(char const *ifname, UINT16
dl_abssaplen = ABS(dlp->info_ack.dl_sap_length);
dl_saplen = dlp->info_ack.dl_sap_length;
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;
}
@@ -780,7 +747,7 @@
@@ -780,7 +747,7 @@ void dlpromisconreq(int fd, u_long level
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;
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)
@@ -827,7 +794,7 @@
@@ -827,7 +794,7 @@ void dlunitdatareq(int fd, u_char *addrp
data.buf = (char *) datap;
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)
@@ -847,18 +814,14 @@
@@ -847,18 +814,14 @@ void dlinfoack(int fd, char *bufp)
expecting(DL_INFO_ACK, dlp);
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;
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)
@@ -901,7 +864,7 @@
@@ -901,7 +864,7 @@ void dlattachreq(int fd, u_long ppa)
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)
@@ -921,18 +884,14 @@
@@ -921,18 +884,14 @@ void dlokack(int fd, char *bufp)
expecting(DL_OK_ACK, dlp);
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);
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);
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;
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
--- ppp-2.4.4.orig/pppd/plugins/rp-pppoe/Makefile.linux 2006-06-04 01:07:46.000000000 -0400
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/Makefile.linux 2009-05-07 17:01:46.000000000 -0400
@@ -28,8 +28,8 @@
--- a/pppd/plugins/rp-pppoe/Makefile.linux
+++ b/pppd/plugins/rp-pppoe/Makefile.linux
@@ -28,8 +28,8 @@ COPTS=-O2 -g
CFLAGS=$(COPTS) -I../../../include/linux
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
$(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
--- ppp-2.4.4.orig/pppd/plugins/rp-pppoe/plugin.c 2006-05-29 19:29:16.000000000 -0400
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/plugin.c 2009-05-07 17:01:46.000000000 -0400
@@ -35,7 +35,6 @@
--- a/pppd/plugins/rp-pppoe/plugin.c
+++ b/pppd/plugins/rp-pppoe/plugin.c
@@ -35,7 +35,6 @@ static char const RCSID[] =
#include "pppd/pathnames.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/types.h>
#include <sys/socket.h>
@@ -173,10 +172,8 @@
@@ -173,10 +172,8 @@ PPPOEConnectDevice(void)
(unsigned) conn->peerEth[5]);
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;
}
@@ -320,11 +317,9 @@
@@ -320,11 +317,9 @@ plugin_init(void)
}
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
*%ARGUMENTS:
@@ -378,6 +373,7 @@
@@ -378,6 +373,7 @@ sysErr(char const *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)
{
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
--- ppp-2.4.4.orig/pppd/plugins/rp-pppoe/pppoe-discovery.c 2004-11-13 07:12:05.000000000 -0500
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/pppoe-discovery.c 2009-05-07 17:01:46.000000000 -0400
--- a/pppd/plugins/rp-pppoe/pppoe-discovery.c
+++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c
@@ -17,14 +17,8 @@
#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 opt;
@@ -32,17 +26,17 @@
@@ -32,17 +26,17 @@ int main(int argc, char *argv[])
conn = malloc(sizeof(PPPoEConnection));
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;
case 'U':
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);
break;
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;
case 'A':
/* this is the default */
@@ -74,7 +68,7 @@
@@ -74,7 +68,7 @@ int main(int argc, char *argv[])
/* default interface name */
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->sessionSocket = -1;
@@ -84,39 +78,6 @@
@@ -84,39 +78,6 @@ int main(int argc, char *argv[])
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)
{
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
--- ppp-2.4.4.orig/pppd/plugins/rp-pppoe/pppoe.h 2004-11-04 05:07:37.000000000 -0500
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/pppoe.h 2009-05-07 17:01:46.000000000 -0400
@@ -307,12 +307,18 @@
--- a/pppd/plugins/rp-pppoe/pppoe.h
+++ b/pppd/plugins/rp-pppoe/pppoe.h
@@ -307,12 +307,18 @@ void discovery(PPPoEConnection *conn);
unsigned char *findTag(PPPoEPacket *packet, UINT16_t tagType,
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; \
} \
} 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
--- ppp-2.4.4.orig/pppd/plugins/rp-pppoe/utils.c 1969-12-31 19:00:00.000000000 -0500
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/utils.c 2009-05-07 17:01:46.000000000 -0400
--- /dev/null
+++ b/pppd/plugins/rp-pppoe/utils.c
@@ -0,0 +1,62 @@
+#include <stdio.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
--- ppp-2.4.4.orig/pppd/ipcp.c 2009-05-09 02:55:46.000000000 -0400
+++ ppp-2.4.4/pppd/ipcp.c 2009-05-09 02:58:31.000000000 -0400
@@ -197,6 +197,14 @@
--- a/pppd/ipcp.c
+++ b/pppd/ipcp.c
@@ -197,6 +197,14 @@ static option_t ipcp_option_list[] = {
"disable defaultroute option", OPT_ALIAS | OPT_A2CLR,
&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,
"Add proxy ARP entry", OPT_ENABLE|1, &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
};
@ -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_done __P((void *));
@@ -1660,7 +1668,8 @@
@@ -1660,7 +1668,8 @@ ip_demand_conf(u)
if (!sifnpmode(u, PPP_IP, NPMODE_QUEUE))
return 0;
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;
if (wo->proxy_arp)
if (sifproxyarp(u, wo->hisaddr))
@@ -1742,7 +1751,8 @@
@@ -1742,7 +1751,8 @@ ipcp_up(f)
*/
if (demand) {
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) {
warn("Local IP address changed to %I", go->ouraddr);
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 */
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;
/* 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 */
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;
/* 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);
sifdown(f->unit);
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 */
@@ -1910,16 +1922,25 @@
@@ -1910,16 +1922,25 @@ ipcp_down(f)
* proxy arp entries, etc.
*/
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);
default_route_set[unit] = 0;
}
diff -Naur ppp-2.4.4.orig/pppd/ipcp.h ppp-2.4.4/pppd/ipcp.h
--- ppp-2.4.4.orig/pppd/ipcp.h 2009-05-09 02:54:59.000000000 -0400
+++ ppp-2.4.4/pppd/ipcp.h 2009-05-09 02:58:31.000000000 -0400
@@ -70,6 +70,7 @@
--- a/pppd/ipcp.h
+++ b/pppd/ipcp.h
@@ -70,6 +70,7 @@ typedef struct ipcp_options {
bool old_addrs; /* Use old (IP-Addresses) option? */
bool req_addr; /* Ask peer to send IP address? */
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 neg_vj; /* Van Jacobson Compression? */
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
--- ppp-2.4.4.orig/pppd/pppd.8 2009-05-09 02:54:59.000000000 -0400
+++ ppp-2.4.4/pppd/pppd.8 2009-05-09 02:58:31.000000000 -0400
@@ -121,6 +121,11 @@
--- a/pppd/pppd.8
+++ b/pppd/pppd.8
@@ -121,6 +121,11 @@ the gateway, when IPCP negotiation is su
This entry is removed when the PPP connection is broken. This option
is privileged if the \fInodefaultroute\fR option has been specified.
.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
Execute the command specified by \fIscript\fR, by passing it to a
shell, after
@@ -706,7 +711,12 @@
@@ -706,7 +711,12 @@ disable both forms of hardware flow cont
.TP
.B nodefaultroute
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.
.TP
.B nodeflate
diff -Naur ppp-2.4.4.orig/pppd/pppd.h ppp-2.4.4/pppd/pppd.h
--- ppp-2.4.4.orig/pppd/pppd.h 2009-05-09 02:55:46.000000000 -0400
+++ ppp-2.4.4/pppd/pppd.h 2009-05-09 02:58:31.000000000 -0400
@@ -644,7 +644,7 @@
--- a/pppd/pppd.h
+++ b/pppd/pppd.h
@@ -644,7 +644,7 @@ int sif6addr __P((int, eui64_t, eui64_t
int cif6addr __P((int, eui64_t, eui64_t));
/* Remove an IPv6 address from i/f */
#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 */
int cifdefaultroute __P((int, u_int32_t, u_int32_t));
/* 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
--- ppp-2.4.4.orig/pppd/sys-linux.c 2009-05-09 02:55:46.000000000 -0400
+++ ppp-2.4.4/pppd/sys-linux.c 2009-05-09 02:58:31.000000000 -0400
@@ -206,6 +206,8 @@
--- a/pppd/sys-linux.c
+++ b/pppd/sys-linux.c
@@ -206,6 +206,8 @@ static unsigned char inbuf[512]; /* buff
static int if_is_up; /* Interface has been marked up */
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 char proxy_arp_dev[16]; /* Device for proxy arp entry */
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;
}
@ -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_gateway) = strtoul(cols[route_gw_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.
@ -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));
@@ -1617,10 +1653,16 @@
@@ -1617,10 +1653,16 @@ int sifdefaultroute (int unit, u_int32_t
rt.rt_flags = RTF_UP;
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;
return 1;
@@ -1649,11 +1691,21 @@
@@ -1649,11 +1691,21 @@ int cifdefaultroute (int unit, u_int32_t
rt.rt_flags = RTF_UP;
if (ioctl(sock_fd, SIOCDELRT, &rt) < 0 && errno != ESRCH) {
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;
}
diff -Naur ppp-2.4.4.orig/pppd/sys-solaris.c ppp-2.4.4/pppd/sys-solaris.c
--- ppp-2.4.4.orig/pppd/sys-solaris.c 2009-05-09 02:54:59.000000000 -0400
+++ ppp-2.4.4/pppd/sys-solaris.c 2009-05-09 02:58:31.000000000 -0400
@@ -2036,12 +2036,18 @@
--- a/pppd/sys-solaris.c
+++ b/pppd/sys-solaris.c
@@ -2036,12 +2036,18 @@ cifaddr(u, o, h)
* sifdefaultroute - assign a default route through the address given.
*/
int

View File

@ -1,7 +1,6 @@
diff -Naur ppp-2.4.4.orig/pppd/Makefile.linux ppp-2.4.4/pppd/Makefile.linux
--- ppp-2.4.4.orig/pppd/Makefile.linux 2009-05-08 23:17:17.000000000 -0400
+++ ppp-2.4.4/pppd/Makefile.linux 2009-05-08 23:18:37.000000000 -0400
@@ -48,21 +48,21 @@
--- a/pppd/Makefile.linux
+++ b/pppd/Makefile.linux
@@ -48,21 +48,21 @@ MPPE=y
# Uncomment the next line to include support for PPP packet filtering.
# This requires that the libpcap library and headers be installed
# 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
PLUGIN=y
@@ -77,7 +77,7 @@
@@ -77,7 +77,7 @@ MAXOCTETS=y
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@"'
@@ -117,10 +117,10 @@
@@ -117,10 +117,10 @@ CFLAGS += -DHAS_SHADOW
#LIBS += -lshadow $(LIBS)
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
--- ppp-2.4.4.orig/include/linux/ppp-comp.h 2009-05-09 03:44:09.000000000 -0400
+++ ppp-2.4.4/include/linux/ppp-comp.h 2009-05-09 03:45:52.000000000 -0400
--- a/include/linux/ppp-comp.h
+++ b/include/linux/ppp-comp.h
@@ -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:
* 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 */
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 */
void (*comp_stat) (void *state, struct compstat *stats);
@@ -107,7 +107,7 @@
@@ -107,7 +107,7 @@ struct compressor {
/* Decompress a packet. */
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 */
void (*incomp) (void *state, unsigned char *ibuf, int icnt);
@@ -288,6 +288,33 @@
@@ -288,6 +288,33 @@ struct compressor {
opts |= MPPE_OPT_UNKNOWN; \
} 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.
*/
diff -Naur ppp-2.4.4.orig/include/net/ppp-comp.h ppp-2.4.4/include/net/ppp-comp.h
--- ppp-2.4.4.orig/include/net/ppp-comp.h 2009-05-09 03:44:09.000000000 -0400
+++ ppp-2.4.4/include/net/ppp-comp.h 2009-05-09 03:45:52.000000000 -0400
@@ -255,6 +255,33 @@
--- a/include/net/ppp-comp.h
+++ b/include/net/ppp-comp.h
@@ -255,6 +255,33 @@ struct compressor {
opts |= MPPE_OPT_UNKNOWN; \
} 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.
*/
diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
--- ppp-2.4.4.orig/pppd/ccp.c 2009-05-09 03:44:09.000000000 -0400
+++ ppp-2.4.4/pppd/ccp.c 2009-05-09 03:45:52.000000000 -0400
@@ -62,12 +62,10 @@
--- a/pppd/ccp.c
+++ b/pppd/ccp.c
@@ -62,12 +62,10 @@ static int setdeflate __P((char **));
static char bsd_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[] = {
{ "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,
&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 */
{ NULL }
@@ -241,7 +221,7 @@
@@ -241,7 +221,7 @@ static fsm_callbacks ccp_callbacks = {
*/
#define ANY_COMPRESS(opt) ((opt).deflate || (opt).bsd_compress \
|| (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).
@@ -344,6 +324,100 @@
@@ -344,6 +324,100 @@ setdeflate(argv)
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.
*/
@@ -378,6 +452,30 @@
@@ -378,6 +452,30 @@ ccp_init(unit)
ccp_allowoptions[0].bsd_bits = BSD_MAX_BITS;
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) {
notice("Compression disabled by peer.");
#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;
/* send a reset-ack, which the transmitter will see and
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);
break;
@@ -515,12 +622,11 @@
@@ -515,12 +622,11 @@ ccp_protrej(unit)
fsm_lowerdown(&ccp_fsm[unit]);
#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;
#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];
int auth_mschap_bits = auth_done[f->unit];
int numbits;
@@ -551,80 +657,109 @@
@@ -551,80 +657,109 @@ ccp_resetci(f)
* NB: If MPPE is required, all other compression opts are invalid.
* 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) {
opt_buf[0] = CI_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->predictor_1? CILEN_PREDICTOR_1: 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;
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;
/*
@@ -701,22 +839,43 @@
@@ -701,22 +839,43 @@ ccp_addci(f, p, lenp)
* in case it gets Acked.
*/
#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) {
p[0] = go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT;
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
@ -654,7 +651,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
*/
static int
ccp_ackci(f, p, len)
@@ -811,24 +970,44 @@
@@ -811,24 +970,44 @@ ccp_ackci(f, p, len)
int len;
{
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 (len < CILEN_DEFLATE
|| 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.
@ -717,7 +714,7 @@ diff -Naur ppp-2.4.4.orig/pppd/ccp.c ppp-2.4.4/pppd/ccp.c
*/
static int
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;
{
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 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;
#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
&& p[0] == (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT)
&& p[1] == CILEN_DEFLATE) {
@@ -1002,14 +1255,50 @@
@@ -1002,14 +1255,50 @@ ccp_rejci(f, p, len)
return -1;
#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
&& p[0] == CI_DEFLATE && p[1] == CILEN_DEFLATE) {
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 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;
retp = p0 = p;
@@ -1103,106 +1393,302 @@
@@ -1103,106 +1393,302 @@ ccp_reqci(f, p, lenp, dont_nak)
switch (type) {
#ifdef 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_DRAFT:
if (!ao->deflate || clen != CILEN_DEFLATE
@@ -1344,12 +1830,6 @@
@@ -1344,12 +1830,6 @@ ccp_reqci(f, p, lenp, dont_nak)
else
*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;
}
@@ -1371,24 +1851,35 @@
@@ -1371,24 +1851,35 @@ method_name(opt, opt2)
char *p = 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_DRAFT:
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))
notice("%s transmit compression enabled", method_name(ho, NULL));
#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");
}
}
@ -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
case CI_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_DRAFT:
if (optlen >= CILEN_DEFLATE) {
@@ -1635,6 +2130,7 @@
@@ -1635,6 +2130,7 @@ ccp_datainput(unit, pkt, len)
error("Lost compression sync: disabling compression");
ccp_close(unit, "Lost compression sync");
#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.
*/
@@ -1642,9 +2138,18 @@
@@ -1642,9 +2138,18 @@ ccp_datainput(unit, pkt, len)
error("Too many MPPE errors, closing LCP");
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.
* We don't do that if we are still waiting for an
* acknowledgement to a previous reset-request.
@@ -1675,4 +2180,3 @@
@@ -1675,4 +2180,3 @@ ccp_rack_timeout(arg)
} else
ccp_localstate[f->unit] &= ~RACK_PENDING;
}
-
diff -Naur ppp-2.4.4.orig/pppd/ccp.h ppp-2.4.4/pppd/ccp.h
--- ppp-2.4.4.orig/pppd/ccp.h 2009-05-09 03:44:09.000000000 -0400
+++ ppp-2.4.4/pppd/ccp.h 2009-05-09 03:45:52.000000000 -0400
@@ -37,9 +37,17 @@
--- a/pppd/ccp.h
+++ b/pppd/ccp.h
@@ -37,9 +37,17 @@ typedef struct ccp_options {
bool predictor_2; /* do Predictor-2? */
bool deflate_correct; /* use correct 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 */
} ccp_options;
diff -Naur ppp-2.4.4.orig/pppd/chap_ms.c ppp-2.4.4/pppd/chap_ms.c
--- ppp-2.4.4.orig/pppd/chap_ms.c 2009-05-09 03:45:07.000000000 -0400
+++ ppp-2.4.4/pppd/chap_ms.c 2009-05-09 03:45:52.000000000 -0400
@@ -897,13 +897,17 @@
--- a/pppd/chap_ms.c
+++ b/pppd/chap_ms.c
@@ -897,13 +897,17 @@ set_mppe_enc_types(int policy, int types
/*
* Disable undesirable encryption types. Note that we don't ENABLE
* 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
--- ppp-2.4.4.orig/chat/Makefile.linux 2006-06-04 01:07:46.000000000 -0400
+++ ppp-2.4.4/chat/Makefile.linux 2009-05-07 18:04:23.000000000 -0400
@@ -25,7 +25,7 @@
--- a/chat/Makefile.linux
+++ b/chat/Makefile.linux
@@ -25,7 +25,7 @@ chat.o: chat.c
install: chat
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)
clean:
diff -Naur ppp-2.4.4.orig/pppd/Makefile.linux ppp-2.4.4/pppd/Makefile.linux
--- ppp-2.4.4.orig/pppd/Makefile.linux 2009-05-07 17:04:21.000000000 -0400
+++ ppp-2.4.4/pppd/Makefile.linux 2009-05-07 18:04:23.000000000 -0400
@@ -99,7 +99,7 @@
--- a/pppd/Makefile.linux
+++ b/pppd/Makefile.linux
@@ -99,7 +99,7 @@ ifdef USE_SRP
CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
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
EXTRACLEAN += srp-entry.o
NEEDDES=y
@@ -200,7 +200,7 @@
@@ -200,7 +200,7 @@ all: $(TARGETS)
install: pppd
mkdir -p $(BINDIR) $(MANDIR)
$(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 \
chmod o-rx,u+s $(BINDIR)/pppd; fi
$(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
--- ppp-2.4.4.orig/pppd/plugins/radius/Makefile.linux 2006-06-04 01:04:14.000000000 -0400
+++ ppp-2.4.4/pppd/plugins/radius/Makefile.linux 2009-05-07 18:04:23.000000000 -0400
@@ -36,9 +36,9 @@
--- a/pppd/plugins/radius/Makefile.linux
+++ b/pppd/plugins/radius/Makefile.linux
@@ -36,9 +36,9 @@ all: $(PLUGIN)
install: all
$(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-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
--- ppp-2.4.4.orig/pppd/plugins/rp-pppoe/Makefile.linux 2009-05-07 17:02:45.000000000 -0400
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/Makefile.linux 2009-05-07 18:04:23.000000000 -0400
@@ -39,9 +39,9 @@
--- a/pppd/plugins/rp-pppoe/Makefile.linux
+++ b/pppd/plugins/rp-pppoe/Makefile.linux
@@ -39,9 +39,9 @@ rp-pppoe.so: libplugin.a plugin.o
install: all
$(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:
rm -f *.o *.so
diff -Naur ppp-2.4.4.orig/pppdump/Makefile.linux ppp-2.4.4/pppdump/Makefile.linux
--- ppp-2.4.4.orig/pppdump/Makefile.linux 2006-06-04 01:04:14.000000000 -0400
+++ ppp-2.4.4/pppdump/Makefile.linux 2009-05-07 18:04:23.000000000 -0400
@@ -17,5 +17,5 @@
--- a/pppdump/Makefile.linux
+++ b/pppdump/Makefile.linux
@@ -17,5 +17,5 @@ clean:
install:
mkdir -p $(BINDIR) $(MANDIR)
- $(INSTALL) -s -c pppdump $(BINDIR)
+ $(INSTALL) -c pppdump $(BINDIR)
$(INSTALL) -c -m 444 pppdump.8 $(MANDIR)
diff -Naur ppp-2.4.4.orig/pppstats/Makefile.linux ppp-2.4.4/pppstats/Makefile.linux
--- ppp-2.4.4.orig/pppstats/Makefile.linux 2006-06-04 01:07:46.000000000 -0400
+++ ppp-2.4.4/pppstats/Makefile.linux 2009-05-07 18:04:23.000000000 -0400
@@ -22,7 +22,7 @@
--- a/pppstats/Makefile.linux
+++ b/pppstats/Makefile.linux
@@ -22,7 +22,7 @@ all: pppstats
install: pppstats
-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
--- ppp-2.4.4.orig/pppd/plugins/radius/Makefile.linux 2009-05-07 18:05:57.000000000 -0400
+++ ppp-2.4.4/pppd/plugins/radius/Makefile.linux 2009-05-07 18:06:23.000000000 -0400
@@ -12,7 +12,8 @@
--- a/pppd/plugins/radius/Makefile.linux
+++ b/pppd/plugins/radius/Makefile.linux
@@ -12,7 +12,8 @@ VERSION = $(shell awk -F '"' '/VERSION/
INSTALL = install
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
# MS-CHAP authentication protocol.
diff -Naur ppp-2.4.4.orig/pppdump/Makefile.linux ppp-2.4.4/pppdump/Makefile.linux
--- ppp-2.4.4.orig/pppdump/Makefile.linux 2009-05-07 18:05:57.000000000 -0400
+++ ppp-2.4.4/pppdump/Makefile.linux 2009-05-07 18:06:23.000000000 -0400
@@ -2,7 +2,8 @@
--- a/pppdump/Makefile.linux
+++ b/pppdump/Makefile.linux
@@ -2,7 +2,8 @@ DESTDIR = $(INSTROOT)@DESTDIR@
BINDIR = $(DESTDIR)/sbin
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
--- ppp-2.4.4.orig/pppd/plugins/radius/config.c 2004-11-14 02:26:26.000000000 -0500
+++ ppp-2.4.4/pppd/plugins/radius/config.c 2009-05-07 19:31:14.000000000 -0400
@@ -369,31 +369,37 @@
--- a/pppd/plugins/radius/config.c
+++ b/pppd/plugins/radius/config.c
@@ -369,31 +369,37 @@ static int test_config(char *filename)
}
#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;
}
diff -Naur ppp-2.4.4.orig/pppd/plugins/radius/options.h ppp-2.4.4/pppd/plugins/radius/options.h
--- ppp-2.4.4.orig/pppd/plugins/radius/options.h 2004-11-14 02:26:26.000000000 -0500
+++ ppp-2.4.4/pppd/plugins/radius/options.h 2009-05-07 19:31:14.000000000 -0400
@@ -31,24 +31,21 @@
--- a/pppd/plugins/radius/options.h
+++ b/pppd/plugins/radius/options.h
@@ -31,24 +31,21 @@ typedef struct _option {
static SERVER acctserver = {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
--- ppp-2.4.4.orig/pppd/plugins/rp-pppoe/discovery.c 2009-05-07 19:47:30.000000000 -0400
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/discovery.c 2009-05-07 20:23:04.000000000 -0400
@@ -593,12 +593,14 @@
--- a/pppd/plugins/rp-pppoe/discovery.c
+++ b/pppd/plugins/rp-pppoe/discovery.c
@@ -593,12 +593,14 @@ discovery(PPPoEConnection *conn)
conn->discoveryState = STATE_SENT_PADI;
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) {
break;
}
@@ -621,7 +623,9 @@
@@ -621,7 +623,9 @@ discovery(PPPoEConnection *conn)
sendPADR(conn);
conn->discoveryState = STATE_SENT_PADR;
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
--- ppp-2.4.4.orig/pppd/main.c 2009-05-07 22:25:24.000000000 -0400
+++ ppp-2.4.4/pppd/main.c 2009-05-07 22:22:40.000000000 -0400
--- a/pppd/main.c
+++ b/pppd/main.c
@@ -90,6 +90,7 @@
#include <sys/socket.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 "magic.h"
@@ -227,6 +228,7 @@
@@ -227,6 +228,7 @@ static struct subprocess *children;
/* 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 create_pidfile __P((int pid));
static void create_linkpidfile __P((int pid));
@@ -532,6 +534,7 @@
@@ -532,6 +534,7 @@ main(argc, argv)
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);
script_unsetenv("CONNECT_TIME");
script_unsetenv("BYTES_SENT");
@@ -1264,6 +1267,36 @@
@@ -1264,6 +1267,36 @@ struct callout {
static struct callout *callout = NULL; /* Callout list */
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.
@@ -1334,6 +1367,8 @@
@@ -1334,6 +1367,8 @@ calltimeout()
{
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) {
p = callout;
@@ -1361,6 +1396,8 @@
@@ -1361,6 +1396,8 @@ timeleft(tvp)
{
if (callout == 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
--- ppp-2.4.4.orig/pppd/lcp.c 2009-05-07 22:24:09.000000000 -0400
+++ ppp-2.4.4/pppd/lcp.c 2009-05-07 22:26:57.000000000 -0400
@@ -1904,12 +1904,12 @@
--- a/pppd/lcp.c
+++ b/pppd/lcp.c
@@ -1904,12 +1904,12 @@ lcp_up(f)
* the interface MTU is set to the lowest of that, the
* 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
--- ppp-2.4.4.orig/pppd/Makefile.linux 2009-05-07 22:25:24.000000000 -0400
+++ ppp-2.4.4/pppd/Makefile.linux 2009-05-07 22:28:44.000000000 -0400
@@ -170,8 +170,8 @@
--- a/pppd/Makefile.linux
+++ b/pppd/Makefile.linux
@@ -170,8 +170,8 @@ endif
ifdef FILTER
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
--- ppp-2.4.4.orig/pppd/Makefile.linux 2009-05-07 22:31:54.000000000 -0400
+++ ppp-2.4.4/pppd/Makefile.linux 2009-05-07 22:33:12.000000000 -0400
@@ -50,6 +50,9 @@
--- a/pppd/Makefile.linux
+++ b/pppd/Makefile.linux
@@ -50,6 +50,9 @@ MPPE=y
# and that the kernel driver support PPP packet filtering.
#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)
# Linux distributions: Please leave multilink ENABLED in your builds
# of pppd!
@@ -175,6 +178,14 @@
@@ -175,6 +178,14 @@ CFLAGS += -DPPP_FILTER -I$(STAGING_DIR)
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
PPPDSRCS += ipv6cp.c eui64.c
HEADERS += ipv6cp.h eui64.h
diff -Naur ppp-2.4.4.orig/pppd/options.c ppp-2.4.4/pppd/options.c
--- ppp-2.4.4.orig/pppd/options.c 2009-05-07 22:25:24.000000000 -0400
+++ ppp-2.4.4/pppd/options.c 2009-05-07 22:38:28.000000000 -0400
--- a/pppd/options.c
+++ b/pppd/options.c
@@ -57,6 +57,7 @@
#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
* 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 **));
#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
static int setpassfilter __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 },
#endif
@ -66,7 +64,7 @@ diff -Naur ppp-2.4.4.orig/pppd/options.c ppp-2.4.4/pppd/options.c
#ifdef MAXOCTETS
{ "maxoctets", o_int, &maxoctets,
"Set connection traffic limit",
@@ -1456,6 +1472,29 @@
@@ -1456,6 +1472,29 @@ callfile(argv)
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
/*
* 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
--- ppp-2.4.4.orig/pppd/pcap_pcc.c 1969-12-31 19:00:00.000000000 -0500
+++ ppp-2.4.4/pppd/pcap_pcc.c 2009-05-07 22:33:12.000000000 -0400
--- /dev/null
+++ b/pppd/pcap_pcc.c
@@ -0,0 +1,74 @@
+#include <pcap.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);
+ return 0;
+}
diff -Naur ppp-2.4.4.orig/pppd/pcap_pcc.h ppp-2.4.4/pppd/pcap_pcc.h
--- ppp-2.4.4.orig/pppd/pcap_pcc.h 1969-12-31 19:00:00.000000000 -0500
+++ ppp-2.4.4/pppd/pcap_pcc.h 2009-05-07 22:33:12.000000000 -0400
--- /dev/null
+++ b/pppd/pcap_pcc.h
@@ -0,0 +1,7 @@
+#ifndef PCAP_PCC_H
+#define PCAP_PCC_H