summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMatthias Andree <mandree@FreeBSD.org>2012-09-23 15:33:15 +0000
committerMatthias Andree <mandree@FreeBSD.org>2012-09-23 15:33:15 +0000
commit7905ffa3d3dda12d129f5f4d6642f533a7239922 (patch)
treea822937ac6214090e02564a0745170928ec371cf /net
parent- Remove the DATA option, as it is always required. (diff)
- Update to new upstream release 3.11.
- Convert to Options NG (for NOPORTDOCS -> DOCS) - Rediff patches. - Fix a few omissions in the upstream BPF-related source, the upstream no longer maintains *BSD. - Fix a bug in MD5 that does not completely zero out its work area - this is an omnipresent bug. Warning: only discovery against a Linux-based PPPoE server v3.8 was tested, not server-mode or running a session.
Notes
Notes: svn path=/head/; revision=304747
Diffstat (limited to 'net')
-rw-r--r--net/rp-pppoe/Makefile13
-rw-r--r--net/rp-pppoe/distinfo4
-rw-r--r--net/rp-pppoe/files/patch-ac15
-rw-r--r--net/rp-pppoe/files/patch-configure (renamed from net/rp-pppoe/files/patch-ab)6
-rw-r--r--net/rp-pppoe/files/patch-if.c33
-rw-r--r--net/rp-pppoe/files/patch-md5.c11
-rw-r--r--net/rp-pppoe/files/patch-pppoe.h (renamed from net/rp-pppoe/files/patch-gcc41-aa)14
-rw-r--r--net/rp-pppoe/files/patch-relay.c (renamed from net/rp-pppoe/files/patch-ad)18
-rw-r--r--net/rp-pppoe/files/patch-relay.h (renamed from net/rp-pppoe/files/patch-ae)4
9 files changed, 82 insertions, 36 deletions
diff --git a/net/rp-pppoe/Makefile b/net/rp-pppoe/Makefile
index 116f2767635e..f8735410740b 100644
--- a/net/rp-pppoe/Makefile
+++ b/net/rp-pppoe/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= rp-pppoe
-PORTVERSION= 3.10
+PORTVERSION= 3.11
CATEGORIES= net
MASTER_SITES= http://www.roaringpenguin.com/files/download/
@@ -30,7 +30,15 @@ DOC_FILES= CHANGES HOW-TO-CONNECT KERNEL-MODE-PPPOE LICENSE \
PROBLEMS
SCRIPT_FILES= pppoe-connect pppoe-init pppoe-setup pppoe-start \
pppoe-status pppoe-stop
-.ifndef (NOPORTDOCS)
+
+OPTIONS_DEFINE= DOCS
+
+# work around "Present But Cannot Be Compiled" issue in GNU configure:
+CFLAGS+= -include sys/types.h -include sys/socket.h -include netinet/in.h
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MDOCS}
PORTDOCS= *
.endif
@@ -49,6 +57,7 @@ post-patch:
@${REINPLACE_CMD} -e "s!/etc/ppp!${PREFIX}/etc/ppp!g" \
${WRKSRC}/scripts/${f}
.endfor
+ @${REINPLACE_CMD} -e "s/\$$^/\$$>/g" ${WRKSRC}/src/Makefile.in
do-install:
# Binaries
diff --git a/net/rp-pppoe/distinfo b/net/rp-pppoe/distinfo
index b4c30a19de9d..9f5ff512bd3b 100644
--- a/net/rp-pppoe/distinfo
+++ b/net/rp-pppoe/distinfo
@@ -1,2 +1,2 @@
-SHA256 (rp-pppoe-3.10.tar.gz) = 709ca7402594acc1d80b99c20219112b5c00e6ac48ae6049fc626fbaf4ce49f6
-SIZE (rp-pppoe-3.10.tar.gz) = 215288
+SHA256 (rp-pppoe-3.11.tar.gz) = 86a1a4d92fcea74fa6dd45516c5975933fa978b36fafe71f76ea70b4b4747720
+SIZE (rp-pppoe-3.11.tar.gz) = 223234
diff --git a/net/rp-pppoe/files/patch-ac b/net/rp-pppoe/files/patch-ac
deleted file mode 100644
index 0203a0b745dc..000000000000
--- a/net/rp-pppoe/files/patch-ac
+++ /dev/null
@@ -1,15 +0,0 @@
---- if.c.orig Mon Jul 8 20:38:24 2002
-+++ if.c Wed Mar 10 15:47:26 2004
-@@ -285,7 +285,12 @@
- int i;
-
- /* BSD only opens one socket for both Discovery and Session packets */
-+#if defined(__FreeBSD__)
-+ /* Confirmed for FreeBSD 4.8-R [SeaD] */
-+ if (!hwaddr) {
-+#else
- if (fd >= 0) {
-+#endif
- return fd;
- }
-
diff --git a/net/rp-pppoe/files/patch-ab b/net/rp-pppoe/files/patch-configure
index e5185a1c211b..6bd259ecb6b8 100644
--- a/net/rp-pppoe/files/patch-ab
+++ b/net/rp-pppoe/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig Mon Jul 8 20:38:24 2002
-+++ configure Wed Mar 10 15:50:51 2004
-@@ -2083,7 +2083,7 @@
+--- ./configure.orig 2012-08-17 20:31:25.000000000 +0200
++++ ./configure 2012-09-23 17:27:26.000000000 +0200
+@@ -4672,7 +4672,7 @@
# Determine what targets to build
diff --git a/net/rp-pppoe/files/patch-if.c b/net/rp-pppoe/files/patch-if.c
new file mode 100644
index 000000000000..3bcff160042a
--- /dev/null
+++ b/net/rp-pppoe/files/patch-if.c
@@ -0,0 +1,33 @@
+--- ./if.c.orig 2012-08-17 20:31:25.000000000 +0200
++++ ./if.c 2012-09-23 17:27:26.000000000 +0200
+@@ -274,7 +274,7 @@
+ * traffic on this network.
+ ***********************************************************************/
+ int
+-openInterface(char const *ifname, UINT16_t type, unsigned char *hwaddr)
++openInterface(char const *ifname, UINT16_t type, unsigned char *hwaddr, UINT16_t *mtu)
+ {
+ static int fd = -1;
+ char bpfName[32];
+@@ -285,7 +285,12 @@
+ int i;
+
+ /* BSD only opens one socket for both Discovery and Session packets */
++#if defined(__FreeBSD__)
++ /* Confirmed for FreeBSD 4.8-R [SeaD] */
++ if (!hwaddr) {
++#else
+ if (fd >= 0) {
++#endif
+ return fd;
+ }
+
+@@ -395,6 +400,8 @@
+ rp_fatal(buffer);
+ }
+
++ if (mtu) *mtu = ifr.ifr_mtu;
++
+ syslog(LOG_INFO, "Interface=%.16s HWaddr=%02X:%02X:%02X:%02X:%02X:%02X Device=%.32s Buffer size=%d",
+ ifname,
+ hwaddr[0], hwaddr[1], hwaddr[2],
diff --git a/net/rp-pppoe/files/patch-md5.c b/net/rp-pppoe/files/patch-md5.c
new file mode 100644
index 000000000000..83a184d00410
--- /dev/null
+++ b/net/rp-pppoe/files/patch-md5.c
@@ -0,0 +1,11 @@
+--- ./md5.c.orig 2012-08-17 20:31:25.000000000 +0200
++++ ./md5.c 2012-09-23 17:27:55.000000000 +0200
+@@ -141,7 +141,7 @@
+ MD5Transform(ctx->buf, (uint32 *) ctx->in);
+ byteReverse((unsigned char *) ctx->buf, 4);
+ memcpy(digest, ctx->buf, 16);
+- memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
++ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
+ }
+
+ #ifndef ASM_MD5
diff --git a/net/rp-pppoe/files/patch-gcc41-aa b/net/rp-pppoe/files/patch-pppoe.h
index 6d7045b5b78d..4bd133292750 100644
--- a/net/rp-pppoe/files/patch-gcc41-aa
+++ b/net/rp-pppoe/files/patch-pppoe.h
@@ -1,6 +1,14 @@
---- pppoe.h.orig Fri Dec 15 12:02:31 2006
-+++ pppoe.h Fri Dec 15 12:03:23 2006
-@@ -75,7 +75,6 @@
+--- ./pppoe.h.orig 2012-08-17 20:31:25.000000000 +0200
++++ ./pppoe.h 2012-09-23 17:27:26.000000000 +0200
+@@ -72,10 +72,14 @@
+ #include <net/if_ppp.h>
+ #endif
+
++#ifdef __FreeBSD__
++#include <sys/types.h>
++#include <net/ethernet.h>
++#endif
++
#ifdef USE_BPF
extern int bpfSize;
struct PPPoEPacketStruct;
diff --git a/net/rp-pppoe/files/patch-ad b/net/rp-pppoe/files/patch-relay.c
index 5bab53ed4e0d..7ecc842801ad 100644
--- a/net/rp-pppoe/files/patch-ad
+++ b/net/rp-pppoe/files/patch-relay.c
@@ -1,6 +1,6 @@
---- relay.c.orig Mon Jul 8 20:38:24 2002
-+++ relay.c Wed Mar 10 16:29:40 2004
-@@ -743,6 +743,11 @@
+--- ./relay.c.orig 2012-08-17 20:31:25.000000000 +0200
++++ ./relay.c 2012-09-23 17:27:26.000000000 +0200
+@@ -751,6 +751,11 @@
relayLoop()
{
fd_set readable, readableCopy;
@@ -12,7 +12,7 @@
int maxFD;
int i, r;
int sock;
-@@ -772,6 +777,27 @@
+@@ -780,6 +785,27 @@
continue;
}
@@ -40,7 +40,7 @@
/* Handle session packets first */
for (i=0; i<NumInterfaces; i++) {
if (FD_ISSET(Interfaces[i].sessionSock, &readableCopy)) {
-@@ -786,6 +812,7 @@
+@@ -794,6 +820,7 @@
}
}
@@ -48,7 +48,7 @@
/* Handle the session-cleaning process */
if (FD_ISSET(CleanPipe[0], &readableCopy)) {
char dummy;
-@@ -805,6 +832,46 @@
+@@ -813,6 +840,46 @@
*%DESCRIPTION:
* Receives and processes a discovery packet.
***********************************************************************/
@@ -95,7 +95,7 @@
void
relayGotDiscoveryPacket(PPPoEInterface const *iface)
{
-@@ -852,6 +919,7 @@
+@@ -860,6 +927,7 @@
iface->name, (int) packet.code);
}
}
@@ -103,7 +103,7 @@
/**********************************************************************
*%FUNCTION: relayGotSessionPacket
-@@ -862,6 +930,65 @@
+@@ -870,6 +938,65 @@
*%DESCRIPTION:
* Receives and processes a session packet.
***********************************************************************/
@@ -169,7 +169,7 @@
void
relayGotSessionPacket(PPPoEInterface const *iface)
{
-@@ -928,6 +1055,7 @@
+@@ -936,6 +1063,7 @@
#endif
sendPacket(NULL, sh->interface->sessionSock, &packet, size);
}
diff --git a/net/rp-pppoe/files/patch-ae b/net/rp-pppoe/files/patch-relay.h
index 10ecb35213df..aee1ace2aeab 100644
--- a/net/rp-pppoe/files/patch-ae
+++ b/net/rp-pppoe/files/patch-relay.h
@@ -1,5 +1,5 @@
---- relay.h.orig Mon Jul 8 20:38:24 2002
-+++ relay.h Wed Mar 10 15:50:51 2004
+--- ./relay.h.orig 2012-08-17 20:31:25.000000000 +0200
++++ ./relay.h 2012-09-23 17:27:26.000000000 +0200
@@ -51,8 +51,13 @@
/* Function prototypes */