Author: ae Date: Tue Oct 13 19:34:36 2020 New Revision: 366682 URL: https://svnweb.freebsd.org/changeset/base/366682
Log: Join to AllHosts multicast group again when adding an existing IPv4 address. When SIOCAIFADDR ioctl configures an IPv4 address that is already exist, it removes old ifaddr. When this IPv4 address is only one configured on the interface, this also leads to leaving from AllHosts multicast group. Then an address is added again, but due to the bug, this doesn't lead to joining to AllHosts multicast group. Submitted by: yannis.planus_alstomgroup.com Reviewed by: gnn MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D26757 Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Tue Oct 13 18:57:42 2020 (r366681) +++ head/sys/netinet/in.c Tue Oct 13 19:34:36 2020 (r366682) @@ -377,10 +377,11 @@ in_aifaddr_ioctl(u_long cmd, caddr_t data, struct ifne continue; it = (struct in_ifaddr *)ifa; - iaIsFirst = false; if (it->ia_addr.sin_addr.s_addr == addr->sin_addr.s_addr && prison_check_ip4(td->td_ucred, &addr->sin_addr) == 0) ia = it; + else + iaIsFirst = false; } NET_EPOCH_EXIT(et); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"