diff options
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c index 6c8624a54933..cb9c661f3f33 100644 --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | |||
@@ -141,19 +141,21 @@ static unsigned int ipv4_conntrack_help(unsigned int hooknum, | |||
141 | { | 141 | { |
142 | struct nf_conn *ct; | 142 | struct nf_conn *ct; |
143 | enum ip_conntrack_info ctinfo; | 143 | enum ip_conntrack_info ctinfo; |
144 | struct nf_conn_help *help; | ||
144 | 145 | ||
145 | /* This is where we call the helper: as the packet goes out. */ | 146 | /* This is where we call the helper: as the packet goes out. */ |
146 | ct = nf_ct_get(*pskb, &ctinfo); | 147 | ct = nf_ct_get(*pskb, &ctinfo); |
147 | if (ct && ct->helper) { | 148 | if (!ct) |
148 | unsigned int ret; | 149 | return NF_ACCEPT; |
149 | ret = ct->helper->help(pskb, | 150 | |
150 | (*pskb)->nh.raw - (*pskb)->data | 151 | help = nfct_help(ct); |
151 | + (*pskb)->nh.iph->ihl*4, | 152 | if (!help || !help->helper) |
152 | ct, ctinfo); | 153 | return NF_ACCEPT; |
153 | if (ret != NF_ACCEPT) | 154 | |
154 | return ret; | 155 | return help->helper->help(pskb, |
155 | } | 156 | (*pskb)->nh.raw - (*pskb)->data |
156 | return NF_ACCEPT; | 157 | + (*pskb)->nh.iph->ihl*4, |
158 | ct, ctinfo); | ||
157 | } | 159 | } |
158 | 160 | ||
159 | static unsigned int ipv4_conntrack_defrag(unsigned int hooknum, | 161 | static unsigned int ipv4_conntrack_defrag(unsigned int hooknum, |