Date: Tue, 09 Aug 2005 13:40:28 +0400 From: Andrej Zverev <az@inec.ru> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/84695: [unbreak] net/l2tpd Message-ID: <E1E2Qay-0000Q6-ST@az.inec.ru> Resent-Message-ID: <200508090950.j799oAbh078568@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 84695 >Category: ports >Synopsis: [unbreak] net/l2tpd >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Tue Aug 09 09:50:09 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Andrej Zverev >Release: FreeBSD 5.4-RELEASE-p1 i386 >Organization: >Environment: System: FreeBSD az.inec.ru 5.4-RELEASE-p1 FreeBSD 5.4-RELEASE-p1 #2: Wed Jul 6 12:10:32 MSD 2005 root@az.inec.ru:/usr/obj/usr/src/sys/GENERIC i386 >Description: 1. Fix build on >= 5.x 2. Patch for http://www.FreeBSD.org/ports/portaudit/807b9ddd-dc11-11d8-9b0a-000347a4fa7d.html (from debian proj) 3. New MASTER_SITE >How-To-Repeat: >Fix: --- l2tpd.diff begins here --- diff -Nru l2tpd.orig/Makefile l2tpd/Makefile --- l2tpd.orig/Makefile Sat Sep 18 22:38:34 2004 +++ l2tpd/Makefile Tue Aug 9 13:21:50 2005 @@ -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 @@ .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-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 -Nru l2tpd.orig/files/patch-avp.c l2tpd/files/patch-avp.c --- l2tpd.orig/files/patch-avp.c Wed Oct 23 17:21:53 2002 +++ l2tpd/files/patch-avp.c Tue Aug 9 12:29:44 2005 @@ -1,9 +1,6 @@ - -$FreeBSD: ports/net/l2tpd/files/patch-avp.c,v 1.1 2002/10/23 13:21:53 sobomax Exp $ - ---- 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 @@ #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 -Nru l2tpd.orig/files/patch-control.c l2tpd/files/patch-control.c --- l2tpd.orig/files/patch-control.c Wed Oct 23 17:21:53 2002 +++ l2tpd/files/patch-control.c Tue Aug 9 13:20:10 2005 @@ -1,9 +1,6 @@ - -$FreeBSD: ports/net/l2tpd/files/patch-control.c,v 1.1 2002/10/23 13:21:53 sobomax Exp $ - ---- 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 @@ #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 -Nru l2tpd.orig/pkg-plist l2tpd/pkg-plist --- l2tpd.orig/pkg-plist Sat Nov 23 03:40:50 2002 +++ l2tpd/pkg-plist Tue Aug 9 12:36:45 2005 @@ -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 --- l2tpd.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1E2Qay-0000Q6-ST>