diff options
Diffstat (limited to 'fwd.c')
| -rw-r--r-- | fwd.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -976,10 +976,12 @@ uint8_t fwd_nat_from_tap(const struct ctx *c, uint8_t proto, const struct flowside *ini, struct flowside *tgt) { if (is_dns_flow(proto, ini) && - inany_equals4(&ini->oaddr, &c->ip4.dns_match)) + inany_equals4(&ini->oaddr, &c->ip4.dns_match) && + !IN4_IS_ADDR_UNSPECIFIED(&c->ip4.dns_host)) tgt->eaddr = inany_from_v4(c->ip4.dns_host); else if (is_dns_flow(proto, ini) && - inany_equals6(&ini->oaddr, &c->ip6.dns_match)) + inany_equals6(&ini->oaddr, &c->ip6.dns_match) && + !IN6_IS_ADDR_UNSPECIFIED(&c->ip6.dns_host)) tgt->eaddr.a6 = c->ip6.dns_host; else nat_outbound(c, &ini->oaddr, &tgt->eaddr); |
