aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Chion Tang <sdspeedonion@gmail.com> 2018-04-28 14:01:49 +0100
committerGravatar Chion Tang <sdspeedonion@gmail.com> 2018-04-28 14:01:49 +0100
commitc9f86a25428d2cbe16ae9763bb11256afe174d06 (patch)
treefcc5fb53eff21d37108bd658d716a04c8b179a55
parentfeature: find ifindex by dst ip (diff)
downloadnetfilter-full-cone-nat-c9f86a25428d2cbe16ae9763bb11256afe174d06.tar.gz
netfilter-full-cone-nat-c9f86a25428d2cbe16ae9763bb11256afe174d06.tar.bz2
netfilter-full-cone-nat-c9f86a25428d2cbe16ae9763bb11256afe174d06.zip
add comment
-rw-r--r--xt_FULLCONENAT.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xt_FULLCONENAT.c b/xt_FULLCONENAT.c
index 4787992..b6516b4 100644
--- a/xt_FULLCONENAT.c
+++ b/xt_FULLCONENAT.c
@@ -452,6 +452,8 @@ static unsigned int fullconenat_tg(struct sk_buff *skb, const struct xt_action_p
ip = (ct_tuple_origin->dst).u3.ip;
port = be16_to_cpu((ct_tuple_origin->dst).u.udp.port);
+ /* get the corresponding ifindex by the dst_ip (aka. external ip of this host),
+ * in case the packet needs to be forwarded from another inbound interface. */
net_dev = ip_dev_find(net, ip);
if (net_dev != NULL) {
ifindex = net_dev->ifindex;