From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RuVlh-0002by-Ek for garchives@archives.gentoo.org; Mon, 06 Feb 2012 21:06:33 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E6C00E0713; Mon, 6 Feb 2012 21:06:19 +0000 (UTC) Received: from mail-yw0-f53.google.com (mail-yw0-f53.google.com [209.85.213.53]) by pigeon.gentoo.org (Postfix) with ESMTP id 76FD9E0565 for ; Mon, 6 Feb 2012 21:05:42 +0000 (UTC) Received: by yhjj72 with SMTP id j72so2890677yhj.40 for ; Mon, 06 Feb 2012 13:05:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:date:from:to:subject:message-id:mail-followup-to :mime-version:content-type:content-disposition:user-agent; bh=d7I4Ld1pp4EjemzSW3j71MLD5cP0nKZcs1nfXUbEDfM=; b=KYsHDLFsFUtRTIzElDjd1BbZ9IRDFpGxxQoETttYZ2lHxy3+rlS6iYUqEYWNyzvSKk MSEOzGOnVYIP5bMc7hgwDfTxzRPEybJp48znNQojRL6RqqvS2xm6tjmywM4JzPu9bWRP d62IYCF6fd/WLokXI+fFkRreA/exxvYLrzSzU= Received: by 10.236.124.69 with SMTP id w45mr27249543yhh.57.1328562341971; Mon, 06 Feb 2012 13:05:41 -0800 (PST) Received: from linux1 (cpe-76-187-77-158.tx.res.rr.com. [76.187.77.158]) by mx.google.com with ESMTPS id i6sm37954081and.3.2012.02.06.13.05.40 (version=SSLv3 cipher=OTHER); Mon, 06 Feb 2012 13:05:41 -0800 (PST) Sender: William Hubbs Received: by linux1 (sSMTP sendmail emulation); Mon, 06 Feb 2012 15:04:51 -0600 Date: Mon, 6 Feb 2012 15:04:51 -0600 From: William Hubbs To: gentoo development Subject: [gentoo-dev] rfc: only the loopback interface should provide net Message-ID: <20120206210451.GA1940@linux1> Mail-Followup-To: gentoo development Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="i9LlY+UWpKt15+FH" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Archives-Salt: 3704782b-dc33-4008-88ec-8eaaeb887055 X-Archives-Hash: 08fd6d9f4d1d36e29d7771bc4af63bef --i9LlY+UWpKt15+FH Content-Type: multipart/mixed; boundary="sdtB3X0nJg68CQEu" Content-Disposition: inline --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline All, I've been pondering for a while why All of OpenRC's network interfaces provide net. My understanding of the "net" service is that it is there to signal that a generic network connection is active. What I would like to do in OpenRC is change the network scripts so that only the loopback interface provides net. The down side of this approach will be that if a daemon uses a specific ip address in its configuration, or if it binds to a specific address, the user will have to set up the appropriate configuration options in /etc/conf.d. For example, if I setup sshd to use 192.168.10.1 and eth0 has this address, I have to put the following line in /etc/conf.d/sshd: rc_need="net.eth0" One advantage I see of this approach is it will provide a fix for bugs like http://bugs.gentoo.org/show_bug.cgi?id=228973 by requiring users to configure services like this to start after the interface they use is started. Attached to this message you will find the patch I want to apply to OpenRC to make this change. Any thoughts, comments, or suggestions would be helpful. William --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-Only-the-loopback-interface-should-provide-net.patch" Content-Transfer-Encoding: quoted-printable =46rom cf57aa084dfa3020c9f0ae1f3a07e2fbf2e588dc Mon Sep 17 00:00:00 2001 =46rom: William Hubbs Date: Mon, 6 Feb 2012 09:24:52 -0600 Subject: [PATCH] Only the loopback interface should provide net --- init.d/net.lo.in | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/init.d/net.lo.in b/init.d/net.lo.in index bf2d848..b3d2b1a 100644 --- a/init.d/net.lo.in +++ b/init.d/net.lo.in @@ -20,11 +20,10 @@ depend() =20 need localmount after bootmisc - provide net keyword -jail -prefix -vserver =20 case "${IFACE}" in - lo|lo0);; + lo|lo0) provide net;; *) after net.lo net.lo0 dbus;; esac =20 --=20 1.7.3.4 --sdtB3X0nJg68CQEu-- --i9LlY+UWpKt15+FH Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iEYEARECAAYFAk8wQHMACgkQblQW9DDEZThRYQCgtXy3wuleGC62PuVyH4sWj1hB U+oAoKaD8WTKD9YHV6D+98inpuAJgsj7 =QG9a -----END PGP SIGNATURE----- --i9LlY+UWpKt15+FH--