提交 5a9ab017 编写于 作者: R Robert Shearman 提交者: David S. Miller

mpls: Prevent use of implicit NULL label as outgoing label

The reserved implicit-NULL label isn't allowed to appear in the label
stack for packets, so make it an error for the control plane to
specify it as an outgoing label.
Suggested-by: N"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: NRobert Shearman <rshearma@brocade.com>
Reviewed-by: N"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 37bde799
......@@ -646,6 +646,15 @@ int nla_get_labels(const struct nlattr *nla,
if ((dec.bos != bos) || dec.ttl || dec.tc)
return -EINVAL;
switch (dec.label) {
case LABEL_IMPLICIT_NULL:
/* RFC3032: This is a label that an LSR may
* assign and distribute, but which never
* actually appears in the encapsulation.
*/
return -EINVAL;
}
label[i] = dec.label;
}
*labels = nla_labels;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册