Message ID | 20240415163348.39425-1-stephen@networkplumber.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 0a1e1522cde95a5daea4efd2ef16bc356164c068 |
Delegated to: | David Ahern |
Headers | show |
Series | mnl: initialize generic netlink version | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
Hello: This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <stephen@networkplumber.org>: On Mon, 15 Apr 2024 09:33:47 -0700 you wrote: > The version field in mnlu was being passed in but never set. > This meant that all places mnlu_gen_socket was used, the version would > be uninitialized data from malloc(). > > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> > --- > lib/mnl_utils.c | 2 ++ > 1 file changed, 2 insertions(+) Here is the summary with links: - mnl: initialize generic netlink version https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=0a1e1522cde9 You are awesome, thank you!
diff --git a/lib/mnl_utils.c b/lib/mnl_utils.c index af5aa4f9..6c8f527e 100644 --- a/lib/mnl_utils.c +++ b/lib/mnl_utils.c @@ -193,6 +193,8 @@ int mnlu_gen_socket_open(struct mnlu_gen_socket *nlg, const char *family_name, if (!nlg->nl) goto err_socket_open; + nlg->version = version; + err = family_get(nlg, family_name); if (err) goto err_socket;
The version field in mnlu was being passed in but never set. This meant that all places mnlu_gen_socket was used, the version would be uninitialized data from malloc(). Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- lib/mnl_utils.c | 2 ++ 1 file changed, 2 insertions(+)