aboutsummaryrefslogtreecommitdiffstats
path: root/net/mpls
diff options
context:
space:
mode:
authorTom Herbert <tom@herbertland.com>2015-05-07 11:08:51 -0400
committerDavid S. Miller <davem@davemloft.net>2015-05-09 22:29:50 -0400
commit78f5b899195019f71f7593c604d75ca61658eae3 (patch)
tree6b97c54521d46419b6ed35ac2e8fd6ebc3e9a76d /net/mpls
parent7c0004d3960a3ebffc68c372dfd98c09d1c680eb (diff)
mpls: Change reserved label names to be consistent with netbsd
Since these are now visible to userspace it is nice to be consistent with BSD (sys/netmpls/mpls.h in netBSD). Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mpls')
-rw-r--r--net/mpls/af_mpls.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
index b6eb7615960a..7b3f732269e4 100644
--- a/net/mpls/af_mpls.c
+++ b/net/mpls/af_mpls.c
@@ -647,7 +647,7 @@ int nla_get_labels(const struct nlattr *nla,
647 return -EINVAL; 647 return -EINVAL;
648 648
649 switch (dec.label) { 649 switch (dec.label) {
650 case MPLS_LABEL_IMPLICIT_NULL: 650 case MPLS_LABEL_IMPLNULL:
651 /* RFC3032: This is a label that an LSR may 651 /* RFC3032: This is a label that an LSR may
652 * assign and distribute, but which never 652 * assign and distribute, but which never
653 * actually appears in the encapsulation. 653 * actually appears in the encapsulation.
@@ -935,7 +935,7 @@ static int resize_platform_label_table(struct net *net, size_t limit)
935 } 935 }
936 936
937 /* In case the predefined labels need to be populated */ 937 /* In case the predefined labels need to be populated */
938 if (limit > MPLS_LABEL_IPV4_EXPLICIT_NULL) { 938 if (limit > MPLS_LABEL_IPV4NULL) {
939 struct net_device *lo = net->loopback_dev; 939 struct net_device *lo = net->loopback_dev;
940 rt0 = mpls_rt_alloc(lo->addr_len); 940 rt0 = mpls_rt_alloc(lo->addr_len);
941 if (!rt0) 941 if (!rt0)
@@ -945,7 +945,7 @@ static int resize_platform_label_table(struct net *net, size_t limit)
945 rt0->rt_via_table = NEIGH_LINK_TABLE; 945 rt0->rt_via_table = NEIGH_LINK_TABLE;
946 memcpy(rt0->rt_via, lo->dev_addr, lo->addr_len); 946 memcpy(rt0->rt_via, lo->dev_addr, lo->addr_len);
947 } 947 }
948 if (limit > MPLS_LABEL_IPV6_EXPLICIT_NULL) { 948 if (limit > MPLS_LABEL_IPV6NULL) {
949 struct net_device *lo = net->loopback_dev; 949 struct net_device *lo = net->loopback_dev;
950 rt2 = mpls_rt_alloc(lo->addr_len); 950 rt2 = mpls_rt_alloc(lo->addr_len);
951 if (!rt2) 951 if (!rt2)
@@ -973,15 +973,15 @@ static int resize_platform_label_table(struct net *net, size_t limit)
973 memcpy(labels, old, cp_size); 973 memcpy(labels, old, cp_size);
974 974
975 /* If needed set the predefined labels */ 975 /* If needed set the predefined labels */
976 if ((old_limit <= MPLS_LABEL_IPV6_EXPLICIT_NULL) && 976 if ((old_limit <= MPLS_LABEL_IPV6NULL) &&
977 (limit > MPLS_LABEL_IPV6_EXPLICIT_NULL)) { 977 (limit > MPLS_LABEL_IPV6NULL)) {
978 RCU_INIT_POINTER(labels[MPLS_LABEL_IPV6_EXPLICIT_NULL], rt2); 978 RCU_INIT_POINTER(labels[MPLS_LABEL_IPV6NULL], rt2);
979 rt2 = NULL; 979 rt2 = NULL;
980 } 980 }
981 981
982 if ((old_limit <= MPLS_LABEL_IPV4_EXPLICIT_NULL) && 982 if ((old_limit <= MPLS_LABEL_IPV4NULL) &&
983 (limit > MPLS_LABEL_IPV4_EXPLICIT_NULL)) { 983 (limit > MPLS_LABEL_IPV4NULL)) {
984 RCU_INIT_POINTER(labels[MPLS_LABEL_IPV4_EXPLICIT_NULL], rt0); 984 RCU_INIT_POINTER(labels[MPLS_LABEL_IPV4NULL], rt0);
985 rt0 = NULL; 985 rt0 = NULL;
986 } 986 }
987 987