]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: fix endianness issue in inet_rtm_getroute_build_skb()
authorEric Dumazet <edumazet@google.com>
Tue, 31 Aug 2021 02:02:10 +0000 (19:02 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 31 Aug 2021 11:03:03 +0000 (12:03 +0100)
commit92548b0ee220e000d81c27ac9a80e0ede895a881
tree863f467ab8cda8c7a8f4c401b6e4d18528d03da2
parent616920a6a567e2fc5b9437b84703de717bb7295e
ipv4: fix endianness issue in inet_rtm_getroute_build_skb()

The UDP length field should be in network order.
This removes the following sparse error:

net/ipv4/route.c:3173:27: warning: incorrect type in assignment (different base types)
net/ipv4/route.c:3173:27:    expected restricted __be16 [usertype] len
net/ipv4/route.c:3173:27:    got unsigned long

Fixes: 404eb77ea766 ("ipv4: support sport, dport and ip_proto in RTM_GETROUTE")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Roopa Prabhu <roopa@nvidia.com>
Cc: David Ahern <dsahern@kernel.org>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/route.c