]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r329053
authorvangyzen <vangyzen@FreeBSD.org>
Mon, 19 Feb 2018 15:54:26 +0000 (15:54 +0000)
committervangyzen <vangyzen@FreeBSD.org>
Mon, 19 Feb 2018 15:54:26 +0000 (15:54 +0000)
commita1df26c1d035614f29a37ca6e6ddc251e763522f
treefbe2560dd41c50b25c36f94916a435072d9c3f4b
parent4645738b048934ba7c268c8eaf3269954670a880
MFC r329053

Fix ICMPv6 redirects

icmp6_redirect_input() validates that a redirect packet came from the
current gateway for the respective destination.  To do this, it compares
the source address, which has an embedded scope zone id, to the next-hop
address, which does not.  If the address is link-local, which should be
the case, the comparison fails and the redirect is ignored.

Insert the scope zone id into the next-hop address so the comparison
is accurate.

Unsurprisingly, this fixes 35 UNH IPv6 conformance test cases.

Submitted by: Farrell Woods <Farrell_Woods@Dell.com> (initial revision)
Reviewed by: ae melifaro dab
Relnotes: yes
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D14254
sys/netinet6/icmp6.c