Index: head/security/vpnc/Makefile =================================================================== --- head/security/vpnc/Makefile (revision 169082) +++ head/security/vpnc/Makefile (revision 169083) @@ -1,60 +1,60 @@ # New ports collection makefile for: vpnc # Date created: 15 December 2003 # Whom: Christian Lackas # # $FreeBSD$ # PORTNAME= vpnc PORTVERSION= 0.3.3 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= security MASTER_SITES= http://www.unix-ag.uni-kl.de/~massar/vpnc/ MAINTAINER= delta@lackas.net COMMENT= Client for Cisco 3000 VPN Concentrator LIB_DEPENDS= gcrypt.13:${PORTSDIR}/security/libgcrypt USE_GMAKE= yes ALL_TARGET= vpnc PLIST_FILES= sbin/vpnc \ sbin/vpnc-script \ sbin/vpnc-disconnect \ etc/vpnc.conf.sample \ etc/rc.d/vpnc.sh.sample PORTDOCS= README ChangeLog TODO MAN8= vpnc.8 .include post-patch: @${REINPLACE_CMD} -e \ 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/config.c @${REINPLACE_CMD} -e \ 's|%%CC%%|${CC}|;s|%%CFLAGS%%|${CFLAGS}|' \ ${WRKSRC}/Makefile do-install: @${INSTALL_PROGRAM} -m 751 ${WRKSRC}/vpnc ${PREFIX}/sbin/vpnc @${INSTALL_SCRIPT} -m 751 ${WRKSRC}/vpnc-script ${PREFIX}/sbin/vpnc-script @${INSTALL_SCRIPT} -m 751 ${WRKSRC}/vpnc-disconnect ${PREFIX}/sbin/vpnc-disconnect @${INSTALL_SCRIPT} ${FILESDIR}/vpnc.sh ${WRKDIR} @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKDIR}/vpnc.sh @${INSTALL_SCRIPT} -m 755 ${WRKDIR}/vpnc.sh ${PREFIX}/etc/rc.d/vpnc.sh.sample @${INSTALL_DATA} -m 600 ${WRKSRC}/vpnc.conf ${PREFIX}/etc/vpnc.conf.sample .if !defined(NO_INSTALL_MANPAGES) @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/vpnc.8 @${INSTALL_MAN} ${WRKSRC}/vpnc.8 ${PREFIX}/man/man8 .endif .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} @cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} .endif post-install: @${CAT} ${PKGMESSAGE} .include Property changes on: head/security/vpnc/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.19 \ No newline at end of property +1.20 \ No newline at end of property Index: head/security/vpnc/files/patch-tunip.c =================================================================== --- head/security/vpnc/files/patch-tunip.c (nonexistent) +++ head/security/vpnc/files/patch-tunip.c (revision 169083) @@ -0,0 +1,48 @@ +Index: tunip.c +=================================================================== +--- tunip.c (revision 67) ++++ tunip.c (working copy) +@@ -3,6 +3,7 @@ + Copyright (C) 2002 Geoffrey Keating + Copyright (C) 2003-2005 Maurice Massar + Copyright (C) 2004 Tomas Mraz ++ Copyright (C) 2006 Daniel Roethlisberger + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -776,7 +777,16 @@ + { + int sock; + struct pollfd pollfds[2]; ++ int enable_keepalives; ++ int poll_timeout; + ++ /* non-esp marker, nat keepalive payload (0xFF) */ ++ char keepalive[5] = { 0x00, 0x00, 0x00, 0x00, 0xFF }; ++ ++ /* send keepalives if UDP encapsulation is enabled */ ++ enable_keepalives = !strcmp(meth->name, "udpesp"); ++ poll_timeout = enable_keepalives ? 20000 : -1; ++ + pollfds[0].fd = tun_fd; + pollfds[0].events = POLLIN; + pollfds[1].fd = encap_get_fd(meth); +@@ -786,8 +796,16 @@ + int presult; + + do { +- presult = poll(pollfds, sizeof(pollfds) / sizeof(pollfds[0]), -1); +- } while (presult == -1 && errno == EINTR && !do_kill); ++ presult = poll(pollfds, sizeof(pollfds) / sizeof(pollfds[0]), poll_timeout); ++ if (presult == 0 && enable_keepalives) { ++ /* send nat keepalive packet */ ++ if(sendto(meth->fd, keepalive, sizeof(keepalive), 0, ++ (struct sockaddr*)&peer->remote_sa->dest, ++ sizeof(peer->remote_sa->dest)) == -1) { ++ syslog(LOG_ERR, "sendto: %m"); ++ } ++ } ++ } while ((presult == 0 || (presult == -1 && errno == EINTR)) && !do_kill); + if (presult == -1) { + syslog(LOG_ERR, "poll: %m"); + continue; Property changes on: head/security/vpnc/files/patch-tunip.c ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.3 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property