summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2015-03-07 08:30:58 +0200
committerStephen Hemminger <shemming@brocade.com>2015-03-15 12:17:34 -0700
commitd116ff34145b00db54a37e2a6282dccd8bc08225 (patch)
tree0c619da0bb91774e5b141cdd7afe0f6bda003669 /configure
parentf3a2ddc124e09d3990b836e322ed39c76c35546e (diff)
ip netns: Fix rtnl error while print netns list
Observed on the Linux 3.18: # ip netns RTNETLINK answers: Operation not supported net0 CC: Nicolas Dichtel <nicolas.dichtel@6wind.com> Fixes: d182ee1307c7 ("ipnetns: allow to get and set netns ids") Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure21
1 files changed, 20 insertions, 1 deletions
diff --git a/configure b/configure
index c3dacdba..631938e9 100755
--- a/configure
+++ b/configure
@@ -201,7 +201,7 @@ check_setns()
{
cat >$TMPDIR/setnstest.c <<EOF
#include <sched.h>
-int main(int argc, char **argv)
+int main(int argc, char **argv)
{
(void)setns(0,0);
return 0;
@@ -218,6 +218,23 @@ EOF
rm -f $TMPDIR/setnstest.c $TMPDIR/setnstest
}
+check_netnsid()
+{
+ cat >$TMPDIR/netnsid.c <<EOF
+#include <linux/rtnetlink.h>
+int test_def = RTM_GETNSID;
+EOF
+ $CC -c $TMPDIR/netnsid.c >/dev/null 2>&1
+ if [ $? -eq 0 ]
+ then
+ echo "IP_CONFIG_NETNSID:=y" >> Config
+ echo "yes"
+ else
+ echo "no"
+ fi
+ rm -f $TMPDIR/netnsid.c $TMPDIR/netnsid.o
+}
+
check_ipset()
{
cat >$TMPDIR/ipsettest.c <<EOF
@@ -283,6 +300,8 @@ check_ipt_lib_dir
echo -n "libc has setns: "
check_setns
+echo -n "netns has peer id suport: "
+check_netnsid
echo -n "SELinux support: "
check_selinux