NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/51435: NetBSD-7 IPv6 addresses cannot be bound when "detached"
The following reply was made to PR kern/51435; it has been noted by GNATS.
From: Matthew Mondor <mm_lists%pulsar-zone.net@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: kern/51435: NetBSD-7 IPv6 addresses cannot be bound when
"detached"
Date: Sat, 27 Aug 2016 08:05:43 -0400
--MP_/Pc0CK6xQcSGa=lRfa/4Tp6V
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Thank you for working on this patch.
For an eventual pullup to NetBSD-7, I think that the fix translates to
the attached diff (untested yet, I'll try to test it during the
weekend).
I noticed that in one change for -current you also left out a
deprecated address fix. Was this voluntary? I have not currently
included that change in this diff.
You also said on tech-net@ that IPv4 is also affected on -current? On
NetBSD-7 IPv4 addresses do not seem to be detached when the link is
disconnected.
Thanks,
Matt
--MP_/Pc0CK6xQcSGa=lRfa/4Tp6V
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=bind-detached-netbsd7.diff
Index: sys/netinet6/in6_pcb.c
===================================================================
RCS file: /data/rsync/netbsd-cvs/src/sys/netinet6/in6_pcb.c,v
retrieving revision 1.128.2.2
diff -u -p -r1.128.2.2 in6_pcb.c
--- sys/netinet6/in6_pcb.c 17 Jan 2015 12:10:54 -0000 1.128.2.2
+++ sys/netinet6/in6_pcb.c 27 Aug 2016 11:55:13 -0000
@@ -253,7 +253,7 @@ in6_pcbbind_addr(struct in6pcb *in6p, st
*/
if (ia &&
((struct in6_ifaddr *)ia)->ia6_flags &
- (IN6_IFF_ANYCAST|IN6_IFF_NOTREADY|IN6_IFF_DETACHED))
+ (IN6_IFF_ANYCAST|IN6_IFF_NOTREADY))
return (EADDRNOTAVAIL);
}
Index: sys/netinet6/in6_src.c
===================================================================
RCS file: /data/rsync/netbsd-cvs/src/sys/netinet6/in6_src.c,v
retrieving revision 1.54.2.1
diff -u -p -r1.54.2.1 in6_src.c
--- sys/netinet6/in6_src.c 23 Jan 2015 09:27:15 -0000 1.54.2.1
+++ sys/netinet6/in6_src.c 27 Aug 2016 11:52:10 -0000
@@ -311,7 +311,7 @@ in6_selectsrc(struct sockaddr_in6 *dstso
/* avoid unusable addresses */
if ((ia->ia6_flags &
- (IN6_IFF_NOTREADY | IN6_IFF_ANYCAST | IN6_IFF_DETACHED))) {
+ (IN6_IFF_NOTREADY | IN6_IFF_ANYCAST))) {
continue;
}
if (!ip6_use_deprecated && IFA6_IS_DEPRECATED(ia))
Index: sys/netinet6/raw_ip6.c
===================================================================
RCS file: /data/rsync/netbsd-cvs/src/sys/netinet6/raw_ip6.c,v
retrieving revision 1.136
diff -u -p -r1.136 raw_ip6.c
--- sys/netinet6/raw_ip6.c 9 Aug 2014 05:33:01 -0000 1.136
+++ sys/netinet6/raw_ip6.c 27 Aug 2016 11:54:22 -0000
@@ -683,8 +683,7 @@ rip6_bind(struct socket *so, struct mbuf
(ia = ifa_ifwithaddr((struct sockaddr *)addr)) == 0)
return EADDRNOTAVAIL;
if (ia && ((struct in6_ifaddr *)ia)->ia6_flags &
- (IN6_IFF_ANYCAST|IN6_IFF_NOTREADY|
- IN6_IFF_DETACHED|IN6_IFF_DEPRECATED))
+ (IN6_IFF_ANYCAST|IN6_IFF_NOTREADY|IN6_IFF_DEPRECATED))
return EADDRNOTAVAIL;
in6p->in6p_laddr = addr->sin6_addr;
return 0;
--MP_/Pc0CK6xQcSGa=lRfa/4Tp6V--
Home |
Main Index |
Thread Index |
Old Index