@@ -263,11 +263,10 @@ EXPORT_SYMBOL_GPL(nf_nat_icmpv6_reply_translation);
263263
264264unsigned int
265265nf_nat_ipv6_fn (const struct nf_hook_ops * ops , struct sk_buff * skb ,
266- const struct net_device * in , const struct net_device * out ,
266+ const struct nf_hook_state * state ,
267267 unsigned int (* do_chain )(const struct nf_hook_ops * ops ,
268268 struct sk_buff * skb ,
269- const struct net_device * in ,
270- const struct net_device * out ,
269+ const struct nf_hook_state * state ,
271270 struct nf_conn * ct ))
272271{
273272 struct nf_conn * ct ;
@@ -318,7 +317,7 @@ nf_nat_ipv6_fn(const struct nf_hook_ops *ops, struct sk_buff *skb,
318317 if (!nf_nat_initialized (ct , maniptype )) {
319318 unsigned int ret ;
320319
321- ret = do_chain (ops , skb , in , out , ct );
320+ ret = do_chain (ops , skb , state , ct );
322321 if (ret != NF_ACCEPT )
323322 return ret ;
324323
@@ -332,7 +331,7 @@ nf_nat_ipv6_fn(const struct nf_hook_ops *ops, struct sk_buff *skb,
332331 pr_debug ("Already setup manip %s for ct %p\n" ,
333332 maniptype == NF_NAT_MANIP_SRC ? "SRC" : "DST" ,
334333 ct );
335- if (nf_nat_oif_changed (ops -> hooknum , ctinfo , nat , out ))
334+ if (nf_nat_oif_changed (ops -> hooknum , ctinfo , nat , state -> out ))
336335 goto oif_changed ;
337336 }
338337 break ;
@@ -341,7 +340,7 @@ nf_nat_ipv6_fn(const struct nf_hook_ops *ops, struct sk_buff *skb,
341340 /* ESTABLISHED */
342341 NF_CT_ASSERT (ctinfo == IP_CT_ESTABLISHED ||
343342 ctinfo == IP_CT_ESTABLISHED_REPLY );
344- if (nf_nat_oif_changed (ops -> hooknum , ctinfo , nat , out ))
343+ if (nf_nat_oif_changed (ops -> hooknum , ctinfo , nat , state -> out ))
345344 goto oif_changed ;
346345 }
347346
@@ -355,17 +354,16 @@ EXPORT_SYMBOL_GPL(nf_nat_ipv6_fn);
355354
356355unsigned int
357356nf_nat_ipv6_in (const struct nf_hook_ops * ops , struct sk_buff * skb ,
358- const struct net_device * in , const struct net_device * out ,
357+ const struct nf_hook_state * state ,
359358 unsigned int (* do_chain )(const struct nf_hook_ops * ops ,
360359 struct sk_buff * skb ,
361- const struct net_device * in ,
362- const struct net_device * out ,
360+ const struct nf_hook_state * state ,
363361 struct nf_conn * ct ))
364362{
365363 unsigned int ret ;
366364 struct in6_addr daddr = ipv6_hdr (skb )-> daddr ;
367365
368- ret = nf_nat_ipv6_fn (ops , skb , in , out , do_chain );
366+ ret = nf_nat_ipv6_fn (ops , skb , state , do_chain );
369367 if (ret != NF_DROP && ret != NF_STOLEN &&
370368 ipv6_addr_cmp (& daddr , & ipv6_hdr (skb )-> daddr ))
371369 skb_dst_drop (skb );
@@ -376,11 +374,10 @@ EXPORT_SYMBOL_GPL(nf_nat_ipv6_in);
376374
377375unsigned int
378376nf_nat_ipv6_out (const struct nf_hook_ops * ops , struct sk_buff * skb ,
379- const struct net_device * in , const struct net_device * out ,
377+ const struct nf_hook_state * state ,
380378 unsigned int (* do_chain )(const struct nf_hook_ops * ops ,
381379 struct sk_buff * skb ,
382- const struct net_device * in ,
383- const struct net_device * out ,
380+ const struct nf_hook_state * state ,
384381 struct nf_conn * ct ))
385382{
386383#ifdef CONFIG_XFRM
@@ -394,7 +391,7 @@ nf_nat_ipv6_out(const struct nf_hook_ops *ops, struct sk_buff *skb,
394391 if (skb -> len < sizeof (struct ipv6hdr ))
395392 return NF_ACCEPT ;
396393
397- ret = nf_nat_ipv6_fn (ops , skb , in , out , do_chain );
394+ ret = nf_nat_ipv6_fn (ops , skb , state , do_chain );
398395#ifdef CONFIG_XFRM
399396 if (ret != NF_DROP && ret != NF_STOLEN &&
400397 !(IP6CB (skb )-> flags & IP6SKB_XFRM_TRANSFORMED ) &&
@@ -418,11 +415,10 @@ EXPORT_SYMBOL_GPL(nf_nat_ipv6_out);
418415
419416unsigned int
420417nf_nat_ipv6_local_fn (const struct nf_hook_ops * ops , struct sk_buff * skb ,
421- const struct net_device * in , const struct net_device * out ,
418+ const struct nf_hook_state * state ,
422419 unsigned int (* do_chain )(const struct nf_hook_ops * ops ,
423420 struct sk_buff * skb ,
424- const struct net_device * in ,
425- const struct net_device * out ,
421+ const struct nf_hook_state * state ,
426422 struct nf_conn * ct ))
427423{
428424 const struct nf_conn * ct ;
@@ -434,7 +430,7 @@ nf_nat_ipv6_local_fn(const struct nf_hook_ops *ops, struct sk_buff *skb,
434430 if (skb -> len < sizeof (struct ipv6hdr ))
435431 return NF_ACCEPT ;
436432
437- ret = nf_nat_ipv6_fn (ops , skb , in , out , do_chain );
433+ ret = nf_nat_ipv6_fn (ops , skb , state , do_chain );
438434 if (ret != NF_DROP && ret != NF_STOLEN &&
439435 (ct = nf_ct_get (skb , & ctinfo )) != NULL ) {
440436 enum ip_conntrack_dir dir = CTINFO2DIR (ctinfo );
0 commit comments