Skip to contentSkip to conversation

libipvs: discrepancy with libnl genlmsg_put

PATCH In review [email protected] 2 participants 3 messages Sep 27, 2017 – Oct 5, 2017 IPVS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libipvs: discrepancy with libnl genlmsg_put

From: Arthur Gautier <[email protected]>

There is a mixup between NL_AUTO_PORT and NL_AUTO_PID. The first should be used with genlmsg_put while the second with nlmsg_put.

This is not a problem, because both NL_AUTO_PORT and NL_AUTO_PID have the same value, but still a discrepancy with libnl documentation.

see documentation of genlmsg_put here:
http://www.infradead.org/~tgr/libnl/doc/api/group__genl.html#ga9a86a71bbba6961d41b8a75f62f9e946

Cc Julian Anastasov <[email protected]>
Cc Simon Horman <[email protected]>
Cc Jesper Dangaard Brouer <[email protected]>
---
 libipvs/libipvs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libipvs/libipvs.c +1 -1
index d271c48e36faa..a8432431fbbf6 100644
@@ -63,7 +63,7 @@ struct nl_msg *ipvs_nl_message(int cmd, int flags)
 	if (!msg)
 		return NULL;
 
-	genlmsg_put(msg, NL_AUTO_PID, NL_AUTO_SEQ, family, 0, flags,
+	genlmsg_put(msg, NL_AUTO_PORT, NL_AUTO_SEQ, family, 0, flags,
 		    cmd, IPVS_GENL_VERSION);
 
 	return msg;
Signature · 1 line
2.14.1
#1 lore raw
Quoted 9 lines · On Wed, 27 Sep 2017 15:31:05 +0000 [email protected] wrote:

From: Arthur Gautier <[email protected]>

There is a mixup between NL_AUTO_PORT and NL_AUTO_PID. The first should be used with genlmsg_put while the second with nlmsg_put.

This is not a problem, because both NL_AUTO_PORT and NL_AUTO_PID have the same value, but still a discrepancy with libnl documentation.

Quoted 8 lines

see documentation of genlmsg_put here:
http://www.infradead.org/~tgr/libnl/doc/api/group__genl.html#ga9a86a71bbba6961d41b8a75f62f9e946

Cc Julian Anastasov <[email protected]>
Cc Simon Horman <[email protected]>
Cc Jesper Dangaard Brouer <[email protected]>

---

Applied this here:
https://git.kernel.org/pub/scm/utils/kernel/ipvsadm/ipvsadm.git/commit/?id=76c12701481

Thank you Arthur for bringing this discrepancy in-order :-)

Signature · 4 lines
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer
#2 lore raw
Quoted 21 lines · Jesper Dangaard Brouer
Quoted 9 lines · On Wed, 27 Sep 2017 15:31:05 +0000 [email protected] wrote:

From: Arthur Gautier <[email protected]>

There is a mixup between NL_AUTO_PORT and NL_AUTO_PID. The first should be used with genlmsg_put while the second with nlmsg_put.

This is not a problem, because both NL_AUTO_PORT and NL_AUTO_PID have the same value, but still a discrepancy with libnl documentation.

Quoted 8 lines

see documentation of genlmsg_put here:
http://www.infradead.org/~tgr/libnl/doc/api/group__genl.html#ga9a86a71bbba6961d41b8a75f62f9e946

Cc Julian Anastasov <[email protected]>
Cc Simon Horman <[email protected]>
Cc Jesper Dangaard Brouer <[email protected]>

---

Quoted 4 lines

Applied this here:
https://git.kernel.org/pub/scm/utils/kernel/ipvsadm/ipvsadm.git/commit/?id=76c12701481

Thank you Arthur for bringing this discrepancy in-order :-)

My OCD says thank you.

Signature · 2 lines
\o/ Arthur
 G  Gandi.net