net: filter: split 'struct sk_filter' into socket and bpf parts
[linux-block.git] / net / netfilter / xt_bpf.c
index bbffdbdaf6031bef784042c064dded271d6a406f..dffee9d47ec4b3333271ac0dd54a306cf9943e3b 100644 (file)
@@ -28,7 +28,7 @@ static int bpf_mt_check(const struct xt_mtchk_param *par)
        program.len = info->bpf_program_num_elem;
        program.filter = info->bpf_program;
 
-       if (sk_unattached_filter_create(&info->filter, &program)) {
+       if (bpf_prog_create(&info->filter, &program)) {
                pr_info("bpf: check failed: parse error\n");
                return -EINVAL;
        }
@@ -40,13 +40,13 @@ static bool bpf_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_bpf_info *info = par->matchinfo;
 
-       return SK_RUN_FILTER(info->filter, skb);
+       return BPF_PROG_RUN(info->filter, skb);
 }
 
 static void bpf_mt_destroy(const struct xt_mtdtor_param *par)
 {
        const struct xt_bpf_info *info = par->matchinfo;
-       sk_unattached_filter_destroy(info->filter);
+       bpf_prog_destroy(info->filter);
 }
 
 static struct xt_match bpf_mt_reg __read_mostly = {