Menu

#14 Sudden "send: No route to host" with 6.1.x kernels

v1.0 (example)
closed
None
5
2023-02-13
2023-02-13
Mantas
No

After upgrading from kernel 6.0.7 to 6.1.6 on Arch Linux, unprivileged ICMP traceroute using the traceroute -I tool stopped working – it very reliably fails with a "No route to host" at some point, while the same traceroute still works for root (or in UDP mode):

$ traceroute -I 83.171.33.188
traceroute to 83.171.33.188 (83.171.33.188), 30 hops max, 60
byte packets
 1  _gateway (192.168.1.1)  0.819 ms
send: No route to host
[exited with 1]

strace log can be found at: https://lore.kernel.org/netdev/168aa9cf-d80a-9c1b-887f-97015a0473dc@gmail.com/

Although this only broke with kernel 6.1, the kernel developers suggest that the kernel change is correct and just exposed a traceroute bug: https://lore.kernel.org/netdev/CANn89iLKQB=9rYyKXVH=hd2aBUjzhhjXA0FOdSvN3reH+k9cMQ@mail.gmail.com/

Eric Dumazet suggests the following patch, which indeed seems to work and makes unprivileged ICMP mode work again:

diff traceroute/traceroute.c.orig traceroute/traceroute.c
1657c1657
<     if (errno == EMSGSIZE)
---
>     if (errno == EMSGSIZE || errno == EHOSTUNREACH)

Discussion

  • Dmitry Butskoy

    Dmitry Butskoy - 2023-02-13

    Thenks for fix and report.

    Confirmed with kernel-6.2.0 on Fedora Rawhide.

    Fixed in traceroute-2.1.2

     
  • Dmitry Butskoy

    Dmitry Butskoy - 2023-02-13
    • status: open --> closed
    • assigned_to: Dmitry Butskoy
     

Log in to post a comment.

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.
Try Free →