- if (redir->local)
- return true;
-
- list_for_each_entry(zone, &state->zones, list)
- {
- list_for_each_entry(net, &zone->networks, list)
- {
- LIST_HEAD(addrs);
-
- fw3_ubus_address(&addrs, net->name);
- list_for_each_entry_safe(addr, tmp, &addrs, list)
- {
- if (!redir->local && compare_addr(&redir->ip_redir, addr)) {
- warn_elem(e, "refers to a destination address on this router, "
- "assuming port redirection");
-
- redir->local = true;
- }
-
- list_del(&addr->list);
- free(addr);
- }
-
- if (redir->local)
- return true;
- }
- }
-
- return false;