Message ID | 1421148459-7260-1-git-send-email-kim.demey@gmail.com |
---|---|
State | Superseded |
Headers | show |
Hi, thank you for the patch. Since there already is a generic free further down I decided to move the offending code blocks into the else clause wich sets valid = true, see http://nbd.name/gitweb.cgi?p=firewall3.git;a=commit;h=adf87f3a36328b949ed777068b14d975b429f9ad ~ Jow
On 13 January 2015 at 12:49, Jo-Philipp Wich <jow@openwrt.org> wrote: > Hi, > > thank you for the patch. > > Since there already is a generic free further down I decided to move the > offending code blocks into the else clause wich sets valid = true, see > http://nbd.name/gitweb.cgi?p=firewall3.git;a=commit;h=adf87f3a36328b949ed777068b14d975b429f9ad > > ~ Jow Hello, That looks like a cleaner way to fix it indeed. Thanks! Kim
diff --git a/redirects.c b/redirects.c index a30c540..c627607 100644 --- a/redirects.c +++ b/redirects.c @@ -306,7 +306,11 @@ fw3_load_redirects(struct fw3_state *state, struct uci_package *p) if (redir->src.any) warn_elem(e, "must not have source '*' for DNAT target"); else if (!redir->_src) + { warn_elem(e, "has no source specified"); + fw3_free_redirect(redir); + continue; + } else { set(redir->_src->flags, FW3_FAMILY_V4, redir->target);