summaryrefslogtreecommitdiffstats
path: root/net/mpls/af_mpls.c
diff options
context:
space:
mode:
authorRobert Shearman <rshearma@brocade.com>2015-10-27 00:37:35 +0000
committerDavid S. Miller <davem@davemloft.net>2015-10-27 19:52:58 -0700
commitb4e04fc7357b6cef0856cb14b42306af1af990e5 (patch)
tree1705e2307ee53c1a25ffc2fe5006163fe80b66d6 /net/mpls/af_mpls.c
parentc0f9c7e45d374ce6dc369443fa586c2fe228c345 (diff)
downloadop-kernel-dev-b4e04fc7357b6cef0856cb14b42306af1af990e5.zip
op-kernel-dev-b4e04fc7357b6cef0856cb14b42306af1af990e5.tar.gz
mpls: fix forwarding using v4/v6 explicit null
Fill in the via address length for the predefined IPv4 and IPv6 explicit-null label routes. Fixes: f8efb73c97e2 ("mpls: multipath route support") Signed-off-by: Robert Shearman <rshearma@brocade.com> Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mpls/af_mpls.c')
-rw-r--r--net/mpls/af_mpls.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
index cc972e3..1c58662 100644
--- a/net/mpls/af_mpls.c
+++ b/net/mpls/af_mpls.c
@@ -1345,6 +1345,7 @@ static int resize_platform_label_table(struct net *net, size_t limit)
rt0->rt_protocol = RTPROT_KERNEL;
rt0->rt_payload_type = MPT_IPV4;
rt0->rt_nh->nh_via_table = NEIGH_LINK_TABLE;
+ rt0->rt_nh->nh_via_alen = lo->addr_len;
memcpy(rt0->rt_nh->nh_via, lo->dev_addr, lo->addr_len);
}
if (limit > MPLS_LABEL_IPV6NULL) {
@@ -1356,6 +1357,7 @@ static int resize_platform_label_table(struct net *net, size_t limit)
rt2->rt_protocol = RTPROT_KERNEL;
rt2->rt_payload_type = MPT_IPV6;
rt2->rt_nh->nh_via_table = NEIGH_LINK_TABLE;
+ rt2->rt_nh->nh_via_alen = lo->addr_len;
memcpy(rt2->rt_nh->nh_via, lo->dev_addr, lo->addr_len);
}
OpenPOWER on IntegriCloud