diff mbox series

[iproute2-next] libnetlink: Fix wrong netlink header placement

Message ID 20221208143816.936498-1-idosch@nvidia.com (mailing list archive)
State Accepted
Commit fa94a9792155f6692df50f13c3cfea5d21885f1f
Delegated to: David Ahern
Headers show
Series [iproute2-next] libnetlink: Fix wrong netlink header placement | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Ido Schimmel Dec. 8, 2022, 2:38 p.m. UTC
The netlink header must be first in the netlink message, so move it
there.

Fixes: fee4a56f0191 ("Update kernel headers")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
---
 include/libnetlink.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jiri Pirko Dec. 8, 2022, 4:04 p.m. UTC | #1
Thu, Dec 08, 2022 at 03:38:16PM CET, idosch@nvidia.com wrote:
>The netlink header must be first in the netlink message, so move it
>there.
>
>Fixes: fee4a56f0191 ("Update kernel headers")
>Signed-off-by: Ido Schimmel <idosch@nvidia.com>

Interesing.

Reviewed-by: Jiri Pirko <jiri@nvidia.com>
David Ahern Dec. 8, 2022, 4:07 p.m. UTC | #2
On 12/8/22 7:38 AM, Ido Schimmel wrote:
> The netlink header must be first in the netlink message, so move it
> there.
> 
> Fixes: fee4a56f0191 ("Update kernel headers")
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>
> ---
>  include/libnetlink.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/libnetlink.h b/include/libnetlink.h
> index 4d9696efa253..c91a22314548 100644
> --- a/include/libnetlink.h
> +++ b/include/libnetlink.h
> @@ -38,9 +38,9 @@ struct nlmsg_chain {
>  };
>  
>  struct ipstats_req {
> +	struct nlmsghdr nlh;
>  	struct if_stats_msg ifsm;
>  	char buf[128];
> -	struct nlmsghdr nlh;
>  };
>  
>  extern int rcvbuf;

thanks for noticing this. Must have been stale diff on the branch when I
was looking into the flex-array problem.
patchwork-bot+netdevbpf@kernel.org Dec. 8, 2022, 4:30 p.m. UTC | #3
Hello:

This patch was applied to iproute2/iproute2-next.git (main)
by David Ahern <dsahern@kernel.org>:

On Thu,  8 Dec 2022 16:38:16 +0200 you wrote:
> The netlink header must be first in the netlink message, so move it
> there.
> 
> Fixes: fee4a56f0191 ("Update kernel headers")
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>
> ---
>  include/libnetlink.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - [iproute2-next] libnetlink: Fix wrong netlink header placement
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=fa94a9792155

You are awesome, thank you!
diff mbox series

Patch

diff --git a/include/libnetlink.h b/include/libnetlink.h
index 4d9696efa253..c91a22314548 100644
--- a/include/libnetlink.h
+++ b/include/libnetlink.h
@@ -38,9 +38,9 @@  struct nlmsg_chain {
 };
 
 struct ipstats_req {
+	struct nlmsghdr nlh;
 	struct if_stats_msg ifsm;
 	char buf[128];
-	struct nlmsghdr nlh;
 };
 
 extern int rcvbuf;