From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vadim Kochan Subject: [PATCH iproute2] ip netns: Fix rtnl error while print netns list Date: Fri, 6 Mar 2015 17:12:31 +0200 Message-ID: <1425654751-21166-1-git-send-email-vadim4j@gmail.com> Cc: nicolas.dichtel@6wind.com, Vadim Kochan To: netdev@vger.kernel.org Return-path: Received: from mail-lb0-f182.google.com ([209.85.217.182]:45809 "EHLO mail-lb0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754294AbbCFPYJ (ORCPT ); Fri, 6 Mar 2015 10:24:09 -0500 Received: by lbiz12 with SMTP id z12so30370334lbi.12 for ; Fri, 06 Mar 2015 07:24:07 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: From: Vadim Kochan Observed on the Linux 3.18: # ip netns RTNETLINK answers: Operation not supported net0 CC: Nicolas Dichtel Fixes: d182ee1307c7 ("ipnetns: allow to get and set netns ids") Signed-off-by: Vadim Kochan --- configure | 25 ++++++++++++++++++++++++- ip/Makefile | 3 +++ ip/ipnetns.c | 7 +++++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/configure b/configure index c3dacdb..eaff342 100755 --- a/configure +++ b/configure @@ -201,7 +201,7 @@ check_setns() { cat >$TMPDIR/setnstest.c < -int main(int argc, char **argv) +int main(int argc, char **argv) { (void)setns(0,0); return 0; @@ -218,6 +218,27 @@ EOF rm -f $TMPDIR/setnstest.c $TMPDIR/setnstest } +check_netnsid() +{ + cat >$TMPDIR/netnsid.c < +int main(int argc, char **argv) +{ + int test_def = RTM_GETNSID; + return 0; +} +EOF + $CC -o $TMPDIR/netnsid $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 +} + check_ipset() { cat >$TMPDIR/ipsettest.c <