• Jeremy Kerr's avatar
    mctp: Implement extended addressing · 99ce45d5
    Jeremy Kerr authored
    This change allows an extended address struct - struct sockaddr_mctp_ext
    - to be passed to sendmsg/recvmsg. This allows userspace to specify
    output ifindex and physical address information (for sendmsg) or receive
    the input ifindex/physaddr for incoming messages (for recvmsg). This is
    typically used by userspace for MCTP address discovery and assignment
    operations.
    
    The extended addressing facility is conditional on a new sockopt:
    MCTP_OPT_ADDR_EXT; userspace must explicitly enable addressing before
    the kernel will consume/populate the extended address data.
    
    Includes a fix for an uninitialised var:
    Reported-by: default avatarkernel test robot <lkp@intel.com>
    Signed-off-by: default avatarJeremy Kerr <jk@codeconstruct.com.au>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    99ce45d5
af_mctp.c 10.9 KB