- Update to 3.16

- Fix 10-CURRENT support [1]

PR:		ports/165997 [1]
Submitted by:	Stanislav Sedov <stas@deglitch.com> [1]
This commit is contained in:
Ryan Steinmetz 2012-04-15 14:38:59 +00:00
parent 292c07a090
commit df184e32c9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=294859
4 changed files with 62 additions and 6 deletions

View file

@ -6,7 +6,7 @@
#
PORTNAME= openconnect
PORTVERSION= 3.15
PORTVERSION= 3.16
CATEGORIES= security
MASTER_SITES= ftp://ftp.infradead.org/pub/openconnect/ \
http://mirrors.rit.edu/zi/

View file

@ -1,2 +1,2 @@
SHA256 (openconnect-3.15.tar.gz) = b533083f47643621ff4decb293300ce49339d6b3ff3c21b75f5035d6df5edcc2
SIZE (openconnect-3.15.tar.gz) = 571460
SHA256 (openconnect-3.16.tar.gz) = 556c42b06c33e95db5fe1dc8a3b22f0fca1352c6fb0a432bd59d6178089597b6
SIZE (openconnect-3.16.tar.gz) = 552359

View file

@ -0,0 +1,56 @@
--- tun.c.orig 2011-11-24 08:18:34.000000000 -0800
+++ tun.c 2012-03-12 22:46:30.000000000 -0700
@@ -38,6 +38,9 @@
#include <arpa/inet.h>
#include <errno.h>
#include <ctype.h>
+#if defined(__FreeBSD__)
+#include <sys/param.h> /* For __FreeBSD_version */
+#endif
#if defined(__sun__)
#include <stropts.h>
#include <sys/sockio.h>
@@ -109,9 +112,43 @@
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = inet_addr(vpninfo->vpn_addr);
+
+ /*
+ * SIOCSIFADDR ioctl was dropped in FreeBSD 10.0
+ */
+#if defined(__FreeBSD__) && __FreeBSD_version > 1000004
+ {
+ struct ifaliasreq ifra;
+ struct sockaddr_in *sin;
+
+ memset(&ifra, 0, sizeof(ifra));
+ strncpy(ifra.ifra_name, vpninfo->ifname, sizeof(ifra.ifra_name) - 1);
+
+ /* Set source address. */
+ sin = (struct sockaddr_in *)&(ifra.ifra_addr);
+ memcpy(sin, &addr, sizeof(struct sockaddr_in));
+ sin->sin_len = sizeof(*sin);
+
+ /* Set destination address. */
+ sin = (struct sockaddr_in *)&(ifra.ifra_broadaddr);
+ memcpy(sin, &addr, sizeof(struct sockaddr_in));
+ sin->sin_len = sizeof(*sin);
+
+ /* Set mask address. */
+ sin = (struct sockaddr_in *)&(ifra.ifra_mask);
+ addr.sin_family = AF_INET;
+ addr.sin_addr.s_addr = 0xffffffff;
+ memcpy(sin, &addr, sizeof(struct sockaddr_in));
+ sin->sin_len = sizeof(*sin);
+
+ if (ioctl(net_fd, SIOCAIFADDR, &ifra) < 0)
+ perror(_("SIOCAIFADDR"));
+ }
+#else
memcpy(&ifr.ifr_addr, &addr, sizeof(addr));
if (ioctl(net_fd, SIOCSIFADDR, &ifr) < 0)
perror(_("SIOCSIFADDR"));
+#endif
}
ifr.ifr_mtu = vpninfo->mtu;

View file

@ -1,10 +1,10 @@
--- www/Makefile.am.orig 2012-03-12 20:25:28.000000000 -0700
+++ www/Makefile.am 2012-03-12 20:25:34.000000000 -0700
--- ./www/Makefile.am.orig 2012-04-15 10:31:27.000000000 -0400
+++ ./www/Makefile.am 2012-04-15 10:31:33.000000000 -0400
@@ -25,6 +25,6 @@
manual.html: openconnect.8.inc
openconnect.8.inc: $(top_srcdir)/openconnect.8
- groff -t -K UTF-8 -mandoc -Txhtml $^ | sed -e '1,/<body>/d' -e '/<\/body>/,$$d' > $@
- groff -t -K UTF-8 -mandoc -Txhtml $? | sed -e '1,/<body>/d' -e '/<\/body>/,$$d' > $@
+ groff -t -mandoc -Thtml $^ | sed -e '1,/<body>/d' -e '/<\/body>/,$$d' > $@
EXTRA_DIST = $(patsubst %.html,%.xml,$(ALL_PAGES)) menu1.xml menu2*.xml html.py