public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] rfc: only the loopback interface should provide net
@ 2012-02-06 21:04 William Hubbs
  2012-02-06 21:36 ` Zac Medico
  2012-02-06 23:15 ` Alexandre Rostovtsev
  0 siblings, 2 replies; 16+ messages in thread
From: William Hubbs @ 2012-02-06 21:04 UTC (permalink / raw
  To: gentoo development


[-- Attachment #1.1: Type: text/plain, Size: 1085 bytes --]

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


[-- Attachment #1.2: 0001-Only-the-loopback-interface-should-provide-net.patch --]
[-- Type: text/plain, Size: 683 bytes --]

From cf57aa084dfa3020c9f0ae1f3a07e2fbf2e588dc Mon Sep 17 00:00:00 2001
From: William Hubbs <williamh@gentoo.org>
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()
 
 	need localmount
 	after bootmisc
-	provide net
 	keyword -jail -prefix -vserver
 
 	case "${IFACE}" in
-		lo|lo0);;
+		lo|lo0) provide net;;
 		*) after net.lo net.lo0 dbus;;
 	esac
 
-- 
1.7.3.4


[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-02-22 21:22 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-06 21:04 [gentoo-dev] rfc: only the loopback interface should provide net William Hubbs
2012-02-06 21:36 ` Zac Medico
2012-02-06 23:15 ` Alexandre Rostovtsev
2012-02-07  1:41   ` William Hubbs
2012-02-07  2:33     ` Alexandre Rostovtsev
2012-02-07  3:21       ` [gentoo-dev] " Duncan
2012-02-07  6:43   ` [gentoo-dev] " William Hubbs
2012-02-07  8:28     ` Alexandre Rostovtsev
2012-02-07 14:39       ` Ian Stakenvicius
2012-02-07 16:44         ` William Hubbs
2012-02-07 16:58           ` Alec Warner
2012-02-07 16:46         ` [gentoo-dev] " Duncan
2012-02-07 17:12           ` Ian Stakenvicius
2012-02-07 17:33           ` William Hubbs
2012-02-07 18:31             ` Alexandre Rostovtsev
2012-02-22 21:19   ` [gentoo-dev] " William Hubbs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox