* packet forwarding understandings
@ 2005-04-14 13:46 rahul N.
0 siblings, 0 replies; only message in thread
From: rahul N. @ 2005-04-14 13:46 UTC (permalink / raw)
To: netdev
hello,
Following is code snippet from ip_forward function from ip_forward.c
........
dev2 = rt->u.dst.dev;
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)
ip_rt_send_redirect(skb);
/* 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
hard_header_len
so that skb_cow is called?
whats use of skb_cow in ip_forward?
I am using 2.4 series kernel.
regards,
rahul
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-04-14 13:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-14 13:46 packet forwarding understandings rahul N.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).