kern/146534: [icmp6] wrong source address in echo reply
jhell
jhell at DataIX.net
Sat Sep 18 21:00:12 UTC 2010
The following reply was made to PR kern/146534; it has been noted by GNATS.
From: jhell <jhell at DataIX.net>
To: bug-followup at FreeBSD.org
Cc:
Subject: Re: kern/146534: [icmp6] wrong source address in echo reply
Date: Sat, 18 Sep 2010 16:52:21 -0400
This is a multi-part message in MIME format.
--------------090403020508080503040902
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
This PR seems to have been left behind. While it has been, I have tested
this patch for quite some time now with no downsides noted.
While this in fact fixes the noted problem, attached is a patch that
cleans this patch up a bit.
With this patch applied is correct behavior.
- --
jhell,v
-----BEGIN PGP SIGNATURE-----
iQEcBAEBAgAGBQJMlSaFAAoJEJBXh4mJ2FR+Z4MH/0zUHH/fUIfmKlg96T60A6xW
RN/RXql2Rz/FYHzkontth2vBbSfmchNQtpgytXKG7R2qklyInwVVcLKNsJaXVfWz
y8tpETUZLxNuYk5zhvsSS5q4JRQO3rbz1UMg9+b2VubnJ0y9OHahd/wztDCgmSDn
f6mQU2YJtuglgixp25BJMbE/Dqh5MA1QEh1vj1lFWD5323hW2GOFFC4Mo3hgoCFA
QqBzW9GMFoyA749d24GZvvDYa11esuU8+uiNLb5oPuBEoULdIw913NLMrZSuB2Uv
PeDCbCUGzIa9xnCZmk6sG9HfDiZaRDPlf3q6sUuVCNCCBYikuoD4SIr/qN4ToTs=
=knfM
-----END PGP SIGNATURE-----
--------------090403020508080503040902
Content-Type: text/plain;
name="sys_netinet6_icmp6.c.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="sys_netinet6_icmp6.c.patch"
--- sys/netinet6/icmp6.c (revision 210616)
+++ sys/netinet6/icmp6.c (working copy)
@@ -2162,8 +2162,21 @@
}
if ((srcp != NULL) &&
- (in6_addrscope(srcp) != in6_addrscope(&ip6->ip6_src)))
- srcp = NULL;
+ (in6_addrscope(srcp) != in6_addrscope(&ip6->ip6_src))) {
+ struct sockaddr_in6 sin6;
+
+ bzero(&sin6, sizeof(sin6));
+ sin6.sin6_family = AF_INET6;
+ sin6.sin6_len = sizeof(sin6);
+ sin6.sin6_addr = origdst;
+
+ ia = (struct in6_ifaddr *)
+ ifa_ifwithaddr((struct sockaddr *)&sin6);
+
+ if (ia && (ia->ia6_flags & IN6_IFF_ANYCAST))
+ srcp = NULL;
+ }
+
if (srcp == NULL) {
int e;
--------------090403020508080503040902
Content-Type: application/octet-stream;
name="sys_netinet6_icmp6.c.patch.sig"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="sys_netinet6_icmp6.c.patch.sig"
iQEcBAABAgAGBQJMlSaFAAoJEJBXh4mJ2FR+Qu8H/23Ge4zNAGRRdGKgcEtp4KD0eiLZ9ozq
8GAbnBDXnH6lV/mj1d/DrFOEmcs0ApXHtjlnvox47yHaNlEJ7ESA5V1wf44rsfxN2ZZYdTFE
5qVNsElCAZ0yAjPnBCTbeFDZKx0vq4DJz4JuHoDgb8rrQMaPUClljk/kRFB1BL6jPkau/Fsy
f/aZlmEERrxGkMTmBtVbv8E5WTpNZ0X9hf7u+5UG0coQtFM6hnqHC07UNrm7+cqsKtlbbvBP
k5JoUsUSjV1mUwfzy8GJD7wm9wFGotHAgEDbbax5fmNZI3gChBjK01nQWkC8k6dFR6lzO7sb
hgoDbbEEnpgSBz5wS0p3Vl4=
--------------090403020508080503040902--
More information about the freebsd-net
mailing list