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)
committerGuus Sliepen <guus@tinc-vpn.org>
Sun, 28 Feb 2016 14:58:25 +0000 (15:58 +0100)
commit92203bdbcb1af4a52c7ca9d0e1a271168435c905
tree4c7a2d464b738295552424a9a509a58aae3ab0dd
parenta8a3a2c8ceb19bcb6c2c3ef0647c94d7d0624b7a
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>
# Conflicts:
# src/route.c
src/route.c