user2714949
user2714949

Reputation: 409

nf_reset() what does it this function do?

while trying to write a Linux kernel module for my project,i came across these functions. Can any one tell me what they do when called?. If you can quote some resources which i could use so i could make less trouble to you guys. I searched for these methods them but only found header files. functions are given below

nf_reset()
skb_set_queue_mapping(skb, 0);
skb_dst_drop(skb);
skb_reset_network_header(skb);
skb_dst_drop(skb);

Upvotes: 1

Views: 762

Answers (1)

Ilya Matveychikov
Ilya Matveychikov

Reputation: 4024

nf_reset, as it expected, resets NF states:

2579 static inline void nf_reset(struct sk_buff *skb)
2580 {
2581 #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
2582         nf_conntrack_put(skb->nfct);
2583         skb->nfct = NULL;
2584 #endif
2585 #ifdef NET_SKBUFF_NF_DEFRAG_NEEDED
2586         nf_conntrack_put_reasm(skb->nfct_reasm);
2587         skb->nfct_reasm = NULL;
2588 #endif
2589 #ifdef CONFIG_BRIDGE_NETFILTER
2590         nf_bridge_put(skb->nf_bridge);
2591         skb->nf_bridge = NULL;
2592 #endif
2593 }

Upvotes: 1

Related Questions