Date: Tue, 21 Jul 2015 16:17:06 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 197035] sysutils/bbcp: segmentation fault and core dump when running latest version (20150113) Message-ID: <bug-197035-13-APttp2e84U@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-197035-13@https.bugs.freebsd.org/bugzilla/> References: <bug-197035-13@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197035 --- Comment #8 from Chris Hutchinson <portmaster@bsdforge.com> --- (In reply to lampa from comment #6) > Problem is probably with ipv6 bcpp code, try -4 argument > ... > > It fails with n==3 (EAI_BADFLAGS) and then MyHost is NULL which results > in segmentation fault in strdup(). > n==3, as I read it, indicates it's in bracketed format. In much the same way Apache expects it in httpd.conf eg; NameVirtualHost [nnnn:an:anan:annn:nnn:nnaa:aaan:aana]:80 the eval and designator is in bbcp_NetAddrInfo.C @134 // Format address // if (IP.Addr.sa_family == AF_INET6) {if (bLen < (INET6_ADDRSTRLEN+2)) return QFill(bAddr, bLen); if (fmtOpts & old6Map4 && IN6_IS_ADDR_V4MAPPED(&IP.v6.sin6_addr)) {if (ipRaw) {strcpy(bAddr, "::"); n = 2;} else {strcpy(bAddr, "[::"); n = 3; addBrak=1;} ___________________________^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ if (!inet_ntop(AF_INET, &IP.v6.sin6_addr.s6_addr32[3], bAddr+n, bLen-n)) return QFill(bAddr, bLen); } else { if (!ipRaw) {*bAddr = '['; n = 1; addBrak = 1;} else n = 0; if (!inet_ntop(AF_INET6,&(IP.v6.sin6_addr),bAddr+n,bLen-n)) return QFill(bAddr, bLen); } } At least as *I* read it. For the record. There were zero *BSD defines when I stepped into this, and to some extent I simply OR'd FreeBSD against MacOS, where it applied. I may have to dig deep into FreeBSD specific NET foo -- specifically INET6. So as to add additional/specific DEFINES. Or simply disable IPv6 entirely, if FreeBSD is detected. It's still early in my investigation. But just thought I might mention it FWIW. ... > > But fixing this was not sufficient, remote bcpp started listening on TCP6 > socket, but local bcpp couldn't connect. --Chris -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-197035-13-APttp2e84U>