-   Linux - Networking (
-   -   packet fragmentation in packet forwarding code (

cranium2004 05-16-2005 04:05 AM

packet fragmentation in packet forwarding code
I check ip_forward.c and there ip_forward() function where condition is written as
if (skb->len > mtu && (ntohs(iph->frag_off) & IP_DF))
goto frag_needed;

What this indicates? Doesn't it throw away packet before it go to ip_fragmentation? I agree that linux kernel packet forwarding code on linux router does fragmentation by calling ip_fragment not in ip_forward() but in ip_send().

Also in following function skb->dst->pmtu is pmtu of next hop in packet forwarding PATH right?
static inline int ip_send(struct sk_buff *skb)
if (skb->len > skb->dst->pmtu)
return ip_fragment(skb, ip_finish_output);
return ip_finish_output(skb);

If suppose PMTU is implemented with ICMP enable then is there still any possibility of packet fragmentation?(Just a thought)
So at any Linux set as a Router in a internet packet path if PMTU not used then router code always have pmtu values of next hop touter. Is that correct?

All times are GMT -5. The time now is 11:16 PM.