• Guillaume Nault's avatar
    raw: Stop using RTO_ONLINK. · c85be08f
    Guillaume Nault authored
    
    
    Use ip_sendmsg_scope() to properly initialise the scope in
    flowi4_init_output(), instead of overriding tos with the RTO_ONLINK
    flag. The objective is to eventually remove RTO_ONLINK, which will
    allow converting .flowi4_tos to dscp_t.
    
    The MSG_DONTROUTE and SOCK_LOCALROUTE cases were already handled by
    raw_sendmsg() (SOCK_LOCALROUTE was handled by the RT_CONN_FLAGS*()
    macros called by get_rtconn_flags()). However, opt.is_strictroute
    wasn't taken into account. Therefore, a side effect of this patch is to
    now honour opt.is_strictroute, and thus align raw_sendmsg() with
    ping_v4_sendmsg() and udp_sendmsg().
    
    Since raw_sendmsg() was the only user of get_rtconn_flags(), we can now
    remove this function.
    Signed-off-by: default avatarGuillaume Nault <gnault@redhat.com>
    Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c85be08f
ip.h 22.5 KB