From: Jo-Philipp Wich Date: Sun, 26 May 2013 15:22:11 +0000 (+0200) Subject: Only emit different ip family warnings if the ip wasn't automatically resolved X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d2a8a3f6a29746a3a07d2e3415737bcc2241afce;p=oweals%2Ffirewall3.git Only emit different ip family warnings if the ip wasn't automatically resolved --- diff --git a/redirects.c b/redirects.c index 7bafec2..de3d42e 100644 --- a/redirects.c +++ b/redirects.c @@ -540,7 +540,11 @@ expand_redirect(struct fw3_ipt_handle *handle, struct fw3_state *state, !fw3_is_family(&redir->ip_dest, handle->family) || !fw3_is_family(&redir->ip_redir, handle->family)) { - info(" ! Skipping due to different family of ip address"); + if (!redir->ip_src.resolved || + !redir->ip_dest.resolved || + !redir->ip_redir.resolved) + info(" ! Skipping due to different family of ip address"); + return; } diff --git a/rules.c b/rules.c index eea8724..b6c3d75 100644 --- a/rules.c +++ b/rules.c @@ -314,7 +314,9 @@ print_rule(struct fw3_ipt_handle *handle, struct fw3_state *state, if (!fw3_is_family(sip, handle->family) || !fw3_is_family(dip, handle->family)) { - info(" ! Skipping due to different family of ip address"); + if ((sip && !sip->resolved) || (dip && !dip->resolved)) + info(" ! Skipping due to different family of ip address"); + return; }