From owner-freebsd-ports-bugs@freebsd.org Sat Oct 5 00:04:52 2019 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A45F913CC76 for ; Sat, 5 Oct 2019 00:04:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 46lRnc2q2Qz42NJ for ; Sat, 5 Oct 2019 00:04:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 5EF2A13CC75; Sat, 5 Oct 2019 00:04:52 +0000 (UTC) Delivered-To: ports-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5EB7913CC74 for ; Sat, 5 Oct 2019 00:04:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46lRnc1th8z42NH for ; Sat, 5 Oct 2019 00:04:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 244BF4518 for ; Sat, 5 Oct 2019 00:04:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x9504qlQ054710 for ; Sat, 5 Oct 2019 00:04:52 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x9504q7g054702 for ports-bugs@FreeBSD.org; Sat, 5 Oct 2019 00:04:52 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 241068] dns/dnsmasq: IPv4 TFTP broken on dnsmasq after FreeBSD 11.2 Date: Sat, 05 Oct 2019 00:04:51 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: phil.chadwick@claremont.farm X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: mandree@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Oct 2019 00:04:52 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D241068 Bug ID: 241068 Summary: dns/dnsmasq: IPv4 TFTP broken on dnsmasq after FreeBSD 11.2 Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: mandree@FreeBSD.org Reporter: phil.chadwick@claremont.farm Flags: maintainer-feedback?(mandree@FreeBSD.org) CC: Assignee: mandree@FreeBSD.org See: https://forums.freebsd.org/threads/dnsmasq-tftp-service-not-working-any-lon= ger.72457/#post-440976 To reproduce the problem: cd /usr/ports/dns/dnsmasq make install cat - >/usr/local/etc/dnsmasq.conf </tmp/test.file # Start in debug mode /usr/local/sbin/dnsmasq -d -C /usr/local/etc/dnsmasq.conf # Start a client transfer from another session on the same host: tftp localhost get test.file It fails, repeatedly, on FreeBSD 11.3 and FreeBSD 12.0. Works on FreeBSD 1= 1.2. The problem arises in tftp.c at line 195, when the return is taken because if_index is zero, and can not be translated to a name. This results in dns= masq refusing to service a client tftp request: if (!indextoname(listen->tftpfd, if_index, namebuff)) return; The failure to set if_index correctly for BSD hosts occurs just prior to th= is=20 in the block of code commencing at line 159: #elif defined(IP_RECVDSTADDR) && defined(IP_RECVIF) if (listen->family =3D=3D AF_INET) for (cmptr =3D CMSG_FIRSTHDR(&msg); cmptr; cmptr =3D CMSG_NXTHDR(&m= sg, cmptr)) { union { unsigned char *c; struct in_addr *a; struct sockaddr_dl *s; } p; p.c =3D CMSG_DATA(cmptr); if (cmptr->cmsg_level =3D=3D IPPROTO_IP && cmptr->cmsg_type =3D= =3D IP_RECVDSTADDR) addr.in.sin_addr =3D *(p.a); else if (cmptr->cmsg_level =3D=3D IPPROTO_IP && cmptr->cmsg_typ= e =3D=3D IP_RECVIF) if_index =3D p.s->sdl_index; } #endif The value of if_index should be set by the above code, and it is not. --=20 You are receiving this mail because: You are the assignee for the bug.=