multicast IP datagram forwarding bug and fix

From: Weng, Wending <hidden>
Date: 2003-07-28 17:20:31

Hi,

   LINUX doesn't forward multicast IP datagram if it has option(s), there is is a bug in the module ipmr.c, function
ipmr_forward_finish, below is the current version of this function:

static inline int ipmr_forward_finish(struct sk_buff *skb)
{
        struct dst_entry *dst = skb->dst;

        if (skb->len <= dst->pmtu)
                return dst->output(skb);
        else
                return ip_fragment(skb, dst->output);
}

it forgets to recalculate the checksum in case the option is modified.

The following code works properly:

static inline int ipmr_forward_finish(struct sk_buff *skb)
{
        struct dst_entry *dst = skb->dst;

        ip_forward_options (skb); /* this line recalculates checksum if needed. */

        if (skb->len <= dst->pmtu)
                return dst->output(skb);
        else
                return ip_fragment(skb, dst->output);
}

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