Fix source IP address for ICMP unreachable packets generated by tinc.
authorVittorio Gambaletta (VittGam) <github@vittgam.net>
Fri, 4 Sep 2015 02:00:57 +0000 (04:00 +0200)
committerVittorio Gambaletta (VittGam) <github@vittgam.net>
Fri, 4 Sep 2015 02:00:57 +0000 (04:00 +0200)
commit4278ea515ad7cb029009120856213edd6c37baf8
tree4c71de1fffa9225490cbc2705af00a59ddb1652b
parenta588f6febeca13edd038d78e42efb8aa9f16a444
Fix source IP address for ICMP unreachable packets generated by tinc.

Try to send ICMP unreachable replies from an address assigned to the
local machine, instead of the destination address of the original
packet.

The address is found by looking up the route towards the sender of
the packet that generated the error; in usual configurations, this
is the tinc interface.

This also fixes the traceroute display in mtr when using the
DecrementTTL option.

Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
src/route.c