From owner-freebsd-jail@FreeBSD.ORG Fri Jul 25 03:20:49 2014 Return-Path: Delivered-To: freebsd-jail@FreeBSD.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 926285F5; Fri, 25 Jul 2014 03:20:48 +0000 (UTC) Date: Thu, 24 Jul 2014 23:20:45 -0400 From: Glen Barber To: Warren Block Subject: Re: check_dhcp Message-ID: <20140725032045.GY1065@hub.FreeBSD.org> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KH9S6eoVXLBawpUJ" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-jail@FreeBSD.org X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 03:20:49 -0000 --KH9S6eoVXLBawpUJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 24, 2014 at 09:14:24PM -0600, Warren Block wrote: > net-mgmt/monitoring-plugins has a check_dhcp program used to test the > availability of a remote DHCP server. It has BSD-specific code, but seems > fairly dated and only works when all supposedly optional parameters are > given. However, it does work on a normal machine: >=20 > OK: Received 1 DHCPOFFER(s), 1 of 1 requested servers responded, max le= ase time =3D 600 sec. >=20 > But it does not work inside a jail, seeing no offers: >=20 > CRITICAL: No DHCPOFFERs were received. >=20 > Raw sockets and bpf are enabled in the jail. dhclient in the jail can > actually get a lease. Is there anything else that needs to be configured= to > allow this to work in a jail? >=20 >=20 >=20 > After 'make -C /usr/ports/net-mgmt/monitoring-plugins', the code in quest= ion > is check_dhcp.c in > work/monitoring-plugins-monitoring-plugins-b5611ea/plugins-root. It gives > these type of errors: >=20 > % ./check_dhcp -s 192.168.1.1 > Error: if_nametoindex error - Device not configured. >=20 > % ./check_dhcp -s 192.168.1.1 -i em0 > Error: Couldn't get hardware address from em0. sysctl 2 error - No such= file or directory. >=20 > After adding -m , it gives no errors but never sees a > response. The problem, I suspect, is that bpf(4) does not exist in the jail. Glen --KH9S6eoVXLBawpUJ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJT0c0NAAoJELls3eqvi17QjHsP/3m3hBvbsop21I9PWdSwQfa9 H1mTmXT+FJDeuNaA1aSZ3jzqGt0+oqVUVPQ0JBZ8NsGEymrAzPyn8i6d7tg+sNEp m9KFBSr1opaqbr7Cu1Bjp9t/3Vfy3y3bJKFo1xguJK0hP0JIE6iXMtSTxbesA+6t t8dI7R2Dt6jqK7Bdatn7c3MUKz3VOc21BL3X1J4MGJY6yPJSEFe0e9VXsFNNIseR i2K8HvL6OGb4i+XYCYI5VDv6obCguP7KKIaGnVCeuEvDTBxYHQ0HY+KAoAHlwcia hwzI/JwdTDvodvyO2JNYkWkdwdBLihrxI0X3GV1SMaIWC3Lux9IoI1I53iL3jwaN CRsZs2ASKwGOWnBZssDphkEs3wbrVkmOOfX3w+2HNlqxvEFojl49pDTNNqzdU52+ f8mNwJIHxl0GIIifyfg1JFt2AYgePfG6Jg0nSz6jgj4kah1+9nVHXQUAVVhRar75 YgkqXcMKVQe+dOLfuhQXkGulEMxFKozqtfb5CRhjvn4qyzWpkc/IUY54ruJMtyAg JDAhLi3OK8wfG4KOIWxAJsWy4rM6+fWHzq9nn5B/lnF8pMT3QDdbopqm/9sLrt/S T0VcW0AqP38rINaersw/TyIGsYj5LE+SfShP8xGOkYHrwNWzC50YftPHKr+pU2pZ 4qG6bmx3P8Ltkr+kphMI =Ewnu -----END PGP SIGNATURE----- --KH9S6eoVXLBawpUJ--