[PULL 1/6] linux-user: netlink: Add missing IFA_PROTO to host_to_target_data_addr_rtattr()

deller@kernel.org posted 6 patches 3 months, 3 weeks ago
There is a newer version of this series
[PULL 1/6] linux-user: netlink: Add missing IFA_PROTO to host_to_target_data_addr_rtattr()
Posted by deller@kernel.org 3 months, 3 weeks ago
From: Helge Deller <deller@gmx.de>

Fixes this warning:
 Unknown host IFA type: 11

Signed-off-by: Helge Deller <deller@gmx.de>
---
 linux-user/fd-trans.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/linux-user/fd-trans.c b/linux-user/fd-trans.c
index c04a97c73a..6191e3115b 100644
--- a/linux-user/fd-trans.c
+++ b/linux-user/fd-trans.c
@@ -1143,6 +1143,7 @@ static abi_long host_to_target_data_addr_rtattr(struct rtattr *rtattr)
         break;
     /* string */
     case IFA_LABEL:
+    case IFA_PROTO:
         break;
     /* u32 */
     case IFA_FLAGS:
-- 
2.47.0
Re: [PULL 1/6] linux-user: netlink: Add missing IFA_PROTO to host_to_target_data_addr_rtattr()
Posted by Laurent Vivier 3 months, 2 weeks ago
Le 18/12/2024 à 20:52, deller@kernel.org a écrit :
> From: Helge Deller <deller@gmx.de>
> 
> Fixes this warning:
>   Unknown host IFA type: 11
> 
> Signed-off-by: Helge Deller <deller@gmx.de>
> ---
>   linux-user/fd-trans.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/linux-user/fd-trans.c b/linux-user/fd-trans.c
> index c04a97c73a..6191e3115b 100644
> --- a/linux-user/fd-trans.c
> +++ b/linux-user/fd-trans.c
> @@ -1143,6 +1143,7 @@ static abi_long host_to_target_data_addr_rtattr(struct rtattr *rtattr)
>           break;
>       /* string */
>       case IFA_LABEL:
> +    case IFA_PROTO:

IFA_PROTO is NLA_U8, it should be with IFA_ADDRESS and IFA_LOCAL, not IFA_LABEL (it is NLA_STRING).
I agree, it doesn't change anything in the code, but I like to keep same types together.

>           break;
>       /* u32 */
>       case IFA_FLAGS:

Thanks,
Laurent