]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix loopback traffic when using non-lo0 link local IPv6 addresses.
authorhselasky <hselasky@FreeBSD.org>
Wed, 9 Jan 2019 14:28:08 +0000 (14:28 +0000)
committerhselasky <hselasky@FreeBSD.org>
Wed, 9 Jan 2019 14:28:08 +0000 (14:28 +0000)
commitefc3b98861b0b1acb99f377e44625cfa267a7fcc
tree69dc40c11a7e7d03d13a9f7826d9638d24d4a223
parent026e13f590a5f64070c731aa905d04a53675d890
Fix loopback traffic when using non-lo0 link local IPv6 addresses.

The loopback interface can only receive packets with a single scope ID,
namely the scope ID of the loopback interface itself. To mitigate this
packets which use the scope ID are appearing as received by the real
network interface, see "origifp" in the patch. The current code would
drop packets which are designated for loopback which use a link-local
scope ID in the destination address or source address, because they
won't match the lo0's scope ID. To fix this restore the network
interface pointer from the scope ID in the destination address for
the problematic cases. See comments added in patch for a more detailed
description.

This issue was introduced with route caching (ae@).

Reviewed by: bz (network)
Differential Revision: https://reviews.freebsd.org/D18769
MFC after: 1 week
Sponsored by: Mellanox Technologies
sys/netinet6/ip6_output.c