yanet-platform / yanet

A high performance framework for forwarding traffic based on DPDK
Other
165 stars 17 forks source link

ICMP time exceeded #57

Open ezhk opened 9 months ago

ezhk commented 9 months ago

YANET doesn't support ICMP response, when receiving packet with TTL = 1. By RFC792 YANET should send ICMP Time Exceeded Message, when packet cannot be forwarded or balanced.

Source address required be equal recv DST ip-address, like:

17:05:45.334341 IP (tos 0x0, ttl 1, id 3920, offset 0, flags [DF], proto TCP (6), length 60)
    1.2.3.4.33128 > 5.6.7.8.443: Flags [S], cksum 0x0379 (incorrect -> 0x85d2), seq 1, win 65535, options [mss 1280,sackOK,TS val 2138858367 ecr 0,nop,wscale 9], length 0

17:05:45.338670 IP (tos 0x0, ttl 247, id 12694, offset 0, flags [none], proto ICMP (1), length 88)
    5.6.7.8 > 1.2.3.4: ICMP time exceeded in-transit, length 68
        IP (tos 0xa0, ttl 1, id 3920, offset 0, flags [DF], proto TCP (6), length 60)
    1.2.3.4.33128 > 5.6.7.8.443: Flags [S], cksum 0x85d2 (correct), seq 1, win 65535, options [mss 1280,sackOK,TS val 2138858367 ecr 0,nop,wscale 9], length 0

Thanks.