cls_api.c (de179c8c12e9e5a292269fa59e7c26ca797dc7bf) cls_api.c (573ce260b385a4d14a1ef046558fad9f1daeee42)
1/*
2 * net/sched/cls_api.c Packet classifier API.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *

--- 8 unchanged lines hidden (view full) ---

17#include <linux/module.h>
18#include <linux/types.h>
19#include <linux/kernel.h>
20#include <linux/string.h>
21#include <linux/errno.h>
22#include <linux/skbuff.h>
23#include <linux/init.h>
24#include <linux/kmod.h>
1/*
2 * net/sched/cls_api.c Packet classifier API.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *

--- 8 unchanged lines hidden (view full) ---

17#include <linux/module.h>
18#include <linux/types.h>
19#include <linux/kernel.h>
20#include <linux/string.h>
21#include <linux/errno.h>
22#include <linux/skbuff.h>
23#include <linux/init.h>
24#include <linux/kmod.h>
25#include <linux/netlink.h>
25#include <net/netlink.h>
26#include <linux/err.h>
27#include <linux/slab.h>
28#include <net/net_namespace.h>
29#include <net/sock.h>
30#include <net/netlink.h>
31#include <net/pkt_sched.h>
32#include <net/pkt_cls.h>
33

--- 389 unchanged lines hidden (view full) ---

423 struct net_device *dev;
424 struct Qdisc *q;
425 struct tcf_proto *tp, **chain;
426 struct tcmsg *tcm = nlmsg_data(cb->nlh);
427 unsigned long cl = 0;
428 const struct Qdisc_class_ops *cops;
429 struct tcf_dump_args arg;
430
26#include <linux/err.h>
27#include <linux/slab.h>
28#include <net/net_namespace.h>
29#include <net/sock.h>
30#include <net/netlink.h>
31#include <net/pkt_sched.h>
32#include <net/pkt_cls.h>
33

--- 389 unchanged lines hidden (view full) ---

423 struct net_device *dev;
424 struct Qdisc *q;
425 struct tcf_proto *tp, **chain;
426 struct tcmsg *tcm = nlmsg_data(cb->nlh);
427 unsigned long cl = 0;
428 const struct Qdisc_class_ops *cops;
429 struct tcf_dump_args arg;
430
431 if (cb->nlh->nlmsg_len < NLMSG_LENGTH(sizeof(*tcm)))
431 if (nlmsg_len(cb->nlh) < sizeof(*tcm))
432 return skb->len;
433 dev = __dev_get_by_index(net, tcm->tcm_ifindex);
434 if (!dev)
435 return skb->len;
436
437 if (!tcm->tcm_parent)
438 q = dev->qdisc;
439 else

--- 189 unchanged lines hidden ---
432 return skb->len;
433 dev = __dev_get_by_index(net, tcm->tcm_ifindex);
434 if (!dev)
435 return skb->len;
436
437 if (!tcm->tcm_parent)
438 q = dev->qdisc;
439 else

--- 189 unchanged lines hidden ---