aboutsummaryrefslogtreecommitdiff
path: root/net/l2tpd
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2005-09-19 17:37:17 +0000
committerRenato Botelho <garga@FreeBSD.org>2005-09-19 17:37:17 +0000
commit20fb07058b9fc5e8fb288dffe85c35655f83534d (patch)
tree9b2dfdb477747f00a7149fad189b5a53c4b6bd6b /net/l2tpd
parent5162920921bdd0d764904af36f3bc08a4c6064f9 (diff)
downloadports-20fb07058b9fc5e8fb288dffe85c35655f83534d.tar.gz
ports-20fb07058b9fc5e8fb288dffe85c35655f83534d.zip
Notes
Diffstat (limited to 'net/l2tpd')
-rw-r--r--net/l2tpd/Makefile13
-rw-r--r--net/l2tpd/files/patch-avp.c18
-rw-r--r--net/l2tpd/files/patch-control.c22
-rw-r--r--net/l2tpd/pkg-plist4
4 files changed, 36 insertions, 21 deletions
diff --git a/net/l2tpd/Makefile b/net/l2tpd/Makefile
index 244cc9deead2..ecfe1acc70f8 100644
--- a/net/l2tpd/Makefile
+++ b/net/l2tpd/Makefile
@@ -7,9 +7,10 @@
PORTNAME= l2tpd
PORTVERSION= 0.69
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= net
-MASTER_SITES= http://www.l2tpd.org/downloads/
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= sobomax@FreeBSD.org
COMMENT= An implementation of the layer two tunneling protocol
@@ -21,10 +22,6 @@ MAN8= l2tpd.8
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 502126
-BROKEN= "Does not compile on FreeBSD >= 5.x"
-.endif
-
do-configure:
${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/doc/l2tpd.8 \
${WRKSRC}/doc/l2tpd.conf.sample ${WRKSRC}/doc/l2tp-secrets.5 \
@@ -32,8 +29,10 @@ do-configure:
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/l2tpd ${PREFIX}/bin
+.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
- ${INSTALL_MAN} ${WRKSRC}/README ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
+.endif
${INSTALL_MAN} ${WRKSRC}/doc/l2tpd.8 ${PREFIX}/man/man8
${INSTALL_MAN} ${WRKSRC}/doc/l2tp-secrets.5 ${PREFIX}/man/man5
${INSTALL_MAN} ${WRKSRC}/doc/l2tpd.conf.5 ${PREFIX}/man/man5
diff --git a/net/l2tpd/files/patch-avp.c b/net/l2tpd/files/patch-avp.c
index ec8d1c93f245..ed288b18c84c 100644
--- a/net/l2tpd/files/patch-avp.c
+++ b/net/l2tpd/files/patch-avp.c
@@ -1,9 +1,6 @@
-
-$FreeBSD$
-
---- avp.c 2002/10/22 09:41:27 1.1
-+++ avp.c 2002/10/22 09:43:02
-@@ -14,7 +14,6 @@
+--- avp.c.orig Mon Aug 19 19:39:27 2002
++++ avp.c Tue Aug 9 12:29:34 2005
+@@ -15,7 +15,6 @@
#include <string.h>
#include <stdio.h>
#include <errno.h>
@@ -11,3 +8,12 @@ $FreeBSD$
#include "l2tp.h"
#define AVP_MAX 39
+@@ -1608,7 +1607,7 @@
+ if (AMBIT (avp->length))
+ {
+ log (LOG_WARN,
+- "%s: dont know how to handle mandatory attribute %d. Closing %s.\n"
++ "%s: dont know how to handle mandatory attribute %d. Closing %s.\n",
+ __FUNCTION__, avp->attr,
+ (c != t->self) ? "call" : "tunnel");
+ set_error (c, VENDOR_ERROR,
diff --git a/net/l2tpd/files/patch-control.c b/net/l2tpd/files/patch-control.c
index 92d4e18601a2..6e0b458d9baa 100644
--- a/net/l2tpd/files/patch-control.c
+++ b/net/l2tpd/files/patch-control.c
@@ -1,9 +1,6 @@
-
-$FreeBSD$
-
---- control.c 2002/10/22 09:41:27 1.1
-+++ control.c 2002/10/22 09:43:24
-@@ -15,8 +15,6 @@
+--- control.c.orig.o Thu Apr 11 00:09:33 2002
++++ control.c Tue Aug 9 13:20:07 2005
+@@ -16,8 +16,6 @@
#include <errno.h>
#include <string.h>
#include <stdio.h>
@@ -12,3 +9,16 @@ $FreeBSD$
#include <unistd.h>
#include <stdlib.h>
#include "l2tp.h"
+@@ -1582,6 +1580,12 @@
+ wbuf[pos++] = e;
+ for (x = 0; x < buf->len; x++)
+ {
++ // we must at least still have 3 bytes left in the worst case scenario:
++ // 1 for a possible escape, 1 for the value and 1 to end the PPP stream.
++ if(pos >= (sizeof(wbuf) - 4)) {
++ return -EINVAL;
++ }
++
+ e = *((char *) buf->start + x);
+ if ((e < 0x20) || (e == PPP_ESCAPE) || (e == PPP_FLAG))
+ {
diff --git a/net/l2tpd/pkg-plist b/net/l2tpd/pkg-plist
index 17b1d761dae8..c5c429d7dc21 100644
--- a/net/l2tpd/pkg-plist
+++ b/net/l2tpd/pkg-plist
@@ -1,6 +1,6 @@
bin/l2tpd
etc/l2tp/l2tp-secrets.sample
etc/l2tp/l2tpd.conf.sample
-share/doc/l2tpd/README
-@dirrm share/doc/l2tpd
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrm etc/l2tp