netdev
[Top] [All Lists]

Problem forwarding fragmented multicast packets.

To: <netdev@xxxxxxxxxxx>
Subject: Problem forwarding fragmented multicast packets.
From: "Dror Goldstein" <drgoldst@xxxxxxxxx>
Date: Wed, 14 Mar 2001 20:43:54 +0200
Cc: "Dror Goldstein \(E-mail\)" <drgoldst@xxxxxxxxx>
Importance: Normal
Sender: owner-netdev@xxxxxxxxxxx
Hi,

When multicast data packet should be fragmented there is a bug and the
packets
Are not forward. Following is a description of the problem as I found it in
the
Kernel code, and after that a patch that solved it.

In the function ip_fragment (ip_output.c) when datagrame is fragmented the
Flags field (that is included in skb->cb field) is not copied from the old
Skb to the new skb (skb2).

Letter on ip_mc_output (ip_output.c) checks this flag in order to determine
If the packet should be loop back.

Note: - I check the fix only for multicast traffic when the flag was
IPSKB_FORWARD
        I didn't check it for the IPSK_TRANSLATED  and IPSK_MASQUERADED
flags.
      - I compare the ip_output.c of kernel 2.4.0-test9 and kernel 2.4.2.



--- ../../../../linux-2.4.2/linux/net/ipv4/ip_output.c  Fri Oct 27 20:03:14
2000
+++ ip_output.c Wed Mar 14 18:42:21 2001
@@ -5,7 +5,7 @@
  *
  *             The Internet Protocol (IP) output module.
  *
- * Version:    $Id: ip_output.c,v 1.87 2000/10/25 20:07:22 davem Exp $
+ * Version:    $Id: ip_output.c,v 1.85 2000/08/31 23:39:12 davem Exp $
  *
  * Authors:    Ross Biro, <bir7@xxxxxxxxxxxxxxxxxxx>
  *             Fred N. van Kempen, <waltje@xxxxxxxxxxxxxxxxxxx>
@@ -37,6 +37,8 @@
  *                                     and more readibility.
  *             Marc Boucher    :       When call_out_firewall returns FW_QUEUE,
  *                                     silently drop skb instead of failing 
with -EPERM.
+ *      Dror Goldstein: Copy the the flags (of inet_skb_parm structure)
+ *                                             to each IP packet fragment.
  */

 #include <asm/uaccess.h>
@@ -828,6 +830,10 @@
                 */
                if (offset == 0)
                        ip_options_fragment(skb);
+
+               /* Dror g.:Copy the flags to each fragment */
+               IPCB(skb2)->flags = IPCB(skb)->flags;
+

                /*
                 *      Added AC : If we are fragmenting a fragment that's not 
the




<Prev in Thread] Current Thread [Next in Thread>
  • Problem forwarding fragmented multicast packets., Dror Goldstein <=