From d2a8a3f6a29746a3a07d2e3415737bcc2241afce Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 26 May 2013 17:22:11 +0200 Subject: [PATCH] Only emit different ip family warnings if the ip wasn't automatically resolved --- redirects.c | 6 +++++- rules.c | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) 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; } -- 2.25.1