Hello,

trying to run the current master tree on OpenWRT I noticed that any
Quagga daemon would just exit with code 1.

It seems that this has been introduced by this commit:

commit 55cfa2f190620f7c711944637659bc208970324d
Author: Feng Lu <lu.f...@6wind.com>
Date:   Thu Jul 3 18:24:34 2014 +0800

My understanding of it is this:

This commit checks for the presence of the setns system call in the
kernel and sets a flag HAVE_NETNS if it is found. If the flag is set at
compile time, netns support in the kernel needs to be enabled at
runtime. If it is absent, Quagga daemons will just exit with exit(1)
from VRF initialization because it fails to open "/proc/self/ns/net".

However OpenWRT does not have netns support enabled in its standard
configuration, while its kernel headers do provide the API, causing
Quagga to be built with the HAVE_NETNS flag set and then failing to run
on the target platform.

In my opinion and from past experience with code that uses network
namespaces, this should not be a compile time decision but something
that is decided at runtime. If namespaces can be correctly used at
startup use them for VRFs, otherwise fall back.

Another option would be to add something like --without-netns to the
autoconf, however that would mean that distributions might make the
wrong choice for their users.

-Christian



_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to