aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorfeld <feld@FreeBSD.org>2018-02-08 06:37:31 +0800
committerfeld <feld@FreeBSD.org>2018-02-08 06:37:31 +0800
commitd1f599f740eb4face5cf2164ef4b478c63466f06 (patch)
treef04d9415f71e16da840b0d9689f260d70bc91e75 /net
parent06f2d6576e185cb55ad622735a8a01e1b83d1841 (diff)
downloadfreebsd-ports-gnome-d1f599f740eb4face5cf2164ef4b478c63466f06.tar.gz
freebsd-ports-gnome-d1f599f740eb4face5cf2164ef4b478c63466f06.tar.zst
freebsd-ports-gnome-d1f599f740eb4face5cf2164ef4b478c63466f06.zip
net/igmpproxy: Update to 0.2
- Change maintainer PR: 224543
Diffstat (limited to 'net')
-rw-r--r--net/igmpproxy/Makefile21
-rw-r--r--net/igmpproxy/distinfo5
-rw-r--r--net/igmpproxy/files/0001-Revert-Try-to-fix-problems-with-strict-aliasing.patch84
-rw-r--r--net/igmpproxy/files/0002-Revert-Include-config.h-before-any-other-files-to-ma.patch32
-rw-r--r--net/igmpproxy/files/patch-Makefile.in14
-rw-r--r--net/igmpproxy/files/patch-src__os-freebsd.h23
-rw-r--r--net/igmpproxy/files/patch-src_igmpproxy.c14
7 files changed, 148 insertions, 45 deletions
diff --git a/net/igmpproxy/Makefile b/net/igmpproxy/Makefile
index 0c938595c83c..a0890f18809e 100644
--- a/net/igmpproxy/Makefile
+++ b/net/igmpproxy/Makefile
@@ -2,19 +2,28 @@
# $FreeBSD$
PORTNAME= igmpproxy
-PORTVERSION= 0.1
-PORTREVISION= 2
+PORTVERSION= 0.2
PORTEPOCH= 1
CATEGORIES= net
-MASTER_SITES= SF
-MAINTAINER= melifaro@ipfw.ru
+MAINTAINER= franco@opnsense.org
COMMENT= Multicast forwarding IGMP proxy
-HOMEPAGE= http://igmpproxy.sourceforge.net/
+LICENSE= GPLv2+
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+USE_GITHUB= yes
+GH_ACCOUNT= pali
USE_RC_SUBR= igmpproxy
-USES= gmake
+USES= autoreconf
GNU_CONFIGURE= yes
+EXTRA_PATCHES+= ${FILESDIR}/0001-Revert-Try-to-fix-problems-with-strict-aliasing.patch:-p1
+EXTRA_PATCHES+= ${FILESDIR}/0002-Revert-Include-config.h-before-any-other-files-to-ma.patch:-p1
+
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/igmpproxy.conf \
+ ${STAGEDIR}${PREFIX}/etc/igmpproxy.conf.sample
+
.include <bsd.port.mk>
diff --git a/net/igmpproxy/distinfo b/net/igmpproxy/distinfo
index 7ecdb2b462c8..3d96720471ed 100644
--- a/net/igmpproxy/distinfo
+++ b/net/igmpproxy/distinfo
@@ -1,2 +1,3 @@
-SHA256 (igmpproxy-0.1.tar.gz) = ee18ff3d8c3ae3a29dccb7e5eedf332337330020168bd95a11cece8d7d7ee6ae
-SIZE (igmpproxy-0.1.tar.gz) = 140159
+TIMESTAMP = 1513975936
+SHA256 (pali-igmpproxy-0.2_GH0.tar.gz) = 48fdaaa698c2ebe1c674b9ba4f9cb1369453bc97295434b608c9d5dab18c9293
+SIZE (pali-igmpproxy-0.2_GH0.tar.gz) = 41732
diff --git a/net/igmpproxy/files/0001-Revert-Try-to-fix-problems-with-strict-aliasing.patch b/net/igmpproxy/files/0001-Revert-Try-to-fix-problems-with-strict-aliasing.patch
new file mode 100644
index 000000000000..9eb3932353e0
--- /dev/null
+++ b/net/igmpproxy/files/0001-Revert-Try-to-fix-problems-with-strict-aliasing.patch
@@ -0,0 +1,84 @@
+This reverts commit c371602f5f499a29d1fb1c43a8d12f21ff56296b.
+---
+ src/ifvc.c | 23 ++++++++++-------------
+ 1 file changed, 10 insertions(+), 13 deletions(-)
+
+diff --git a/src/ifvc.c b/src/ifvc.c
+index 3a7476d..2d487ed 100644
+--- a/src/ifvc.c
++++ b/src/ifvc.c
+@@ -34,13 +34,6 @@
+
+ #include "igmpproxy.h"
+
+-/* We need a temporary copy to not break strict aliasing rules */
+-static inline uint32_t s_addr_from_sockaddr(const struct sockaddr *addr) {
+- struct sockaddr_in addr_in;
+- memcpy(&addr_in, addr, sizeof(addr_in));
+- return addr_in.sin_addr.s_addr;
+-}
+-
+ struct IfDesc IfDescVc[ MAX_IF ], *IfDescEp = IfDescVc;
+
+ /* aimwang: add for detect interface and rebuild IfVc record */
+@@ -112,15 +105,17 @@ void rebuildIfVc () {
+ }
+
+ // Get the interface adress...
+- Dp->InAdr.s_addr = s_addr_from_sockaddr(&IfPt->ifr_addr);
++ Dp->InAdr = ((struct sockaddr_in *)&IfPt->ifr_addr)->sin_addr;
+ addr = Dp->InAdr.s_addr;
+
+ memcpy( IfReq.ifr_name, Dp->Name, sizeof( IfReq.ifr_name ) );
++ IfReq.ifr_addr.sa_family = AF_INET;
++ ((struct sockaddr_in *)&IfReq.ifr_addr)->sin_addr.s_addr = addr;
+
+ // Get the subnet mask...
+ if (ioctl(Sock, SIOCGIFNETMASK, &IfReq ) < 0)
+ my_log(LOG_ERR, errno, "ioctl SIOCGIFNETMASK for %s", IfReq.ifr_name);
+- mask = s_addr_from_sockaddr(&IfReq.ifr_netmask);
++ mask = ((struct sockaddr_in *)&IfReq.ifr_addr)->sin_addr.s_addr;
+ subnet = addr & mask;
+
+ if ( ioctl( Sock, SIOCGIFFLAGS, &IfReq ) < 0 )
+@@ -131,7 +126,7 @@ void rebuildIfVc () {
+ {
+ if ( ioctl( Sock, SIOCGIFDSTADDR, &IfReq ) < 0 )
+ my_log(LOG_ERR, errno, "ioctl SIOCGIFDSTADDR for %s", IfReq.ifr_name);
+- addr = s_addr_from_sockaddr(&IfReq.ifr_dstaddr);
++ addr = ((struct sockaddr_in *)&IfReq.ifr_dstaddr)->sin_addr.s_addr;
+ subnet = addr & mask;
+ }
+
+@@ -263,15 +258,17 @@ void buildIfVc(void) {
+ }
+
+ // Get the interface adress...
+- IfDescEp->InAdr.s_addr = s_addr_from_sockaddr(&IfPt->ifr_addr);
++ IfDescEp->InAdr = ((struct sockaddr_in *)&IfPt->ifr_addr)->sin_addr;
+ addr = IfDescEp->InAdr.s_addr;
+
+ memcpy( IfReq.ifr_name, IfDescEp->Name, sizeof( IfReq.ifr_name ) );
++ IfReq.ifr_addr.sa_family = AF_INET;
++ ((struct sockaddr_in *)&IfReq.ifr_addr)->sin_addr.s_addr = addr;
+
+ // Get the subnet mask...
+ if (ioctl(Sock, SIOCGIFNETMASK, &IfReq ) < 0)
+ my_log(LOG_ERR, errno, "ioctl SIOCGIFNETMASK for %s", IfReq.ifr_name);
+- mask = s_addr_from_sockaddr(&IfReq.ifr_netmask);
++ mask = ((struct sockaddr_in *)&IfReq.ifr_addr)->sin_addr.s_addr;
+ subnet = addr & mask;
+
+ /* get if flags
+@@ -293,7 +290,7 @@ void buildIfVc(void) {
+ {
+ if ( ioctl( Sock, SIOCGIFDSTADDR, &IfReq ) < 0 )
+ my_log(LOG_ERR, errno, "ioctl SIOCGIFDSTADDR for %s", IfReq.ifr_name);
+- addr = s_addr_from_sockaddr(&IfReq.ifr_dstaddr);
++ addr = ((struct sockaddr_in *)&IfReq.ifr_dstaddr)->sin_addr.s_addr;
+ subnet = addr & mask;
+ }
+
+--
+2.15.1
+
diff --git a/net/igmpproxy/files/0002-Revert-Include-config.h-before-any-other-files-to-ma.patch b/net/igmpproxy/files/0002-Revert-Include-config.h-before-any-other-files-to-ma.patch
new file mode 100644
index 000000000000..13ad55d4f71b
--- /dev/null
+++ b/net/igmpproxy/files/0002-Revert-Include-config.h-before-any-other-files-to-ma.patch
@@ -0,0 +1,32 @@
+This reverts commit 7fcb7900b757b64cf58e6b2d1d473de289945e8d.
+---
+ src/igmpproxy.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/igmpproxy.h b/src/igmpproxy.h
+index ad1063b..6980e35 100644
+--- a/src/igmpproxy.h
++++ b/src/igmpproxy.h
+@@ -35,9 +35,6 @@
+ * igmpproxy.h - Header file for common includes.
+ */
+
+-#include "config.h"
+-#include "os.h"
+-
+ #include <errno.h>
+ #include <stdarg.h>
+ #include <stdio.h>
+@@ -60,6 +57,9 @@
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+
++#include "os.h"
++#include "config.h"
++
+ /*
+ * Limit on length of route data
+ */
+--
+2.15.1
+
diff --git a/net/igmpproxy/files/patch-Makefile.in b/net/igmpproxy/files/patch-Makefile.in
deleted file mode 100644
index 1abcfd500a94..000000000000
--- a/net/igmpproxy/files/patch-Makefile.in
+++ /dev/null
@@ -1,14 +0,0 @@
---- Makefile.in.orig 2009-10-05 18:19:42 UTC
-+++ Makefile.in
-@@ -284,7 +284,10 @@
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sysconfdir)'"; \
-- $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \
-+ if [ ! -f "$(DESTDIR)$(sysconfdir)/$$files" ]; then \
-+ $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \
-+ fi; \
-+ $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)/$$files.sample" || exit $$?; \
- done
-
- uninstall-dist_sysconfDATA:
diff --git a/net/igmpproxy/files/patch-src__os-freebsd.h b/net/igmpproxy/files/patch-src__os-freebsd.h
deleted file mode 100644
index f2a61c39beb7..000000000000
--- a/net/igmpproxy/files/patch-src__os-freebsd.h
+++ /dev/null
@@ -1,23 +0,0 @@
---- src/os-freebsd.h.orig 2009-10-06 02:07:06.000000000 +0800
-+++ src/os-freebsd.h 2016-01-20 15:43:54.364740000 +0800
-@@ -14,10 +14,20 @@
-
- static inline u_short ip_data_len(const struct ip *ip)
- {
-+#if __FreeBSD_version >= 1100030
-+ return ntohs(ip->ip_len) - (ip->ip_hl << 2);
-+#elif __FreeBSD_version >= 900044
-+ return ip->ip_len - (ip->ip_hl << 2);
-+#else
- return ip->ip_len;
-+#endif
- }
-
- static inline void ip_set_len(struct ip *ip, u_short len)
- {
-+#if __FreeBSD_version >= 1100030
-+ ip->ip_len = htons(len);
-+#else
- ip->ip_len = len;
-+#endif
- }
diff --git a/net/igmpproxy/files/patch-src_igmpproxy.c b/net/igmpproxy/files/patch-src_igmpproxy.c
new file mode 100644
index 000000000000..5f88928fc22c
--- /dev/null
+++ b/net/igmpproxy/files/patch-src_igmpproxy.c
@@ -0,0 +1,14 @@
+--- src/igmpproxy.c.orig 2017-12-22 20:49:54 UTC
++++ src/igmpproxy.c
+@@ -37,11 +37,6 @@
+ * February 2005 - Johnny Egeland
+ */
+
+-/* getopt() and clock_getime() */
+-#ifndef _POSIX_C_SOURCE
+-#define _POSIX_C_SOURCE 200112L
+-#endif
+-
+ #include "igmpproxy.h"
+
+ static const char Usage[] =