mpls: Per-device MPLS state

Add per-device MPLS state to supported interfaces. Use the presence of
this state in mpls_route_add to determine that this is a supported
interface.

Use the presence of mpls_dev to drop packets that arrived on an
unsupported interface - previously they were allowed through.

Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Robert Shearman <rshearma@brocade.com>
Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Robert Shearman 2015-04-22 11:14:37 +01:00 committed by David S. Miller
parent 909d9faae2
commit 03c57747a7
3 changed files with 55 additions and 2 deletions

View file

@ -22,6 +22,9 @@ struct mpls_entry_decoded {
u8 bos;
};
struct mpls_dev {
};
struct sk_buff;
static inline struct mpls_shim_hdr *mpls_hdr(const struct sk_buff *skb)