]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - include/net/pkt_cls.h
net: core: limit nested device depth
[mirror_ubuntu-bionic-kernel.git] / include / net / pkt_cls.h
index 8e08b6da72f325bd4a623191e886fb1b746644d7..d076a0b7af8f77402d99f45924b103111ddbdd4b 100644 (file)
@@ -32,7 +32,7 @@ struct tcf_block_ext_info {
 };
 
 struct tcf_block_cb;
-bool tcf_queue_work(struct work_struct *work);
+bool tcf_queue_work(struct rcu_work *rwork, work_func_t func);
 
 #ifdef CONFIG_NET_CLS
 struct tcf_chain *tcf_chain_get(struct tcf_block *block, u32 chain_index,
@@ -240,12 +240,13 @@ struct tcf_exts {
        int police;
 };
 
-static inline int tcf_exts_init(struct tcf_exts *exts, int action, int police)
+static inline int tcf_exts_init(struct tcf_exts *exts, struct net *net,
+                               int action, int police)
 {
 #ifdef CONFIG_NET_CLS_ACT
        exts->type = 0;
        exts->nr_actions = 0;
-       exts->net = NULL;
+       exts->net = net;
        exts->actions = kcalloc(TCA_ACT_MAX_PRIO, sizeof(struct tc_action *),
                                GFP_KERNEL);
        if (!exts->actions)
@@ -522,7 +523,7 @@ static inline unsigned char * tcf_get_base_ptr(struct sk_buff *skb, int layer)
 {
        switch (layer) {
                case TCF_LAYER_LINK:
-                       return skb->data;
+                       return skb_mac_header(skb);
                case TCF_LAYER_NETWORK:
                        return skb_network_header(skb);
                case TCF_LAYER_TRANSPORT: