[QUESTION] nf_defrag_ipv4: what does net/ipv4/netfilter/nf_defrag_ipv4.c used for?

From: Wei Yongjun <hidden>
Date: 2009-06-12 06:05:45

Hi
  Can someome tell me what does net/ipv4/netfilter/nf_defrag_ipv4.c
used for? When I looking the source of nf_defrag_ipv4, I found something
strange.

  If NF_DEFRAG_IPV4 is not selected when compile kernel, the normal
path of ipv4 fragment process is like this:

                      ____________________
 IPv4 Fragment  ---> |  NF_IP_PRE_ROUTING |--> routing input -> ip_defrag()
                     |____________________|

 But is NF_DEFRAG_IPV4=y, the ipv4 fragment process is like this:
 
                      ____________________
 IPv4 Fragment  ---> |  NF_IP_PRE_ROUTING | -> ip_defrag()
                     |____________________|

The only thing nf_defrag_ipv4 do is not select input route.

This cause problem that if the defragment is timeout, the ICMP fragment
timeout can not be sent out, because the input skb has no route
information.

void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
{
      ...
      struct rtable *rt = skb_in->rtable;
      ...
      if (!rt)
          goto out;           <--- fail in this step
      ...
}


Any idea for this?


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help