From 89c6556338eee5e15621d821f691eabc54556f3e Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Sat, 19 Feb 2022 22:49:14 +0100 Subject: [PATCH] miniupnpd/ipfw: make it clear it is not working under FreeBSD --- miniupnpd/configure | 8 ++++++-- miniupnpd/ipfw/ipfwrdr.c | 9 ++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/miniupnpd/configure b/miniupnpd/configure index 6dc030d..4513e8d 100755 --- a/miniupnpd/configure +++ b/miniupnpd/configure @@ -1,10 +1,10 @@ #! /bin/sh -# $Id: configure,v 1.116 2021/05/21 22:04:34 nanard Exp $ +# $Id: configure,v 1.119 2022/02/19 21:44:50 nanard Exp $ # vim: tabstop=4 shiftwidth=4 noexpandtab # # miniupnp daemon # http://miniupnp.free.fr or https://miniupnp.tuxfamily.org/ -# (c) 2006-2021 Thomas Bernard +# (c) 2006-2022 Thomas Bernard # This software is subject to the conditions detailed in the # LICENCE file provided within the distribution @@ -253,6 +253,10 @@ case $OS_NAME in echo "Could not detect usage of ipf, pf, ipfw. Compiling for pf by default" FW=pf fi + if [ "$FW" = "ipfw" ] ; then + echo "!!! ipfw is known to not work with FreeBSD, please contribute !!!" + echo "!!! see https://github.com/miniupnp/miniupnp/issues/596 !!!" + fi echo "#define USE_IFACEWATCHER 1" >> ${CONFIGFILE} OS_URL=http://www.freebsd.org/ V6SOCKETS_ARE_V6ONLY=`sysctl -n net.inet6.ip6.v6only` diff --git a/miniupnpd/ipfw/ipfwrdr.c b/miniupnpd/ipfw/ipfwrdr.c index 9994127..a2fa695 100644 --- a/miniupnpd/ipfw/ipfwrdr.c +++ b/miniupnpd/ipfw/ipfwrdr.c @@ -1,4 +1,4 @@ -/* $Id: ipfwrdr.c,v 1.17 2020/05/10 22:25:45 nanard Exp $ */ +/* $Id: ipfwrdr.c,v 1.18 2022/02/19 21:44:51 nanard Exp $ */ /* * MiniUPnP project * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ @@ -70,6 +70,13 @@ struct file; #include "../upnpglobalvars.h" +/* This ipfw backend is known to work with OS X up to 10.6. + * Some work is needed to support FreeBSD ipfw. + */ +#ifndef IP_FW_CURRENT_API_VERSION +#error "ip_fw.h does not contain supported API" +#endif + /* init and shutdown functions */ int init_redirect(void) {