Skip to content

Commit

Permalink
mpls: fix forwarding using v4/v6 explicit null
Browse files Browse the repository at this point in the history
Fill in the via address length for the predefined IPv4 and IPv6
explicit-null label routes.

Fixes: f8efb73 ("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>
  • Loading branch information
rshearman authored and davem330 committed Oct 28, 2015
1 parent c0f9c7e commit b4e04fc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/mpls/af_mpls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
}

Expand Down

0 comments on commit b4e04fc

Please sign in to comment.