ipv4: Add ip_defrag() agent IP_DEFRAG_AF_PACKET.
authorDavid S. Miller <davem@davemloft.net>
Tue, 5 Jul 2011 08:05:48 +0000 (01:05 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Jul 2011 05:34:52 +0000 (22:34 -0700)
Elide the ICMP on frag queue timeouts unconditionally for
this user.

Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip.h
net/ipv4/ip_fragment.c

index 9fa9416d14d7e8cd845044776a1985f5e5975a7d..aa76c7a4d9c36257a28dab256a05f3d0f342776f 100644 (file)
@@ -404,7 +404,8 @@ enum ip_defrag_users {
        __IP_DEFRAG_CONNTRACK_BRIDGE_IN = IP_DEFRAG_CONNTRACK_BRIDGE_IN + USHRT_MAX,
        IP_DEFRAG_VS_IN,
        IP_DEFRAG_VS_OUT,
-       IP_DEFRAG_VS_FWD
+       IP_DEFRAG_VS_FWD,
+       IP_DEFRAG_AF_PACKET,
 };
 
 int ip_defrag(struct sk_buff *skb, u32 user);
index 0ad6035f63666c3f81f3d4ac8d0eea8334ddab82..0e0ab98abc6f1f11a41f99936bb64538a18d295a 100644 (file)
@@ -261,8 +261,9 @@ static void ip_expire(unsigned long arg)
                 * Only an end host needs to send an ICMP
                 * "Fragment Reassembly Timeout" message, per RFC792.
                 */
-               if (qp->user == IP_DEFRAG_CONNTRACK_IN &&
-                   skb_rtable(head)->rt_type != RTN_LOCAL)
+               if (qp->user == IP_DEFRAG_AF_PACKET ||
+                   (qp->user == IP_DEFRAG_CONNTRACK_IN &&
+                    skb_rtable(head)->rt_type != RTN_LOCAL))
                        goto out_rcu_unlock;