mpls: always set type RTN_UNICAST and scope RT_SCOPE_UNIVERSE for
This patch fixes incorrect -EINVAL errors due to invalid scope and type during mpls route deletes. $ip -f mpls route add 100 as 200 via inet 10.1.1.2 dev swp1 $ip -f mpls route show 100 as to 200 via inet 10.1.1.2 dev swp1 $ip -f mpls route del 100 as 200 via inet 10.1.1.2 dev swp1 RTNETLINK answers: Invalid argument $ip -f mpls route del 100 RTNETLINK answers: Invalid argument After patch: $ip -f mpls route show 100 as to 200 via inet 10.1.1.2 dev swp1 $ip -f mpls route del 100 as 200 via inet 10.1.1.2 dev swp1 $ip -f mpls route show Always set type to RTN_UNICAST for mpls route add/deletes. Also to keep things consistent with kernel set scope to RT_SCOPE_UNIVERSE for both mpls and ipv6 routes. Both mpls and ipv6 route deletes ignore scope. Suggested-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: Vivek Venkataraman <vivek@cumulusnetworks.com> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Showing
Please register or sign in to comment