aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/netfilter/nf_conntrack_h323_main.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/net/netfilter/nf_conntrack_h323_main.c b/net/netfilter/nf_conntrack_h323_main.c
index 3a3a60b126e0..1d69f5b9748f 100644
--- a/net/netfilter/nf_conntrack_h323_main.c
+++ b/net/netfilter/nf_conntrack_h323_main.c
@@ -728,7 +728,8 @@ static int expect_h245(struct sk_buff *skb, struct nf_conn *ct,
728 728
729/* If the calling party is on the same side of the forward-to party, 729/* If the calling party is on the same side of the forward-to party,
730 * we don't need to track the second call */ 730 * we don't need to track the second call */
731static int callforward_do_filter(const union nf_inet_addr *src, 731static int callforward_do_filter(struct net *net,
732 const union nf_inet_addr *src,
732 const union nf_inet_addr *dst, 733 const union nf_inet_addr *dst,
733 u_int8_t family) 734 u_int8_t family)
734{ 735{
@@ -750,9 +751,9 @@ static int callforward_do_filter(const union nf_inet_addr *src,
750 751
751 memset(&fl2, 0, sizeof(fl2)); 752 memset(&fl2, 0, sizeof(fl2));
752 fl2.daddr = dst->ip; 753 fl2.daddr = dst->ip;
753 if (!afinfo->route(&init_net, (struct dst_entry **)&rt1, 754 if (!afinfo->route(net, (struct dst_entry **)&rt1,
754 flowi4_to_flowi(&fl1), false)) { 755 flowi4_to_flowi(&fl1), false)) {
755 if (!afinfo->route(&init_net, (struct dst_entry **)&rt2, 756 if (!afinfo->route(net, (struct dst_entry **)&rt2,
756 flowi4_to_flowi(&fl2), false)) { 757 flowi4_to_flowi(&fl2), false)) {
757 if (rt_nexthop(rt1, fl1.daddr) == 758 if (rt_nexthop(rt1, fl1.daddr) ==
758 rt_nexthop(rt2, fl2.daddr) && 759 rt_nexthop(rt2, fl2.daddr) &&
@@ -774,9 +775,9 @@ static int callforward_do_filter(const union nf_inet_addr *src,
774 775
775 memset(&fl2, 0, sizeof(fl2)); 776 memset(&fl2, 0, sizeof(fl2));
776 fl2.daddr = dst->in6; 777 fl2.daddr = dst->in6;
777 if (!afinfo->route(&init_net, (struct dst_entry **)&rt1, 778 if (!afinfo->route(net, (struct dst_entry **)&rt1,
778 flowi6_to_flowi(&fl1), false)) { 779 flowi6_to_flowi(&fl1), false)) {
779 if (!afinfo->route(&init_net, (struct dst_entry **)&rt2, 780 if (!afinfo->route(net, (struct dst_entry **)&rt2,
780 flowi6_to_flowi(&fl2), false)) { 781 flowi6_to_flowi(&fl2), false)) {
781 if (ipv6_addr_equal(rt6_nexthop(rt1), 782 if (ipv6_addr_equal(rt6_nexthop(rt1),
782 rt6_nexthop(rt2)) && 783 rt6_nexthop(rt2)) &&
@@ -807,6 +808,7 @@ static int expect_callforwarding(struct sk_buff *skb,
807 __be16 port; 808 __be16 port;
808 union nf_inet_addr addr; 809 union nf_inet_addr addr;
809 struct nf_conntrack_expect *exp; 810 struct nf_conntrack_expect *exp;
811 struct net *net = nf_ct_net(ct);
810 typeof(nat_callforwarding_hook) nat_callforwarding; 812 typeof(nat_callforwarding_hook) nat_callforwarding;
811 813
812 /* Read alternativeAddress */ 814 /* Read alternativeAddress */
@@ -816,7 +818,7 @@ static int expect_callforwarding(struct sk_buff *skb,
816 /* If the calling party is on the same side of the forward-to party, 818 /* If the calling party is on the same side of the forward-to party,
817 * we don't need to track the second call */ 819 * we don't need to track the second call */
818 if (callforward_filter && 820 if (callforward_filter &&
819 callforward_do_filter(&addr, &ct->tuplehash[!dir].tuple.src.u3, 821 callforward_do_filter(net, &addr, &ct->tuplehash[!dir].tuple.src.u3,
820 nf_ct_l3num(ct))) { 822 nf_ct_l3num(ct))) {
821 pr_debug("nf_ct_q931: Call Forwarding not tracked\n"); 823 pr_debug("nf_ct_q931: Call Forwarding not tracked\n");
822 return 0; 824 return 0;