net/sched: act_pedit: Add size check for TCA_PEDIT_PARMS_EX
[platform/kernel/linux-starfive.git] / net / sched / em_ipt.c
index eecfe07..3650117 100644 (file)
@@ -199,7 +199,7 @@ static void em_ipt_destroy(struct tcf_ematch *em)
                im->match->destroy(&par);
        }
        module_put(im->match->me);
-       kfree((void *)im);
+       kfree(im);
 }
 
 static int em_ipt_match(struct sk_buff *skb, struct tcf_ematch *em,
@@ -212,7 +212,7 @@ static int em_ipt_match(struct sk_buff *skb, struct tcf_ematch *em,
        struct nf_hook_state state;
        int ret;
 
-       switch (tc_skb_protocol(skb)) {
+       switch (skb_protocol(skb, true)) {
        case htons(ETH_P_IP):
                if (!pskb_network_may_pull(skb, sizeof(struct iphdr)))
                        return 0;