This commits fixes an error setting the NFT Chain in DNAT instead of Filter

This commit is contained in:
Sven Auhagen 2019-06-30 19:46:35 +02:00
parent 3cf6efa912
commit b377305db0
1 changed files with 2 additions and 2 deletions

View File

@ -132,7 +132,7 @@ add_redirect_rule2(const char * ifname,
d_printf(("add redirect rule2(%s, %s, %u, %s, %u, %d, %s)!\n",
ifname, rhost, eport, iaddr, iport, proto, desc));
r = rule_set_dnat(NFPROTO_INET, ifname, proto,
r = rule_set_dnat(NFPROTO_IPV4, ifname, proto,
0, eport,
inet_addr(iaddr), iport, desc, NULL);
@ -186,7 +186,7 @@ add_filter_rule2(const char * ifname,
if (rhost != NULL && strcmp(rhost, "") != 0) {
rhost_addr = inet_addr(rhost);
}
r = rule_set_filter(NFPROTO_IPV4, ifname, proto,
r = rule_set_filter(NFPROTO_INET, ifname, proto,
rhost_addr, inet_addr(iaddr),
eport, iport, 0,
desc, 0);