Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 197791
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo's Team for Core System packages <base-system@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Alon Bar-Lev (RETIRED) <alonbl@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
bridge-utils-1.2-noip.patch bridge-utils-1.2-noip.patch patch Alon Bar-Lev (RETIRED) 2007-11-01 15:45 0000 730 bytes Details | Diff
ifplugd-0.28-noip.patch ifplugd-0.28-noip.patch patch Alon Bar-Lev (RETIRED) 2007-11-01 15:48 0000 707 bytes Details | Diff
lo.patch null lo patch patch Roy Marples (RETIRED) 2007-11-01 16:12 0000 399 bytes Details | Diff
find.out find /proc/net and /proc/sys/net text/plain Alon Bar-Lev (RETIRED) 2007-11-01 16:57 0000 629 bytes Details
ipless.patch ipless.patch patch Roy Marples (RETIRED) 2007-11-01 17:25 0000 3.02 KB Details | Diff
ipless.patch ipless.patch patch Roy Marples (RETIRED) 2007-11-01 20:21 0000 3.84 KB Details | Diff
ipless.patch ipless.patch patch Roy Marples (RETIRED) 2007-11-01 22:14 0000 3.79 KB Details | Diff
ipless.patch ipless.patch patch Roy Marples (RETIRED) 2007-11-01 22:17 0000 3.79 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 197791 depends on: Show dependency tree
Bug 197791 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-11-01 15:43 0000
Hello Roy,

Sorry it took some time, I have concluded these are the only issues left for
supporting a system without TCP/IP in kernel.

Tested with rc6.

1. It will be nice if lo interface will accept config_lo="null" and will not
try to assign IP address if null configuration is requested, same as any other
interface.

2. ip route flush table cache dev XXX issues a warning that cannot open
/proc/sys/net/.... maybe redirect to null (it returns success anyway).

3. /lib/rc/net/bridge.sh uses ifconfig in order to set promisc. From my tests
this is not needed for bridging... Anyway, ifconfig does not work without
TCP/IP... if iproute2 module is used, then ip link set $int promisc $state
should be used in bridge as well.

4. ifplugd configuration does not work correctly, when this configuration is
selected (modules="plug"), when interface is started I get:
WARNING: net.eth0 not under our control, aborting
This comes out of src/runscript.c, I don't exactly know what happens, I guess
that if configuration is null then interface is started, and the condition of
inactive does not apply.

5. OT: It is difficult to debug the background networking scripts... As the
--debug only apply to current instance... Please consider adding IN_DEBUG
environment variable or something similar so that debug will be inherited. Also
the binary part of baselayout does not consider the --debug.

Thanks!

------- Comment #1 From Alon Bar-Lev (RETIRED) 2007-11-01 15:45:51 0000 -------
Created an attachment (id=134899) [details]
bridge-utils-1.2-noip.patch

A patch to allow bridge-utils to work in TCP/IP-less system.

robbat2: Upstream merged this.

------- Comment #2 From Alon Bar-Lev (RETIRED) 2007-11-01 15:48:08 0000 -------
Created an attachment (id=134901) [details]
ifplugd-0.28-noip.patch

A patch to allow bridge-utils to work in TCP/IP-less system.

uberlord: I sent to upstream, got no response, maybe you can help.

------- Comment #3 From Roy Marples (RETIRED) 2007-11-01 15:56:49 0000 -------
(In reply to comment #0)
> 1. It will be nice if lo interface will accept config_lo="null" and will not
> try to assign IP address if null configuration is requested, same as any other
> interface.

Don't put net.lo in a runlevel then and we won't do anything with it.

> 5. OT: It is difficult to debug the background networking scripts... As the
> --debug only apply to current instance... Please consider adding IN_DEBUG
> environment variable or something similar so that debug will be inherited. Also
> the binary part of baselayout does not consider the --debug.

IN_BACKGROUND=true /etc/init.d/net.eth0 --debug start

------- Comment #4 From Alon Bar-Lev (RETIRED) 2007-11-01 16:07:49 0000 -------
> Don't put net.lo in a runlevel then and we won't do anything with it.

This is what I did.
But then I need to have several softlevel in order to determine when to include
it and when not. An easier and more consistent solution would be to support
"null" configuration.

> 5. OT: It is difficult to debug the background networking scripts... As the

IN_BACKGROUND=true /etc/init.d/net.eth0 --debug start

Tried this... :)
But I could not reproduce the issue by hand, I even commented out the ifplugd
action and tried again...
I don't understand why the message (4) appear.

------- Comment #5 From Roy Marples (RETIRED) 2007-11-01 16:12:42 0000 -------
Created an attachment (id=134915) [details]
null lo patch

Well, it's no hardship to do this. Does this work for you?

------- Comment #6 From Roy Marples (RETIRED) 2007-11-01 16:23:46 0000 -------
Could you attach a directory layout of /proc/net and /proc/sys/net from your
ipless kernel? Thanks

------- Comment #7 From Alon Bar-Lev (RETIRED) 2007-11-01 16:49:13 0000 -------
> Does this work for you?

Partially.
The routes should also be ignored
I ${config} is not available at the route point, but if I copy it, I can do:
[ "${config}" != "null" ] && routes="..."

------- Comment #8 From Alon Bar-Lev (RETIRED) 2007-11-01 16:57:34 0000 -------
Created an attachment (id=134919) [details]
find /proc/net and /proc/sys/net

------- Comment #9 From Roy Marples (RETIRED) 2007-11-01 17:25:19 0000 -------
Created an attachment (id=134923) [details]
ipless.patch

OK, this should deal with most of what you want changed in baselayout.

------- Comment #10 From SpanKY 2007-11-01 19:01:52 0000 -------
does disabling that stuff make any sense ?  iow, why are you running
iproute/ifplugd/whatever in the first place on a system that lacks IP ?

simply sending things to >/dev/null is lame and can cover up real problems

------- Comment #11 From Roy Marples (RETIRED) 2007-11-01 19:09:42 0000 -------
(In reply to comment #10)
> does disabling that stuff make any sense ?  iow, why are you running
> iproute/ifplugd/whatever in the first place on a system that lacks IP ?

bridge uses iproute2/ifconfig to put the slave interface into promiscous mode.
This is required if the slave interface has an ip address.

> simply sending things to >/dev/null is lame and can cover up real problems

I couldn't see anything in /proc to indicate if iconfig/iproute2 stands a
chance of working or not. If the exact error message was given instead of
"cannot open
/proc/sys/net/...." then maybe we could do something else.

------- Comment #12 From Alon Bar-Lev (RETIRED) 2007-11-01 19:25:37 0000 -------
(In reply to comment #11)
> bridge uses iproute2/ifconfig to put the slave interface into promiscous mode.
> This is required if the slave interface has an ip address.

What is slave interface?
Do you mean the eth0 for example that is part of the bridge?
If so, maybe turning promisc should be optional.

> > simply sending things to >/dev/null is lame and can cover up real problems
> 
> I couldn't see anything in /proc to indicate if iconfig/iproute2 stands a
> chance of working or not. If the exact error message was given instead of
> "cannot open
> /proc/sys/net/...." then maybe we could do something else.
> 

ip link set eth0 promisc on

Works... it uses ioctl to do this.
Why didn't you use this if iproute2 is available?

------- Comment #13 From Alon Bar-Lev (RETIRED) 2007-11-01 19:37:50 0000 -------
I still get:
WARNING: net.eth0 not under our control, aborting
For ifplugd.

Why do I want ifplugd to work?
When interface is up it is nice to do some stuff using baselayout and not hack
a new ifplugd configuration.

This is strange, as if I comment out ifplugd.action and do:
/etc/init.d/net.eth0 start
IN_BACKGROUND=true /etc/init.d/net.eth0 start
All works great!

------- Comment #14 From Roy Marples (RETIRED) 2007-11-01 20:21:00 0000 -------
Created an attachment (id=134954) [details]
ipless.patch

OK, we just /dev/null the flushing of the cache now and use iproute2 if
available, falling back to ifconfig.

The ifplugd issue is probably related to bug #196029 and futher commentry on
that issue should move there or elsewhere. I'll test your ifplugd patch for the
AF_LOCAL thingy when I find some working cat5.

------- Comment #15 From SpanKY 2007-11-01 20:47:04 0000 -------
the route flushing only makes sense if /proc/net/route exists, so use that
instead of /dev/null

and then put a comment to indicate "this check is in case user has disabled IP
support in their kernel and they are trying to use bridging (which tails into
iproute)"

------- Comment #16 From Alon Bar-Lev (RETIRED) 2007-11-01 20:50:54 0000 -------
It does not work properly.
The IFACE value is modified...
I did not expect this either, but I checked this out...

---
#!/bin/sh
test1() {
        echo "B001 ${A}"
}
A="value1"
echo "A001 ${A}"
test1
A="value2" test1
echo "A002 ${A}"
---
Outputs:
---
A001 value1
B001 value1
B001 value2
A002 value2
---
While I expect:
---
A001 value1
B001 value1
B001 value2
A002 value1
---

I checked with bash and busybox...
So I must miss something.
Shouldn't internal function behaves as external commands?

------- Comment #17 From Alon Bar-Lev (RETIRED) 2007-11-01 20:52:48 0000 -------
(In reply to comment #14)
> The ifplugd issue is probably related to bug #196029 and futher commentry on
> that issue should move there or elsewhere.

OK. But I don't understand how it is related.
But thanks!

------- Comment #18 From Roy Marples (RETIRED) 2007-11-01 22:14:56 0000 -------
Created an attachment (id=134970) [details]
ipless.patch

ok, this should be good to go now.

------- Comment #19 From Roy Marples (RETIRED) 2007-11-01 22:17:20 0000 -------
Created an attachment (id=134972) [details]
ipless.patch

erm, maybe this is

------- Comment #20 From Alon Bar-Lev (RETIRED) 2007-11-01 22:18:04 0000 -------
Thanks!
A simple question... Won't it be cleaner to pass the interface as an argument?

------- Comment #21 From Roy Marples (RETIRED) 2007-11-01 22:22:40 0000 -------
In this instance yes, but most of the time it's not needed as we normally work
on the interface in question.

------- Comment #22 From Alon Bar-Lev (RETIRED) 2007-11-01 22:41:47 0000 -------
-[ -e /proc/net/route ] && ip route flush table cache dev "${IFACE}"
+[ -e /proc/net/route ] && ip route flush table cache dev "${IFACE}" || true

And we are there!
Thank you so much!

------- Comment #23 From SpanKY 2007-11-01 23:14:54 0000 -------
umm, no ... that does not have the behavior we want

if [ -e /proc/net/route ] ; then
    ip route flush table cache dev "${IFACE}"
fi

------- Comment #24 From SpanKY 2007-11-01 23:15:47 0000 -------
also, the comment in iproute2_post_start() is incorrect ... it isnt a TCP
issue, it's an IP issue

------- Comment #25 From Alon Bar-Lev (RETIRED) 2007-11-02 05:54:27 0000 -------
(In reply to comment #23)
> umm, no ... that does not have the behavior we want
> 
> if [ -e /proc/net/route ] ; then
>     ip route flush table cache dev "${IFACE}"
> fi
> 

This will return false if no /proc/net/route, while is should return true.

How about:

! [ -e /proc/net/route ] || ip route flush table cache dev "${IFACE}"

------- Comment #26 From SpanKY 2007-11-02 06:37:39 0000 -------
no it wont and that's the point ... yours forces ignoring the exit status while
mine properly returns the correct status

test it if you think otherwise:
if false ; then true ; fi ; echo $? <- ok
if true ; then true ; fi ; echo $?  <- ok
if true ; then false ; fi ; echo $? <- ok

false && true || true ; echo $? <- ok
true && true || true ; echo $?  <- ok
true && false || true ; echo $? <- bad

------- Comment #27 From Alon Bar-Lev (RETIRED) 2007-11-02 06:56:11 0000 -------
OK.
Sorry.

------- Comment #28 From Roy Marples (RETIRED) 2007-11-02 07:27:51 0000 -------
(In reply to comment #23)
> umm, no ... that does not have the behavior we want
> 
> if [ -e /proc/net/route ] ; then
>     ip route flush table cache dev "${IFACE}"
> fi
> 

Thanks Dad!

------- Comment #29 From Roy Marples (RETIRED) 2007-11-02 11:17:24 0000 -------
(In reply to comment #2)
> Created an attachment (id=134901) [edit] [details]
> ifplugd-0.28-noip.patch
> 
> A patch to allow bridge-utils to work in TCP/IP-less system.
> 
> uberlord: I sent to upstream, got no response, maybe you can help.

Works ok, added to -r9. upstream is kinda dead i think.

------- Comment #30 From Alon Bar-Lev (RETIRED) 2007-11-20 22:11:05 0000 -------
ifplugd merged! :)

------- Comment #31 From Alon Bar-Lev (RETIRED) 2008-01-01 17:27:37 0000 -------
robbat2: Can you please add bridge-utils patch (attachment#134899 [details]).
This is the last issue, as ifplugd is setup and openrc fixes the baselayout
stuff.

Thanks!

------- Comment #32 From Alon Bar-Lev (RETIRED) 2008-01-07 13:43:27 0000 -------
OK.
I've opened bug#204744 for bridge-utils fixups.
Thanks for your help!

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug