- re-base to latest upstream

This commit is contained in:
Jiri Skala 2009-12-11 10:43:08 +00:00
parent 8321f28c1b
commit 1a486edd16
24 changed files with 21 additions and 2555 deletions

View File

@ -1,3 +1 @@
ppp-2.4.2.tar.gz
ppp-2.4.3.tar.gz
ppp-2.4.4.tar.gz
ppp-2.4.5.tar.gz

View File

@ -1,142 +0,0 @@
--- ppp-2.4.1/pppd/cbcp.c.pkgcheck 2004-11-02 14:19:23.000000000 +0100
+++ ppp-2.4.1/pppd/cbcp.c 2004-11-02 15:04:06.000000000 +0100
@@ -150,7 +150,8 @@
inp = inpacket;
if (pktlen < CBCP_MINLEN) {
- error("CBCP packet is too small");
+ if (debug)
+ dbglog("CBCP packet is too small");
return;
}
@@ -158,12 +159,11 @@
GETCHAR(id, inp);
GETSHORT(len, inp);
-#if 0
- if (len > pktlen) {
- error("CBCP packet: invalid length");
+ if (len > pktlen || len < CBCP_MINLEN) {
+ if (debug)
+ dbglog("CBCP packet: invalid length %d", len);
return;
}
-#endif
len -= CBCP_MINLEN;
@@ -174,11 +174,12 @@
break;
case CBCP_RESP:
- dbglog("CBCP_RESP received");
+ if (debug)
+ dbglog("CBCP_RESP received");
break;
case CBCP_ACK:
- if (id != us->us_id)
+ if (debug && id != us->us_id)
dbglog("id doesn't match: expected %d recv %d",
us->us_id, id);
@@ -297,11 +298,13 @@
address[0] = 0;
- while (len) {
+ while (len >= 2) {
dbglog("length: %d", len);
GETCHAR(type, pckt);
GETCHAR(opt_len, pckt);
+ if (opt_len < 2 || opt_len > len)
+ break;
if (opt_len > 2)
GETCHAR(delay, pckt);
@@ -333,6 +336,11 @@
}
len -= opt_len;
}
+ if (len != 0) {
+ if (debug)
+ dbglog("cbcp_recvreq: malformed packet (%d bytes left)", len);
+ return;
+ }
cbcp_resp(us);
}
@@ -345,6 +353,7 @@
u_char buf[256];
u_char *bufp = buf;
int len = 0;
+ int slen;
cb_type = us->us_allowed & us->us_type;
dbglog("cbcp_resp cb_type=%d", cb_type);
@@ -356,12 +365,17 @@
if (cb_type & ( 1 << CB_CONF_USER ) ) {
dbglog("cbcp_resp CONF_USER");
+ slen = strlen(us->us_number);
+ if (slen > 250) {
+ warn("callback number truncated to 250 characters");
+ slen = 250;
+ }
PUTCHAR(CB_CONF_USER, bufp);
- len = 3 + 1 + strlen(us->us_number) + 1;
+ len = 3 + 1 + slen + 1;
PUTCHAR(len , bufp);
PUTCHAR(5, bufp); /* delay */
PUTCHAR(1, bufp);
- BCOPY(us->us_number, bufp, strlen(us->us_number) + 1);
+ BCOPY(us->us_number, bufp, slen + 1);
cbcp_send(us, CBCP_RESP, buf, len);
return;
}
@@ -424,25 +438,29 @@
int opt_len;
char address[256];
- if (len) {
+ if (len >= 2) {
GETCHAR(type, pckt);
GETCHAR(opt_len, pckt);
- if (opt_len > 2)
- GETCHAR(delay, pckt);
+ if (opt_len >= 2 && opt_len <= len) {
+ if (opt_len > 2)
+ GETCHAR(delay, pckt);
- if (opt_len > 4) {
- GETCHAR(addr_type, pckt);
- memcpy(address, pckt, opt_len - 4);
- address[opt_len - 4] = 0;
- if (address[0])
- dbglog("peer will call: %s", address);
- }
- if (type == CB_CONF_NO)
- return;
- }
+ if (opt_len > 4) {
+ GETCHAR(addr_type, pckt);
+ memcpy(address, pckt, opt_len - 4);
+ address[opt_len - 4] = 0;
+ if (address[0])
+ dbglog("peer will call: %s", address);
+ }
+ if (type == CB_CONF_NO)
+ return;
- cbcp_up(us);
+ cbcp_up(us);
+
+ } else if (debug)
+ dbglog("cbcp_recvack: malformed packet");
+ }
}
/* ok peer will do callback */

View File

@ -1,23 +0,0 @@
I think this is the right fix, but ICBW.
--- ppp-2.4.2/pppd/demand.c 2004-03-10 19:12:16.000000000 -0500
+++ ppp-2.4.2/pppd/demand.c 2004-03-10 19:12:12.000000000 -0500
@@ -50,7 +50,7 @@
#include <sys/socket.h>
#ifdef PPP_FILTER
#include <net/if.h>
-#include <net/bpf.h>
+#include <pcap-bpf.h>
#include <pcap.h>
#endif
--- ppp-2.4.2/pppd/sys-linux.c 2004-03-10 19:11:56.000000000 -0500
+++ ppp-2.4.2/pppd/sys-linux.c 2004-03-10 19:12:05.000000000 -0500
@@ -141,7 +141,7 @@
#endif /* IPX_CHANGE */
#ifdef PPP_FILTER
-#include <net/bpf.h>
+#include <pcap-bpf.h>
#include <linux/filter.h>
#endif /* PPP_FILTER */

View File

@ -1,434 +0,0 @@
--- ppp-2.4.2/pppd/plugins/rp-pppoe/discovery.c.fix 2004-06-17 16:43:43.191723185 +0200
+++ ppp-2.4.2/pppd/plugins/rp-pppoe/discovery.c 2004-06-17 16:43:45.907350301 +0200
@@ -13,6 +13,8 @@
#include "pppoe.h"
+void warn __P((char *, ...)); /* log a warning message */
+
#ifdef HAVE_SYSLOG_H
#include <syslog.h>
#endif
--- ppp-2.4.2/pppd/tty.c.fix 2004-01-13 05:17:59.000000000 +0100
+++ ppp-2.4.2/pppd/tty.c 2004-06-17 16:13:28.955650804 +0200
@@ -512,7 +512,9 @@
{
char *connector;
int fdflags;
+#ifndef __linux__
struct stat statbuf;
+#endif
char numbuf[16];
/*
--- ppp-2.4.2/pppd/ipv6cp.c.fix 2004-01-13 04:59:37.000000000 +0100
+++ ppp-2.4.2/pppd/ipv6cp.c 2004-06-17 16:16:04.377345945 +0200
@@ -151,6 +151,7 @@
*/
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <netdb.h>
@@ -1061,7 +1062,9 @@
return (rc); /* Return final code */
}
-
+#if defined(SOL2) || defined(__linux__)
+int ether_to_eui64(eui64_t *p_eui64);
+#endif
/*
* ipv6_check_options - check that any IP-related options are OK,
* and assign appropriate defaults.
--- ppp-2.4.2/include/linux/if_pppox.h.fix 2001-12-15 01:34:24.000000000 +0100
+++ ppp-2.4.2/include/linux/if_pppox.h 2004-06-17 16:11:32.162659245 +0200
@@ -18,7 +18,7 @@
#include <asm/types.h>
-#include <asm/byteorder.h>
+#include <endian.h>
#ifdef __KERNEL__
#include <linux/if_ether.h>
@@ -97,10 +97,10 @@
#define PTT_GEN_ERR __constant_htons(0x0203)
struct pppoe_hdr {
-#if defined(__LITTLE_ENDIAN_BITFIELD)
+#if __BYTE_ORDER == __LITTLE_ENDIAN
__u8 ver : 4;
__u8 type : 4;
-#elif defined(__BIG_ENDIAN_BITFIELD)
+#elif __BYTE_ORDER == __BIG_ENDIAN
__u8 type : 4;
__u8 ver : 4;
#else
--- ppp-2.4.2/pppdump/deflate.c.fix 2004-06-17 16:58:32.991307502 +0200
+++ ppp-2.4.2/pppdump/deflate.c 2004-06-17 17:00:24.408979423 +0200
@@ -38,7 +38,9 @@
#include <sys/types.h>
#include <stddef.h>
+#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "ppp_defs.h"
#include "ppp-comp.h"
#include "zlib.h"
@@ -235,8 +237,8 @@
{
struct deflate_state *state = (struct deflate_state *) arg;
u_char *rptr, *wptr;
- int rlen, olen, ospace;
- int seq, i, flush, r, decode_proto;
+ int rlen, olen;
+ int seq, r;
rptr = mi;
if (*rptr == 0)
--- ppp-2.4.2/pppdump/bsd-comp.c.fix 2004-06-17 16:53:52.680872972 +0200
+++ ppp-2.4.2/pppdump/bsd-comp.c 2004-06-17 16:58:07.013881369 +0200
@@ -43,7 +43,9 @@
#include <sys/types.h>
#include <stddef.h>
+#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "ppp_defs.h"
#include "ppp-comp.h"
@@ -381,7 +383,7 @@
|| options[0] != CI_BSD_COMPRESS || options[1] != CILEN_BSD_COMPRESS
|| BSD_VERSION(options[2]) != BSD_CURRENT_VERSION
|| BSD_NBITS(options[2]) != db->maxbits
- || decomp && db->lens == NULL)
+ || (decomp && db->lens == NULL))
return 0;
if (decomp) {
@@ -554,11 +556,11 @@
u_int n_bits = db->n_bits;
u_int tgtbitno = 32-n_bits; /* bitno when we have a code */
struct bsd_dict *dictp;
- int explen, i, seq, len;
+ int explen, seq, len;
u_int incode, oldcode, finchar;
u_char *p, *rptr, *wptr;
int ilen;
- int dlen, space, codelen, extra;
+ int dlen=0, codelen, extra;
rptr = cmsg;
if (*rptr == 0)
@@ -614,7 +616,7 @@
}
if (incode > max_ent + 2 || incode > db->maxmaxcode
- || incode > max_ent && oldcode == CLEAR) {
+ || (incode > max_ent && oldcode == CLEAR)) {
if (db->debug) {
printf("bsd_decomp%d: bad code 0x%x oldcode=0x%x ",
db->unit, incode, oldcode);
--- ppp-2.4.2/pppdump/pppdump.c.fix 2004-06-17 16:44:38.175172998 +0200
+++ ppp-2.4.2/pppdump/pppdump.c 2004-06-17 16:52:51.795250137 +0200
@@ -34,6 +34,7 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <stdio.h>
+#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include <sys/types.h>
@@ -53,6 +54,12 @@
extern int optind;
extern char *optarg;
+void dumplog(FILE *);
+void dumpppp(FILE *);
+void show_time(FILE *, int);
+
+
+int
main(ac, av)
int ac;
char **av;
@@ -105,7 +112,7 @@
exit(0);
}
-dumplog(f)
+void dumplog(f)
FILE *f;
{
int c, n, k, col;
@@ -183,7 +190,7 @@
show_time(f, c);
break;
default:
- printf("?%.2x\n");
+ printf("?%.2x\n", c);
}
}
}
@@ -244,7 +251,9 @@
unsigned char dbuf[8192];
-dumpppp(f)
+void handle_ccp(struct pkt *, u_char *, int);
+
+void dumpppp(f)
FILE *f;
{
int c, n, k;
@@ -412,7 +421,7 @@
show_time(f, c);
break;
default:
- printf("?%.2x\n");
+ printf("?%.2x\n", c);
}
}
}
@@ -429,7 +438,7 @@
NULL
};
-handle_ccp(cp, dp, len)
+void handle_ccp(cp, dp, len)
struct pkt *cp;
u_char *dp;
int len;
@@ -485,7 +494,7 @@
}
}
-show_time(f, c)
+void show_time(f, c)
FILE *f;
int c;
{
--- ppp-2.4.2/chat/chat.c.fix 2003-03-30 10:23:48.000000000 +0200
+++ ppp-2.4.2/chat/chat.c 2004-06-17 16:33:22.455951861 +0200
@@ -213,7 +213,7 @@
void *copy_of __P((char *s));
char *grow __P((char *s, char **p, size_t len));
void usage __P((void));
-void logf __P((const char *fmt, ...));
+void logfmt __P((const char *fmt, ...));
void fatal __P((int code, const char *fmt, ...));
SIGTYPE sigalrm __P((int signo));
SIGTYPE sigint __P((int signo));
@@ -495,7 +495,7 @@
/*
* Send a message to syslog and/or stderr.
*/
-void logf __V((const char *fmt, ...))
+void logfmt __V((const char *fmt, ...))
{
va_list args;
@@ -558,7 +558,7 @@
fatal(2, "Can't set file mode flags on stdin: %m");
if (verbose)
- logf("alarm");
+ logfmt("alarm");
}
void unalarm()
@@ -1001,9 +1001,9 @@
* The expectation did not occur. This is terminal.
*/
if (fail_reason)
- logf("Failed (%s)", fail_reason);
+ logfmt("Failed (%s)", fail_reason);
else
- logf("Failed");
+ logfmt("Failed");
terminate(exit_code);
}
@@ -1079,7 +1079,7 @@
abort_string[n_aborts++] = s1;
if (verbose)
- logf("abort on (%v)", s);
+ logfmt("abort on (%v)", s);
return;
}
@@ -1105,7 +1105,7 @@
pack++;
n_aborts--;
if (verbose)
- logf("clear abort on (%v)", s);
+ logfmt("clear abort on (%v)", s);
}
}
free(s1);
@@ -1129,7 +1129,7 @@
report_string[n_reports++] = s1;
if (verbose)
- logf("report (%v)", s);
+ logfmt("report (%v)", s);
return;
}
@@ -1155,7 +1155,7 @@
pack++;
n_reports--;
if (verbose)
- logf("clear report (%v)", s);
+ logfmt("clear report (%v)", s);
}
}
free(s1);
@@ -1173,7 +1173,7 @@
timeout = DEFAULT_CHAT_TIMEOUT;
if (verbose)
- logf("timeout set to %d seconds", timeout);
+ logfmt("timeout set to %d seconds", timeout);
return;
}
@@ -1236,7 +1236,7 @@
return ((int)c & 0x7F);
default:
- logf("warning: read() on stdin returned %d", status);
+ logfmt("warning: read() on stdin returned %d", status);
case -1:
if ((status = fcntl(0, F_GETFL, 0)) == -1)
@@ -1264,7 +1264,7 @@
return (0);
default:
- logf("warning: write() on stdout returned %d", status);
+ logfmt("warning: write() on stdout returned %d", status);
case -1:
if ((status = fcntl(0, F_GETFL, 0)) == -1)
@@ -1286,9 +1286,9 @@
if (verbose) {
if (errno == EINTR || errno == EWOULDBLOCK)
- logf(" -- write timed out");
+ logfmt(" -- write timed out");
else
- logf(" -- write failed: %m");
+ logfmt(" -- write failed: %m");
}
return (0);
}
@@ -1303,9 +1303,9 @@
if (verbose) {
if (quiet)
- logf("send (??????)");
+ logfmt("send (?????\?)");
else
- logf("send (%v)", s);
+ logfmt("send (%v)", s);
}
alarm(timeout); alarmed = 0;
@@ -1392,17 +1392,17 @@
minlen = (len > sizeof(fail_buffer)? len: sizeof(fail_buffer)) - 1;
if (verbose)
- logf("expect (%v)", string);
+ logfmt("expect (%v)", string);
if (len > STR_LEN) {
- logf("expect string is too long");
+ logfmt("expect string is too long");
exit_code = 1;
return 0;
}
if (len == 0) {
if (verbose)
- logf("got it");
+ logfmt("got it");
return (1);
}
@@ -1416,16 +1416,16 @@
echo_stderr(c);
if (verbose && c == '\n') {
if (s == logged)
- logf(""); /* blank line */
+ logfmt(""); /* blank line */
else
- logf("%0.*v", s - logged, logged);
+ logfmt("%0.*v", s - logged, logged);
logged = s + 1;
}
*s++ = c;
if (verbose && s >= logged + 80) {
- logf("%0.*v", s - logged, logged);
+ logfmt("%0.*v", s - logged, logged);
logged = s;
}
@@ -1470,8 +1470,8 @@
strncmp(s - len, string, len) == 0) {
if (verbose) {
if (s > logged)
- logf("%0.*v", s - logged, logged);
- logf(" -- got it\n");
+ logfmt("%0.*v", s - logged, logged);
+ logfmt(" -- got it\n");
}
alarm(0);
@@ -1484,8 +1484,8 @@
strncmp(s - abort_len, abort_string[n], abort_len) == 0) {
if (verbose) {
if (s > logged)
- logf("%0.*v", s - logged, logged);
- logf(" -- failed");
+ logfmt("%0.*v", s - logged, logged);
+ logfmt(" -- failed");
}
alarm(0);
@@ -1499,7 +1499,7 @@
if (s >= end) {
if (logged < s - minlen) {
if (verbose)
- logf("%0.*v", s - logged, logged);
+ logfmt("%0.*v", s - logged, logged);
logged = s;
}
s -= minlen;
@@ -1509,16 +1509,16 @@
}
if (alarmed && verbose)
- logf("warning: alarm synchronization problem");
+ logfmt("warning: alarm synchronization problem");
}
alarm(0);
if (verbose && printed) {
if (alarmed)
- logf(" -- read timed out");
+ logfmt(" -- read timed out");
else
- logf(" -- read failed: %m");
+ logfmt(" -- read failed: %m");
}
exit_code = 3;

View File

@ -1,23 +0,0 @@
--- ppp-2.4.2/pppd/sha1.c.fix64 2002-04-02 15:54:59.000000000 +0200
+++ ppp-2.4.2/pppd/sha1.c 2004-06-17 17:22:00.698817462 +0200
@@ -18,6 +18,7 @@
#include <string.h>
#include <netinet/in.h> /* htonl() */
+#include <sys/types.h> /* u_int32_t */
#include "sha1.h"
static void
@@ -44,10 +45,10 @@
static void
SHA1_Transform(unsigned long state[5], const unsigned char buffer[64])
{
- unsigned long a, b, c, d, e;
+ u_int32_t a, b, c, d, e;
typedef union {
unsigned char c[64];
- unsigned long l[16];
+ u_int32_t l[16];
} CHAR64LONG16;
CHAR64LONG16 *block;

View File

@ -1,51 +0,0 @@
If CC supports the "-print-multi-os-directory" option, use it to determine
where to check for the existence libcrypt. If it doesn't, then we get /usr/lib.
--- ppp-2.4.2/pppd/Makefile.linux 2003-11-27 16:55:19.000000000 -0500
+++ ppp-2.4.2/pppd/Makefile.linux 2004-03-10 17:44:04.000000000 -0500
@@ -7,6 +7,7 @@
BINDIR = $(DESTDIR)/usr/sbin
MANDIR = $(DESTDIR)/usr/man
INCDIR = $(DESTDIR)/usr/include
+LIBDIR = $(DESTDIR)/usr/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)
TARGETS = pppd
@@ -31,7 +32,7 @@
CC = gcc
#
-COPTS = -Wall $(RPM_OPT_FLAGS)
+COPTS = -Wall $(RPM_OPT_FLAGS) -DLIBDIR=\""$(LIBDIR)"\"
LIBS = -lutil
# Uncomment the next 2 lines to include support for Microsoft's
@@ -119,7 +120,7 @@
ifneq ($(wildcard /usr/include/crypt.h),)
CFLAGS += -DHAVE_CRYPT_H=1
endif
-ifneq ($(wildcard /usr/lib/libcrypt.*),)
+ifneq ($(wildcard $(LIBDIR)/libcrypt.*),)
LIBS += -lcrypt
endif
--- ppp-2.4.2/pppd/plugins/Makefile.linux 2004-03-10 18:40:27.000000000 -0500
+++ ppp-2.4.2/pppd/plugins/Makefile.linux 2004-03-10 18:41:20.000000000 -0500
@@ -21,7 +21,7 @@
$(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^
VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../patchlevel.h)
-LIBDIR = $(DESTDIR)/usr/lib/pppd/$(VERSION)
+LIBDIR = $(DESTDIR)/usr/lib/$(shell $(CC) -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
install: $(PLUGINS)
$(INSTALL) -d $(LIBDIR)
--- ppp-2.4.2/pppd/pathnames.h 2004-03-10 18:52:15.000000000 -0500
+++ ppp-2.4.2/pppd/pathnames.h 2004-03-10 18:52:10.000000000 -0500
@@ -55,5 +55,5 @@
#endif /* __STDC__ */
#ifdef PLUGIN
-#define _PATH_PLUGIN "/usr/lib/pppd/" VERSION
+#define _PATH_PLUGIN LIBDIR "/pppd/" VERSION
#endif /* PLUGIN */

View File

@ -1,89 +0,0 @@
Obey RPM_OPT_FLAGS, link with pppd with libutil to get logwtmp(), and enable
PAM support.
--- ppp-2.4.2/chat/Makefile.linux 2004-01-12 22:57:55.000000000 -0500
+++ ppp-2.4.2/chat/Makefile.linux 2004-03-10 18:32:39.000000000 -0500
@@ -6,7 +6,7 @@
CDEF4= -DFNDELAY=O_NDELAY # Old name value
CDEFS= $(CDEF1) $(CDEF2) $(CDEF3) $(CDEF4)
-COPTS= -O2 -g -pipe $(CDEFS)
+COPTS= $(RPM_OPT_FLAGS) $(CDEFS)
CFLAGS= $(COPTS) $(CDEFS)
INSTALL= install
--- ppp-2.4.2/pppd/Makefile.linux 2003-11-27 16:55:19.000000000 -0500
+++ ppp-2.4.2/pppd/Makefile.linux 2004-03-10 18:32:46.000000000 -0500
@@ -29,10 +29,10 @@
include .depend
endif
-# CC = gcc
+CC = gcc
#
-COPTS = -O2 -pipe -Wall -g
-LIBS =
+COPTS = -Wall $(RPM_OPT_FLAGS)
+LIBS = -lutil
# Uncomment the next 2 lines to include support for Microsoft's
# MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux.
@@ -60,7 +60,7 @@
USE_TDB=y
HAS_SHADOW=y
-#USE_PAM=y
+USE_PAM=y
-#HAVE_INET6=y
+HAVE_INET6=y
# Enable plugins
--- ppp-2.4.2/pppdump/Makefile.linux 1999-07-26 07:09:29.000000000 -0400
+++ ppp-2.4.2/pppdump/Makefile.linux 2004-03-10 18:32:47.000000000 -0500
@@ -1,4 +1,4 @@
-CFLAGS= -O -I../include/net
+CFLAGS= $(RPM_OPT_FLAGS) -I../include/net
OBJS = pppdump.o bsd-comp.o deflate.o zlib.o
INSTALL= install
--- ppp-2.4.2/pppstats/Makefile.linux 2002-11-09 06:24:43.000000000 -0500
+++ ppp-2.4.2/pppstats/Makefile.linux 2004-03-10 18:32:55.000000000 -0500
@@ -7,7 +7,7 @@
PPPSTATOBJS = pppstats.o
#CC = gcc
-COPTS = -O
+COPTS = $(RPM_OPT_FLAGS)
COMPILE_FLAGS = -I../include
LIBS =
--- ppp-2.4.2/pppd/plugins/Makefile.linux 2004-01-12 22:56:24.000000000 -0500
+++ ppp-2.4.2/pppd/plugins/Makefile.linux 2004-03-10 18:41:20.000000000 -0500
@@ -1,5 +1,5 @@
CC = gcc
-COPTS = -O2 -g
+COPTS = $(RPM_OPT_FLAGS)
CFLAGS = $(COPTS) -I.. -I../../include -fPIC
LDFLAGS = -shared
INSTALL = install -o root
--- ppp-2.4.2/pppd/plugins/radius/Makefile.linux 2004-03-10 18:46:36.000000000 -0500
+++ ppp-2.4.2/pppd/plugins/radius/Makefile.linux 2004-03-10 18:46:44.000000000 -0500
@@ -5,7 +5,7 @@
MANDIR=/usr/man
PLUGIN=radius.so radattr.so radrealms.so
-CFLAGS=-I../.. -I../../../include -Iradiusclient/include -O2
+CFLAGS=-I../.. -I../../../include -Iradiusclient/include $(RPM_OPT_FLAGS)
# Uncomment the next line to include support for Microsoft's
# MS-CHAP authentication protocol.
--- ppp-2.4.2/pppd/plugins/rp-pppoe/Makefile.linux 2004-03-10 18:46:52.000000000 -0500
+++ ppp-2.4.2/pppd/plugins/rp-pppoe/Makefile.linux 2004-03-10 18:46:58.000000000 -0500
@@ -16,7 +16,7 @@
# Version is set ONLY IN THE MAKEFILE! Don't delete this!
VERSION=3.3
-COPTS=-O2 -g
+COPTS=$(RPM_OPT_FLAGS)
CFLAGS=$(COPTS) -I../../../include/linux
all: rp-pppoe.so

View File

@ -1,205 +0,0 @@
--- ppp-2.4.2/pppd/Makefile.linux.make.no_strip 2003-11-27 22:55:19.000000000 +0100
+++ ppp-2.4.2/pppd/Makefile.linux.make 2004-09-16 12:00:08.641944353 +0200
@@ -98,7 +98,7 @@
CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
TARGETS += srp-entry
-EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
+EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
MANPAGES += srp-entry.8
EXTRACLEAN += srp-entry.o
NEEDDES=y
@@ -199,7 +199,7 @@
install: pppd
mkdir -p $(BINDIR) $(MANDIR)
$(EXTRAINSTALL)
- $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
+ $(INSTALL) -c -m 555 pppd $(BINDIR)/pppd
if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
chmod o-rx,u+s $(BINDIR)/pppd; fi
$(INSTALL) -c -m 444 pppd.8 $(MANDIR)/man8
--- ppp-2.4.2/pppd/Makefile.linux.no_strip 2004-09-16 12:00:08.550956895 +0200
+++ ppp-2.4.2/pppd/Makefile.linux 2004-09-16 12:00:08.651942974 +0200
@@ -99,7 +99,7 @@
CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
TARGETS += srp-entry
-EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
+EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
MANPAGES += srp-entry.8
EXTRACLEAN += srp-entry.o
NEEDDES=y
@@ -200,7 +200,7 @@
install: pppd
mkdir -p $(BINDIR) $(MANDIR)
$(EXTRAINSTALL)
- $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
+ $(INSTALL) -c -m 555 pppd $(BINDIR)/pppd
if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
chmod o-rx,u+s $(BINDIR)/pppd; fi
$(INSTALL) -c -m 444 pppd.8 $(MANDIR)/man8
--- ppp-2.4.2/pppd/plugins/radius/Makefile.linux.make.no_strip 2002-11-09 12:24:42.000000000 +0100
+++ ppp-2.4.2/pppd/plugins/radius/Makefile.linux.make 2004-09-16 12:00:08.642944215 +0200
@@ -30,9 +30,9 @@
install: all
$(MAKE) $(MFLAGS) -C radiusclient install
$(INSTALL) -d -m 755 $(LIBDIR)
- $(INSTALL) -s -c -m 755 radius.so $(LIBDIR)
- $(INSTALL) -s -c -m 755 radattr.so $(LIBDIR)
- $(INSTALL) -s -c -m 755 radrealms.so $(LIBDIR)
+ $(INSTALL) -c -m 755 radius.so $(LIBDIR)
+ $(INSTALL) -c -m 755 radattr.so $(LIBDIR)
+ $(INSTALL) -c -m 755 radrealms.so $(LIBDIR)
$(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)/man8
$(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)/man8
--- ppp-2.4.2/pppd/plugins/radius/Makefile.linux.no_strip 2004-09-16 12:00:08.518961306 +0200
+++ ppp-2.4.2/pppd/plugins/radius/Makefile.linux 2004-09-16 12:00:08.643944077 +0200
@@ -30,9 +30,9 @@
install: all
$(MAKE) $(MFLAGS) -C radiusclient install
$(INSTALL) -d -m 755 $(LIBDIR)
- $(INSTALL) -s -c -m 755 radius.so $(LIBDIR)
- $(INSTALL) -s -c -m 755 radattr.so $(LIBDIR)
- $(INSTALL) -s -c -m 755 radrealms.so $(LIBDIR)
+ $(INSTALL) -c -m 755 radius.so $(LIBDIR)
+ $(INSTALL) -c -m 755 radattr.so $(LIBDIR)
+ $(INSTALL) -c -m 755 radrealms.so $(LIBDIR)
$(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)/man8
$(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)/man8
--- ppp-2.4.2/pppd/plugins/rp-pppoe/Makefile.linux.make.no_strip 2004-01-13 04:57:55.000000000 +0100
+++ ppp-2.4.2/pppd/plugins/rp-pppoe/Makefile.linux.make 2004-09-16 12:00:08.650943112 +0200
@@ -25,7 +25,7 @@
install: all
$(INSTALL) -d -m 755 $(LIBDIR)
- $(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR)
+ $(INSTALL) -c -m 4550 rp-pppoe.so $(LIBDIR)
clean:
rm -f *.o *.so
--- ppp-2.4.2/pppd/plugins/rp-pppoe/Makefile.linux.no_strip 2004-09-16 12:00:08.518961306 +0200
+++ ppp-2.4.2/pppd/plugins/rp-pppoe/Makefile.linux 2004-09-16 12:00:08.650943112 +0200
@@ -25,7 +25,7 @@
install: all
$(INSTALL) -d -m 755 $(LIBDIR)
- $(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR)
+ $(INSTALL) -c -m 4550 rp-pppoe.so $(LIBDIR)
clean:
rm -f *.o *.so
--- ppp-2.4.2/pppd/Makefile.linux.lib64.no_strip 2004-09-16 12:00:08.516961582 +0200
+++ ppp-2.4.2/pppd/Makefile.linux.lib64 2004-09-16 12:00:08.641944353 +0200
@@ -98,7 +98,7 @@
CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
TARGETS += srp-entry
-EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
+EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
MANPAGES += srp-entry.8
EXTRACLEAN += srp-entry.o
NEEDDES=y
@@ -199,7 +199,7 @@
install: pppd
mkdir -p $(BINDIR) $(MANDIR)
$(EXTRAINSTALL)
- $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
+ $(INSTALL) -c -m 555 pppd $(BINDIR)/pppd
if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
chmod o-rx,u+s $(BINDIR)/pppd; fi
$(INSTALL) -c -m 444 pppd.8 $(MANDIR)/man8
--- ppp-2.4.2/pppd/Makefile.linux.pie.no_strip 2004-09-16 12:00:08.536958825 +0200
+++ ppp-2.4.2/pppd/Makefile.linux.pie 2004-09-16 12:00:08.651942974 +0200
@@ -99,7 +99,7 @@
CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
TARGETS += srp-entry
-EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
+EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
MANPAGES += srp-entry.8
EXTRACLEAN += srp-entry.o
NEEDDES=y
@@ -200,7 +200,7 @@
install: pppd
mkdir -p $(BINDIR) $(MANDIR)
$(EXTRAINSTALL)
- $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
+ $(INSTALL) -c -m 555 pppd $(BINDIR)/pppd
if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
chmod o-rx,u+s $(BINDIR)/pppd; fi
$(INSTALL) -c -m 444 pppd.8 $(MANDIR)/man8
--- ppp-2.4.2/pppdump/Makefile.linux.make.no_strip 1999-07-26 13:09:29.000000000 +0200
+++ ppp-2.4.2/pppdump/Makefile.linux.make 2004-09-16 12:00:08.652942836 +0200
@@ -13,5 +13,5 @@
install:
mkdir -p $(BINDIR) $(MANDIR)/man8
- $(INSTALL) -s -c pppdump $(BINDIR)
+ $(INSTALL) -c pppdump $(BINDIR)
$(INSTALL) -c -m 444 pppdump.8 $(MANDIR)/man8
--- ppp-2.4.2/pppdump/Makefile.linux.no_strip 2004-09-16 12:00:08.516961582 +0200
+++ ppp-2.4.2/pppdump/Makefile.linux 2004-09-16 12:00:08.653942699 +0200
@@ -13,5 +13,5 @@
install:
mkdir -p $(BINDIR) $(MANDIR)/man8
- $(INSTALL) -s -c pppdump $(BINDIR)
+ $(INSTALL) -c pppdump $(BINDIR)
$(INSTALL) -c -m 444 pppdump.8 $(MANDIR)/man8
--- ppp-2.4.2/pppstats/Makefile.linux.make.no_strip 2002-11-09 12:24:43.000000000 +0100
+++ ppp-2.4.2/pppstats/Makefile.linux.make 2004-09-16 12:00:08.654942561 +0200
@@ -19,7 +19,7 @@
install: pppstats
-mkdir -p $(MANDIR)/man8
- $(INSTALL) -s -c pppstats $(BINDIR)/pppstats
+ $(INSTALL) -c pppstats $(BINDIR)/pppstats
$(INSTALL) -c -m 444 pppstats.8 $(MANDIR)/man8/pppstats.8
pppstats: $(PPPSTATSRCS)
--- ppp-2.4.2/pppstats/Makefile.linux.no_strip 2004-09-16 12:00:08.517961444 +0200
+++ ppp-2.4.2/pppstats/Makefile.linux 2004-09-16 12:00:08.654942561 +0200
@@ -19,7 +19,7 @@
install: pppstats
-mkdir -p $(MANDIR)/man8
- $(INSTALL) -s -c pppstats $(BINDIR)/pppstats
+ $(INSTALL) -c pppstats $(BINDIR)/pppstats
$(INSTALL) -c -m 444 pppstats.8 $(MANDIR)/man8/pppstats.8
pppstats: $(PPPSTATSRCS)
--- ppp-2.4.2/chat/Makefile.linux.make.no_strip 2004-01-13 04:57:55.000000000 +0100
+++ ppp-2.4.2/chat/Makefile.linux.make 2004-09-16 12:00:08.655942423 +0200
@@ -21,7 +21,7 @@
install: chat
mkdir -p $(BINDIR)
- $(INSTALL) -s -c chat $(BINDIR)
+ $(INSTALL) -c chat $(BINDIR)
$(INSTALL) -c -m 644 chat.8 $(MANDIR)/man8
clean:
--- ppp-2.4.2/chat/Makefile.linux.no_strip 2004-09-16 12:00:08.551956757 +0200
+++ ppp-2.4.2/chat/Makefile.linux 2004-09-16 12:00:08.655942423 +0200
@@ -21,7 +21,7 @@
install: chat
mkdir -p $(BINDIR)
- $(INSTALL) -s -c chat $(BINDIR)
+ $(INSTALL) -c chat $(BINDIR)
$(INSTALL) -c -m 644 chat.8 $(MANDIR)/man8
clean:
--- ppp-2.4.2/chat/Makefile.linux.pie.no_strip 2004-09-16 12:00:08.515961719 +0200
+++ ppp-2.4.2/chat/Makefile.linux.pie 2004-09-16 12:00:08.655942423 +0200
@@ -21,7 +21,7 @@
install: chat
mkdir -p $(BINDIR)
- $(INSTALL) -s -c chat $(BINDIR)
+ $(INSTALL) -c chat $(BINDIR)
$(INSTALL) -c -m 644 chat.8 $(MANDIR)/man8
clean:

View File

@ -1,64 +0,0 @@
--- ppp-2.4.2/pppd/options.c.pcap 2004-01-13 05:02:07.000000000 +0100
+++ ppp-2.4.2/pppd/options.c 2004-09-15 11:39:34.832772935 +0200
@@ -56,7 +56,6 @@
#endif
#ifdef PPP_FILTER
#include <pcap.h>
-#include <pcap-int.h> /* XXX: To get struct pcap */
#endif
#include "pppd.h"
@@ -122,7 +121,6 @@
#ifdef PPP_FILTER
struct bpf_program pass_filter;/* Filter program for packets to pass */
struct bpf_program active_filter; /* Filter program for link-active pkts */
-pcap_t pc; /* Fake struct pcap so we can compile expr */
#endif
char *current_option; /* the name of the option being parsed */
@@ -1439,12 +1437,18 @@
setpassfilter(argv)
char **argv;
{
- pc.linktype = DLT_PPP;
- pc.snapshot = PPP_HDRLEN;
+ pcap_t* pc = pcap_open_dead (DLT_PPP, PPP_HDRLEN);
+ if (!pc) {
+ option_error("error in pass-filter expression: pcap_open_dead failed\n");
+ return 0;
+ }
- if (pcap_compile(&pc, &pass_filter, *argv, 1, netmask) == 0)
+ if (pcap_compile(pc, &pass_filter, *argv, 1, netmask) == 0) {
+ pcap_close(pc);
return 1;
- option_error("error in pass-filter expression: %s\n", pcap_geterr(&pc));
+ }
+ option_error("error in pass-filter expression: %s\n", pcap_geterr(pc));
+ pcap_close(pc);
return 0;
}
@@ -1455,12 +1459,18 @@
setactivefilter(argv)
char **argv;
{
- pc.linktype = DLT_PPP;
- pc.snapshot = PPP_HDRLEN;
+ pcap_t* pc = pcap_open_dead (DLT_PPP, PPP_HDRLEN);
+ if (!pc) {
+ option_error("error in pass-filter expression: pcap_open_dead failed\n");
+ return 0;
+ }
- if (pcap_compile(&pc, &active_filter, *argv, 1, netmask) == 0)
+ if (pcap_compile(pc, &active_filter, *argv, 1, netmask) == 0) {
+ pcap_close(pc);
return 1;
- option_error("error in active-filter expression: %s\n", pcap_geterr(&pc));
+ }
+ option_error("error in active-filter expression: %s\n", pcap_geterr(pc));
+ pcap_close(pc);
return 0;
}
#endif

View File

@ -2,7 +2,7 @@ diff -up ppp-2.4.4/pppd/plugins/pppoatm/Makefile.linux.atm-make ppp-2.4.4/pppd/p
--- ppp-2.4.4/pppd/plugins/pppoatm/Makefile.linux.atm-make 2008-08-28 17:36:10.000000000 -0400
+++ ppp-2.4.4/pppd/plugins/pppoatm/Makefile.linux 2008-08-28 17:36:56.000000000 -0400
@@ -1,5 +1,5 @@
CC = gcc
#CC = gcc
-COPTS = -O2 -g
+COPTS = $(RPM_OPT_FLAGS)
CFLAGS = $(COPTS) -I../.. -I../../../include -fPIC

View File

@ -1,28 +0,0 @@
--- ppp-2.4.2/pppd/plugins/pppoatm/pppoatm.c.mtu 2004-10-07 13:32:05.660910432 +0100
+++ ppp-2.4.2/pppd/plugins/pppoatm/pppoatm.c 2004-10-07 13:58:20.096559832 +0100
@@ -175,8 +175,10 @@
{
int sock;
struct ifreq ifr;
- if (mtu > pppoatm_max_mtu)
- error("Couldn't increase MTU to %d", mtu);
+ if (pppoatm_max_mtu && mtu > pppoatm_max_mtu) {
+ warn("Couldn't increase MTU to %d. Using %d", mtu, pppoatm_max_mtu);
+ mtu = pppoatm_max_mtu;
+ }
sock = socket(AF_INET, SOCK_DGRAM, 0);
if (sock < 0)
fatal("Couldn't create IP socket: %m");
@@ -192,8 +194,10 @@
int pcomp,
int accomp)
{
- if (mru > pppoatm_max_mru)
- error("Couldn't increase MRU to %d", mru);
+ if (pppoatm_max_mru && mru > pppoatm_max_mru) {
+ warn("Couldn't increase MRU to %d. Using %d", mru, pppoatm_max_mru);
+ mru = pppoatm_max_mru;
+ }
}
void plugin_init(void)

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +0,0 @@
--- ppp-2.4.2/pppd/main.c.signal 2004-01-13 05:00:34.000000000 +0100
+++ ppp-2.4.2/pppd/main.c 2004-08-06 11:35:59.968454227 +0200
@@ -1338,8 +1338,8 @@
act.sa_handler = SIG_IGN;
act.sa_flags = 0;
- sigaction(sig, &act, &oldact);
kill(0, sig);
+ sigaction(sig, &act, &oldact);
sigaction(sig, &oldact, NULL);
}

View File

@ -1,14 +1,14 @@
--- ppp-2.4.3/pppd/plugins/rp-pppoe/discovery.c.fix 2004-11-04 11:07:37.000000000 +0100
+++ ppp-2.4.3/pppd/plugins/rp-pppoe/discovery.c 2004-11-22 16:00:24.522462124 +0100
@@ -13,6 +13,8 @@
#include "pppoe.h"
#include "pppd/pppd.h"
+void warn __P((char *, ...)); /* log a warning message */
+
#ifdef HAVE_SYSLOG_H
#include <syslog.h>
#endif
#include <string.h>
#include <stdlib.h>
#include <errno.h>
--- ppp-2.4.3/pppd/ipv6cp.c.fix 2004-11-13 03:28:15.000000000 +0100
+++ ppp-2.4.3/pppd/ipv6cp.c 2004-11-22 16:00:27.049114044 +0100
@@ -151,6 +151,7 @@
@ -30,30 +30,6 @@
/*
* ipv6_check_options - check that any IP-related options are OK,
* and assign appropriate defaults.
--- ppp-2.4.3/include/linux/if_pppox.h.fix 2001-12-15 01:34:24.000000000 +0100
+++ ppp-2.4.3/include/linux/if_pppox.h 2004-11-22 16:00:27.049114044 +0100
@@ -18,7 +18,7 @@
#include <asm/types.h>
-#include <asm/byteorder.h>
+#include <endian.h>
#ifdef __KERNEL__
#include <linux/if_ether.h>
@@ -97,10 +97,10 @@
#define PTT_GEN_ERR __constant_htons(0x0203)
struct pppoe_hdr {
-#if defined(__LITTLE_ENDIAN_BITFIELD)
+#if __BYTE_ORDER == __LITTLE_ENDIAN
__u8 ver : 4;
__u8 type : 4;
-#elif defined(__BIG_ENDIAN_BITFIELD)
+#elif __BYTE_ORDER == __BIG_ENDIAN
__u8 type : 4;
__u8 ver : 4;
#else
--- ppp-2.4.3/pppdump/deflate.c.fix 2004-02-02 04:36:46.000000000 +0100
+++ ppp-2.4.3/pppdump/deflate.c 2004-11-22 16:02:18.071820020 +0100
@@ -39,6 +39,7 @@

View File

@ -5,6 +5,6 @@
#include <string.h>
#include <netinet/in.h> /* htonl() */
+#include <sys/types.h> /* u_int32_t */
#include <net/ppp_defs.h>
#include "sha1.h"
static void

View File

@ -28,7 +28,7 @@
--- ppp-2.4.3/pppd/plugins/Makefile.linux.make 2004-11-14 08:57:35.000000000 +0100
+++ ppp-2.4.3/pppd/plugins/Makefile.linux 2004-11-22 15:46:49.873309203 +0100
@@ -1,5 +1,5 @@
CC = gcc
#CC = gcc
-COPTS = -O2 -g
+COPTS = $(RPM_OPT_FLAGS)
CFLAGS = $(COPTS) -I.. -I../../include -fPIC
@ -47,13 +47,13 @@
# MS-CHAP authentication protocol.
--- ppp-2.4.3/pppd/plugins/rp-pppoe/Makefile.linux.make 2004-11-14 08:58:37.000000000 +0100
+++ ppp-2.4.3/pppd/plugins/rp-pppoe/Makefile.linux 2004-11-22 15:46:49.875308929 +0100
@@ -24,7 +24,7 @@
@@ -25,7 +25,7 @@
# Version is set ONLY IN THE MAKEFILE! Don't delete this!
VERSION=3.3
RP_VERSION=3.8p
-COPTS=-O2 -g
+COPTS=$(RPM_OPT_FLAGS)
CFLAGS=$(COPTS) -I../../../include/linux
CFLAGS=$(COPTS) -I../../../include '-DRP_VERSION="$(RP_VERSION)"'
all: rp-pppoe.so pppoe-discovery
--- ppp-2.4.3/pppdump/Makefile.linux.make 2004-10-31 02:36:52.000000000 +0200

View File

@ -1,104 +0,0 @@
diff -up ppp-2.4.4/pppd/ipcp.c.bogus_dns_addr ppp-2.4.4/pppd/ipcp.c
--- ppp-2.4.4/pppd/ipcp.c.bogus_dns_addr 2005-08-26 01:59:34.000000000 +0200
+++ ppp-2.4.4/pppd/ipcp.c 2008-12-11 12:39:05.000000000 +0100
@@ -715,7 +715,8 @@ ipcp_cilen(f)
#define LENCIADDRS(neg) (neg ? CILEN_ADDRS : 0)
#define LENCIVJ(neg, old) (neg ? (old? CILEN_COMPRESS : CILEN_VJ) : 0)
#define LENCIADDR(neg) (neg ? CILEN_ADDR : 0)
-#define LENCIDNS(neg) (neg ? (CILEN_ADDR) : 0)
+#define LENCIDNS(neg) LENCIADDR(neg)
+#define LENCIWINS(neg) LENCIADDR(neg)
/*
* First see if we want to change our options to the old
@@ -737,7 +738,9 @@ ipcp_cilen(f)
LENCIVJ(go->neg_vj, go->old_vj) +
LENCIADDR(go->neg_addr) +
LENCIDNS(go->req_dns1) +
- LENCIDNS(go->req_dns2)) ;
+ LENCIDNS(go->req_dns2) +
+ LENCIWINS(go->winsaddr[0]) +
+ LENCIWINS(go->winsaddr[1])) ;
}
@@ -810,6 +813,19 @@ ipcp_addci(f, ucp, lenp)
} else \
neg = 0; \
}
+
+#define ADDCIWINS(opt, addr) \
+ if (addr) { \
+ if (len >= CILEN_ADDR) { \
+ u_int32_t l; \
+ PUTCHAR(opt, ucp); \
+ PUTCHAR(CILEN_ADDR, ucp); \
+ l = ntohl(addr); \
+ PUTLONG(l, ucp); \
+ len -= CILEN_ADDR; \
+ } else \
+ addr = 0; \
+ }
ADDCIADDRS(CI_ADDRS, !go->neg_addr && go->old_addrs, go->ouraddr,
go->hisaddr);
@@ -823,6 +839,10 @@ ipcp_addci(f, ucp, lenp)
ADDCIDNS(CI_MS_DNS2, go->req_dns2, go->dnsaddr[1]);
+ ADDCIWINS(CI_MS_WINS1, go->winsaddr[0]);
+
+ ADDCIWINS(CI_MS_WINS2, go->winsaddr[1]);
+
*lenp -= len;
}
@@ -1159,6 +1179,15 @@ ipcp_nakci(f, p, len, treat_as_reject)
try.neg_addr = 1;
no.neg_addr = 1;
break;
+ case CI_MS_WINS1:
+ case CI_MS_WINS2:
+ if (cilen != CILEN_ADDR)
+ goto bad;
+ GETLONG(l, p);
+ ciaddr1 = htonl(l);
+ if (ciaddr1)
+ try.winsaddr[citype == CI_MS_WINS2] = ciaddr1;
+ break;
}
p = next;
}
@@ -1275,6 +1304,21 @@ ipcp_rejci(f, p, len)
try.neg = 0; \
}
+#define REJCIWINS(opt, addr) \
+ if (addr && \
+ ((cilen = p[1]) == CILEN_ADDR) && \
+ len >= cilen && \
+ p[0] == opt) { \
+ u_int32_t l; \
+ len -= cilen; \
+ INCPTR(2, p); \
+ GETLONG(l, p); \
+ cilong = htonl(l); \
+ /* Check rejected value. */ \
+ if (cilong != addr) \
+ goto bad; \
+ try.winsaddr[opt == CI_MS_WINS2] = 0; \
+ }
REJCIADDRS(CI_ADDRS, !go->neg_addr && go->old_addrs,
go->ouraddr, go->hisaddr);
@@ -1288,6 +1332,10 @@ ipcp_rejci(f, p, len)
REJCIDNS(CI_MS_DNS2, req_dns2, go->dnsaddr[1]);
+ REJCIWINS(CI_MS_WINS1, go->winsaddr[0]);
+
+ REJCIWINS(CI_MS_WINS2, go->winsaddr[1]);
+
/*
* If there are any remaining CIs, then this packet is bad.
*/

View File

@ -1,20 +0,0 @@
diff -up ppp-2.4.4/pppd/main.c.closelog ppp-2.4.4/pppd/main.c
--- ppp-2.4.4/pppd/main.c.closelog 2008-03-06 22:54:19.000000000 +0100
+++ ppp-2.4.4/pppd/main.c 2008-03-06 22:54:31.000000000 +0100
@@ -1567,6 +1567,8 @@ safe_fork(int infd, int outfd, int errfd
if (errfd == 0 || errfd == 1)
errfd = dup(errfd);
+ closelog();
+
/* dup the in, out, err fds to 0, 1, 2 */
if (infd != 0)
dup2(infd, 0);
@@ -1575,7 +1577,6 @@ safe_fork(int infd, int outfd, int errfd
if (errfd != 2)
dup2(errfd, 2);
- closelog();
if (log_to_fd > 2)
close(log_to_fd);
if (the_channel->close)

View File

@ -26,7 +26,7 @@
#***********************************************************************
-DESTDIR = @DESTDIR@
-DESTDIR = $(INSTROOT)@DESTDIR@
-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
+DESTDIR = $(INSTROOT)@DESTDIR@
+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
@ -42,7 +42,7 @@
-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
+LIBDIR = $(DESTDIR)/lib/$(shell $(CC) -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
SUBDIRS := rp-pppoe pppoatm
SUBDIRS := rp-pppoe pppoatm pppol2tp
# Uncomment the next line to include the radius authentication plugin
--- ppp-2.4.4/pppd/Makefile.linux.lib64 2006-07-24 20:43:40.000000000 +0200
+++ ppp-2.4.4/pppd/Makefile.linux 2006-07-24 20:43:40.000000000 +0200

View File

@ -1,34 +0,0 @@
diff -up ppp-2.4.4/pppd/sys-linux.c.new_speeds ppp-2.4.4/pppd/sys-linux.c
--- ppp-2.4.4/pppd/sys-linux.c.new_speeds 2008-05-12 17:44:11.000000000 -0400
+++ ppp-2.4.4/pppd/sys-linux.c 2008-05-12 17:50:51.000000000 -0400
@@ -849,6 +849,30 @@ struct speed {
#ifdef B921600
{ 921600, B921600 },
#endif
+#ifdef B1000000
+ { 1000000, B1000000 },
+#endif
+#ifdef B1152000
+ { 1152000, B1152000 },
+#endif
+#ifdef B1500000
+ { 1500000, B1500000 },
+#endif
+#ifdef B2000000
+ { 2000000, B2000000 },
+#endif
+#ifdef B2500000
+ { 2500000, B2500000 },
+#endif
+#ifdef B3000000
+ { 3000000, B3000000 },
+#endif
+#ifdef B3500000
+ { 3500000, B3500000 },
+#endif
+#ifdef B4000000
+ { 4000000, B4000000 },
+#endif
{ 0, 0 }
};

View File

@ -68,23 +68,9 @@
$(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)
$(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
--- ppp-2.4.4/pppd/plugins/rp-pppoe/Makefile.linux.make.no_strip 2006-06-04 07:07:46.000000000 +0200
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/Makefile.linux.make 2006-07-19 14:29:41.000000000 +0200
@@ -39,9 +39,9 @@
install: all
$(INSTALL) -d -m 755 $(LIBDIR)
- $(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR)
+ $(INSTALL) -c -m 4550 rp-pppoe.so $(LIBDIR)
$(INSTALL) -d -m 755 $(BINDIR)
- $(INSTALL) -s -c -m 555 pppoe-discovery $(BINDIR)
+ $(INSTALL) -c -m 555 pppoe-discovery $(BINDIR)
clean:
rm -f *.o *.so
--- ppp-2.4.4/pppd/plugins/rp-pppoe/Makefile.linux.no_strip 2006-07-19 14:29:41.000000000 +0200
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/Makefile.linux 2006-07-19 14:29:41.000000000 +0200
@@ -39,9 +39,9 @@
@@ -43,9 +43,9 @@
install: all
$(INSTALL) -d -m 755 $(LIBDIR)
@ -95,7 +81,7 @@
+ $(INSTALL) -c -m 555 pppoe-discovery $(BINDIR)
clean:
rm -f *.o *.so
rm -f *.o *.so pppoe-discovery
--- ppp-2.4.4/pppd/Makefile.linux.lib64.no_strip 2006-07-19 14:29:41.000000000 +0200
+++ ppp-2.4.4/pppd/Makefile.linux.lib64 2006-07-19 14:29:41.000000000 +0200
@@ -99,7 +99,7 @@

View File

@ -1,12 +0,0 @@
diff -up ppp-2.4.4/pppd/chap_ms.c.response_len ppp-2.4.4/pppd/chap_ms.c
--- ppp-2.4.4/pppd/chap_ms.c.response_len 2008-03-06 23:07:18.000000000 +0100
+++ ppp-2.4.4/pppd/chap_ms.c 2008-03-06 23:07:49.000000000 +0100
@@ -852,7 +852,7 @@ ChapMS2(u_char *rchallenge, u_char *Peer
u_char *p = &response[MS_CHAP2_PEER_CHALLENGE];
int i;
- BZERO(response, sizeof(*response));
+ BZERO(response, MS_CHAP2_RESPONSE_LEN);
/* Generate the Peer-Challenge if requested, or copy it if supplied. */
if (!PeerChallenge)

View File

@ -1,7 +1,7 @@
Summary: The PPP (Point-to-Point Protocol) daemon.
Name: ppp
Version: 2.4.4
Release: 13%{?dist}
Version: 2.4.5
Release: 1%{?dist}
License: BSD and LGPLv2+ and GPLv2+ and Public Domain
Group: System Environment/Daemons
Source0: ftp://ftp.samba.org/pub/ppp/ppp-%{version}.tar.gz
@ -17,17 +17,12 @@ Patch8: ppp-2.4.3-fix.patch
Patch9: ppp-2.4.3-fix64.patch
Patch11: ppp-2.4.2-change_resolv_conf.patch
Patch13: ppp-2.4.4-no_strip.patch
Patch16: ppp-2.4.2-pppoatm-mtu.patch
Patch17: ppp-2.4.2-pppoatm-make.patch
Patch19: ppp-2.4.3-local.patch
Patch20: ppp-2.4.3-ipv6-accept-remote.patch
Patch21: ppp-2.4.3-usepeerdns-var_run_ppp_resolv.conf.patch
Patch22: ppp-2.4.4-cbcp.patch
Patch23: ppp-2.4.2-dontwriteetc.patch
Patch24: ppp-2.4.4-closelog.patch
Patch25: ppp-2.4.4-response_len.patch
Patch26: ppp-2.4.4-new_speeds.patch
Patch27: ppp-2.4.4-bogus_dns_addr.patch
BuildRoot: %{_tmppath}/%{name}-root
BuildPrereq: pam-devel, libpcap-devel
@ -61,17 +56,12 @@ This package contains the header files for building plugins for ppp.
%patch9 -p1 -b .fix64
%patch11 -p1 -b .change_resolv_conf
%patch13 -p1 -b .no_strip
%patch16 -p1 -b .atm-mtu
%patch17 -p1 -b .atm-make
%patch19 -p1 -b .local
%patch20 -p1 -b .ipv6cp
%patch21 -p1 -b .usepeerdns-var_run_ppp_resolv
%patch22 -p1 -b .cbcp
%patch23 -p1 -b .dontwriteetc
%patch24 -p1 -b .closelog
%patch25 -p1 -b .response_len
%patch26 -p1 -b .new_speeds
%patch27 -p1 -b .bogus_dns_addr
rm -f scripts/*.local
rm -f scripts/*.change_resolv_conf
@ -136,6 +126,9 @@ rm -rf $RPM_BUILD_ROOT
%doc PLUGINS
%changelog
* Fri Dec 11 2009 Jiri Skala <jskala@redhat.com> 2.4.5-1
- re-base to latest upstream
* Wed Sep 16 2009 Tomas Mraz <tmraz@redhat.com> 2.4.4-13
- use password-auth common PAM configuration instead of system-auth

View File

@ -1,2 +1 @@
848f6c3cafeb6074ffeb293c3af79b7c ppp-2.4.3.tar.gz
183800762e266132218b204dfb428d29 ppp-2.4.4.tar.gz
4621bc56167b6953ec4071043fe0ec57 ppp-2.4.5.tar.gz