From 9ac353cb5e8f20cc6974eaf83d2067fb489bb100 Mon Sep 17 00:00:00 2001 From: edrikk Date: Wed, 5 Jul 2017 14:40:51 -0400 Subject: [PATCH] Adding Tomato ifdef for netfilter chain to check To allow for "drop-in" upgrades of Miniupnp within Tomato firmware, submitting this change back upstream. Original source: https://bitbucket.org/kille72/tomato-arm-kille72/commits/b9d9e4b0ed761c6cdddd1227676b08bce2934481?at=shibby-arm --- miniupnpd/portinuse.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/miniupnpd/portinuse.c b/miniupnpd/portinuse.c index 7ff0e84..7b3cbec 100644 --- a/miniupnpd/portinuse.c +++ b/miniupnpd/portinuse.c @@ -56,7 +56,11 @@ #if defined(USE_NETFILTER) /* Hardcoded for now. Ideally would come from .conf file */ -char *chains_to_check[] = { "PREROUTING" , 0 }; +# ifdef TOMATO + char *chains_to_check[] = { "WANPREROUTING" , 0 }; +# else + char *chains_to_check[] = { "PREROUTING" , 0 }; +# endif #endif int