[NETFILTER] Inherit masq_index to slave connections

masq_index is used for cleanup in case the interface address changes
(such as a dialup ppp link with dynamic addreses). Without this patch,
slave connections are not evicted in such a case, since they don't inherit
masq_index.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Harald Welte and committed by David S. Miller 1f494c0e d1b04c08

+5
+5
net/ipv4/netfilter/ip_conntrack_core.c
··· 513 513 #ifdef CONFIG_IP_NF_CONNTRACK_MARK 514 514 conntrack->mark = exp->master->mark; 515 515 #endif 516 + #if defined(CONFIG_IP_NF_TARGET_MASQUERADE) || \ 517 + defined(CONFIG_IP_NF_TARGET_MASQUERADE_MODULE) 518 + /* this is ugly, but there is no other place where to put it */ 519 + conntrack->nat.masq_index = exp->master->nat.masq_index; 520 + #endif 516 521 nf_conntrack_get(&conntrack->master->ct_general); 517 522 CONNTRACK_STAT_INC(expect_new); 518 523 } else {