packet forwarding query

From: rahul N.
Date: Thu Apr 14 2005 - 08:51:38 EST

Following is code snippet from ip_forward function from ip_forward.c
dev2 = rt->;
mtu = rt->u.dst.pmtu;

* We now generate an ICMP HOST REDIRECT giving the route
* we calculated.
if (rt->rt_flags&RTCF_DOREDIRECT && !opt->srr)

/* We are about to mangle packet. Copy it! */
if (skb_cow(skb, dev2->hard_header_len))
goto drop;
iph = skb->nh.iph;

when router takes packet to forward does above code is written to check if
next dst hop has different network device or if it is using different
so that skb_cow is called?
whats use of skb_cow in ip_forward?
I am using 2.4 series kernel.

To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at