OSDN Git Service

ipv4: mpls: fix mpls_xmit for iptunnel
authorAlexey Kodanev <alexey.kodanev@oracle.com>
Fri, 23 Aug 2019 17:51:43 +0000 (20:51 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 25 Aug 2019 21:34:08 +0000 (14:34 -0700)
commit803f3e22ae10003a83c781498c0ac34cfe3463ff
tree724d97a07ccd049bbbab364d16fef737a5f17e83
parent9b5f684182403f2b338f797c44eca0061c797dc8
ipv4: mpls: fix mpls_xmit for iptunnel

When using mpls over gre/gre6 setup, rt->rt_gw4 address is not set, the
same for rt->rt_gw_family.  Therefore, when rt->rt_gw_family is checked
in mpls_xmit(), neigh_xmit() call is skipped. As a result, such setup
doesn't work anymore.

This issue was found with LTP mpls03 tests.

Fixes: 1550c171935d ("ipv4: Prepare rtable for IPv6 gateway")
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mpls/mpls_iptunnel.c