Netdev List
 help / color / mirror / Atom feed
From: Fernando Fernandez Mancera <fmancera@suse.de>
To: netdev@vger.kernel.org
Cc: dsahern@kernel.org, stephen@networkplumber.org,
	davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	Fernando Fernandez Mancera <fmancera@suse.de>
Subject: [PATCH 2/2 iproute2-next] iplink: set NLA_F_NESTED for IPv4 devconf attributes
Date: Sun,  7 Jun 2026 08:57:15 +0200	[thread overview]
Message-ID: <20260607065715.4573-2-fmancera@suse.de> (raw)
In-Reply-To: <20260607065715.4573-1-fmancera@suse.de>

In order to use set multiple IPv4 devconf parameters at once,
NLA_F_NESTED flag is required.

ip link set dev enp8s0 inet forwarding on proxy_arp off

Fixes: fdb064bf64e5 ("iplink: add support for setting IPv4 devconf parameters")
Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de>
---
 ip/iplink.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ip/iplink.c b/ip/iplink.c
index 9799530f..3f0b46c9 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -579,7 +579,8 @@ static int iplink_parse_inet(int *argcp, char ***argvp, struct iplink_req *req)
 
 	afs = addattr_nest(&req->n, sizeof(*req), IFLA_AF_SPEC);
 	afinet = addattr_nest(&req->n, sizeof(*req), AF_INET);
-	inet_devconf = addattr_nest(&req->n, sizeof(*req), IFLA_INET_CONF);
+	inet_devconf = addattr_nest(&req->n, sizeof(*req),
+				    IFLA_INET_CONF | NLA_F_NESTED);
 
 	while (NEXT_ARG_OK()) {
 		NEXT_ARG();
-- 
2.54.0


  reply	other threads:[~2026-06-07  6:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-07  6:57 [PATCH 1/2 iproute2-next] man: iplink: fix indentation level after inet parameter Fernando Fernandez Mancera
2026-06-07  6:57 ` Fernando Fernandez Mancera [this message]
2026-06-07 13:50 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260607065715.4573-2-fmancera@suse.de \
    --to=fmancera@suse.de \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox