• Xin Long's avatar
    sctp: add spp_ipv6_flowlabel and spp_dscp for sctp_paddrparams · 0b0dce7a
    Xin Long authored
    spp_ipv6_flowlabel and spp_dscp are added in sctp_paddrparams in
    this patch so that users could set sctp_sock/asoc/transport dscp
    and flowlabel with spp_flags SPP_IPV6_FLOWLABEL or SPP_DSCP by
    SCTP_PEER_ADDR_PARAMS , as described section 8.1.12 in RFC6458.
    
    As said in last patch, it uses '| 0x100000' or '|0x1' to mark
    flowlabel or dscp is set,  so that their values could be set
    to 0.
    
    Note that to guarantee that an old app built with old kernel
    headers could work on the newer kernel, the param's check in
    sctp_g/setsockopt_peer_addr_params() is also improved, which
    follows the way that sctp_g/setsockopt_delayed_ack() or some
    other sockopts' process that accept two types of params does.
    Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    0b0dce7a
socket.c 247 KB