Skip to content

Commit

Permalink
mctp: Be explicit about struct sockaddr_mctp padding
Browse files Browse the repository at this point in the history
We currently have some implicit padding in struct sockaddr_mctp. This
patch makes this padding explicit, and ensures we have consistent
layout on platforms with <32bit alignmnent.

Fixes: 60fc639 ("mctp: Add sockaddr_mctp to uapi")
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jeremy Kerr authored and David S. Miller committed Oct 18, 2021
1 parent b416beb commit 5a20dd4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/uapi/linux/mctp.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ struct mctp_addr {

struct sockaddr_mctp {
__kernel_sa_family_t smctp_family;
__u16 __smctp_pad0;
unsigned int smctp_network;
struct mctp_addr smctp_addr;
__u8 smctp_type;
__u8 smctp_tag;
__u8 __smctp_pad1;
};

#define MCTP_NET_ANY 0x0
Expand Down

0 comments on commit 5a20dd4

Please sign in to comment.