diff options
Diffstat (limited to 'net/sched/em_meta.c')
-rw-r--r-- | net/sched/em_meta.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index a1e5619b1876..9c2ec1992a2a 100644 --- a/net/sched/em_meta.c +++ b/net/sched/em_meta.c | |||
@@ -65,6 +65,7 @@ | |||
65 | #include <linux/string.h> | 65 | #include <linux/string.h> |
66 | #include <linux/skbuff.h> | 66 | #include <linux/skbuff.h> |
67 | #include <linux/random.h> | 67 | #include <linux/random.h> |
68 | #include <linux/if_vlan.h> | ||
68 | #include <linux/tc_ematch/tc_em_meta.h> | 69 | #include <linux/tc_ematch/tc_em_meta.h> |
69 | #include <net/dst.h> | 70 | #include <net/dst.h> |
70 | #include <net/route.h> | 71 | #include <net/route.h> |
@@ -170,6 +171,21 @@ META_COLLECTOR(var_dev) | |||
170 | } | 171 | } |
171 | 172 | ||
172 | /************************************************************************** | 173 | /************************************************************************** |
174 | * vlan tag | ||
175 | **************************************************************************/ | ||
176 | |||
177 | META_COLLECTOR(int_vlan_tag) | ||
178 | { | ||
179 | unsigned short tag; | ||
180 | if (vlan_get_tag(skb, &tag) < 0) | ||
181 | *err = -1; | ||
182 | else | ||
183 | dst->value = tag; | ||
184 | } | ||
185 | |||
186 | |||
187 | |||
188 | /************************************************************************** | ||
173 | * skb attributes | 189 | * skb attributes |
174 | **************************************************************************/ | 190 | **************************************************************************/ |
175 | 191 | ||
@@ -520,6 +536,7 @@ static struct meta_ops __meta_ops[TCF_META_TYPE_MAX+1][TCF_META_ID_MAX+1] = { | |||
520 | [META_ID(SK_SNDTIMEO)] = META_FUNC(int_sk_sndtimeo), | 536 | [META_ID(SK_SNDTIMEO)] = META_FUNC(int_sk_sndtimeo), |
521 | [META_ID(SK_SENDMSG_OFF)] = META_FUNC(int_sk_sendmsg_off), | 537 | [META_ID(SK_SENDMSG_OFF)] = META_FUNC(int_sk_sendmsg_off), |
522 | [META_ID(SK_WRITE_PENDING)] = META_FUNC(int_sk_write_pend), | 538 | [META_ID(SK_WRITE_PENDING)] = META_FUNC(int_sk_write_pend), |
539 | [META_ID(VLAN_TAG)] = META_FUNC(int_vlan_tag), | ||
523 | } | 540 | } |
524 | }; | 541 | }; |
525 | 542 | ||