Packet forwarding queries

From: kernel.lover (cranium.2003_at_gmail.com)
Date: 01/30/05


Date: 30 Jan 2005 02:09:34 -0800

Hello,
1) How Router knows destinations mtu. In IP forwarding case following
function is used that checks pmtu value to decide whether outgoing
packet is required to fragment a packet or not?
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);
}

2) Can anybody help me how following function works in calcualting
checksum?
static inline int ip_decrease_ttl(struct iphdr *iph)
{
        u32 check = iph->check;
        check += __constant_htons(0x0100);
        iph->check = check + (check>=0xFFFF);
        return --iph->ttl;
}
regards,
cranium



Relevant Pages

  • Packet forwarding queries
    ... function is used that checks pmtu value to decide whether outgoing ... packet is required to fragment a packet or not? ... static inline int ip_decrease_ttl ...
    (comp.os.linux.networking)
  • Re: [Full-Disclosure] A new TCP/IP blind data injection technique?
    ... For example the BorderWare Firewall will not accept fragmented packets, ... Then pass or drop the packet. ... > should be fairly easy to turn this into a practical attack. ... The other fragment of Bob's packet carry the ...
    (Full-Disclosure)
  • Re: sshd hangs after SSH2_MSG_KEXINIT sent - Fedora Core 5 update
    ... For each network interface on both client and server set the MTU to 576, ... Only the first fragment has TCP port numbers. ... such devices should perform packet reassembly first so as to properly consider fragmented packets. ...
    (SSH)
  • Re: [Full-Disclosure] A new TCP/IP blind data injection technique?
    ... >data payload and within an established session, ... >Bob's packet exceeds the MTU somewhere en route (be it on some WAN ... fragment at the place you mention. ... All in all, an interesting attack vector, but I'm not sure how practical ...
    (Full-Disclosure)
  • [OT] TCP/IP help needed: MTU Discovery
    ... too-large packet with the "Don't Fragment" bit set to zero? ... I'm having a problem with SMTP where the client starts off sending small ... An ICMP message is sent back indicating this, ...
    (Debian-User)