wrong device detection
Closed this issue · 1 comments
zh99998 commented
if server has many devices with same ip address, tcptraceroute auto select device will be wrong.
# tcptraceroute 10.8.0.1 -f 30
Selected device railgun1, address 10.3.0.1, port 33989 for outgoing packets
Tracing the path to 10.8.0.1 on TCP port 80 (http), 30 hops max
30 * * *
Destination not reached
there is an example that the server has many devices named railgun*, all of them local address is 10.3.0.1, and routed by destination address
10.1.0.0/16 dev railgun1 proto kernel scope link src 10.3.0.1
10.2.0.0/16 dev railgun2 proto kernel scope link src 10.3.0.1
...
10.8.0.0/16 dev railgun8 proto kernel scope link src 10.3.0.1
all my applications, including ping, traceroute, and production services works well with this routing. except tcptraceroute auto select wrong device.
if (device == NULL)
/* not specified on command line */
device = finddev(recommended_src);
the proper way is detect it by route table.
i know tcptraceroute could specific device name from command line. but i'm not calling tcptraroute manually, and using some automatic cluster management tools, which can't specific different parameters for each server and each target.
zh99998 commented
closing this since long time inactive