LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   packet fragmentation in packet forwarding code (https://www.linuxquestions.org/questions/linux-networking-3/packet-fragmentation-in-packet-forwarding-code-323928/)

cranium2004 05-16-2005 04:05 AM

packet fragmentation in packet forwarding code
 
hello,
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);
else
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.