aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorHong zhi guo <honkiko@gmail.com>2013-03-27 02:47:04 -0400
committerDavid S. Miller <davem@davemloft.net>2013-03-28 14:25:25 -0400
commit573ce260b385a4d14a1ef046558fad9f1daeee42 (patch)
treeb577de870934c583a66514b1206964fbd262c340 /net/sched
parente5c5d22e8dcf7c2d430336cbf8e180bd38e8daf1 (diff)
net-next: replace obsolete NLMSG_* with type safe nlmsg_*
Signed-off-by: Hong Zhiguo <honkiko@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/cls_api.c4
-rw-r--r--net/sched/sch_api.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 9d71d4ded53b..5c81b2603239 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -22,7 +22,7 @@
22#include <linux/skbuff.h> 22#include <linux/skbuff.h>
23#include <linux/init.h> 23#include <linux/init.h>
24#include <linux/kmod.h> 24#include <linux/kmod.h>
25#include <linux/netlink.h> 25#include <net/netlink.h>
26#include <linux/err.h> 26#include <linux/err.h>
27#include <linux/slab.h> 27#include <linux/slab.h>
28#include <net/net_namespace.h> 28#include <net/net_namespace.h>
@@ -428,7 +428,7 @@ static int tc_dump_tfilter(struct sk_buff *skb, struct netlink_callback *cb)
428 const struct Qdisc_class_ops *cops; 428 const struct Qdisc_class_ops *cops;
429 struct tcf_dump_args arg; 429 struct tcf_dump_args arg;
430 430
431 if (cb->nlh->nlmsg_len < NLMSG_LENGTH(sizeof(*tcm))) 431 if (nlmsg_len(cb->nlh) < sizeof(*tcm))
432 return skb->len; 432 return skb->len;
433 dev = __dev_get_by_index(net, tcm->tcm_ifindex); 433 dev = __dev_get_by_index(net, tcm->tcm_ifindex);
434 if (!dev) 434 if (!dev)
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index d7468baf890e..2b935e7cfe7b 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -1642,7 +1642,7 @@ static int tc_dump_tclass(struct sk_buff *skb, struct netlink_callback *cb)
1642 struct net_device *dev; 1642 struct net_device *dev;
1643 int t, s_t; 1643 int t, s_t;
1644 1644
1645 if (cb->nlh->nlmsg_len < NLMSG_LENGTH(sizeof(*tcm))) 1645 if (nlmsg_len(cb->nlh) < sizeof(*tcm))
1646 return 0; 1646 return 0;
1647 dev = dev_get_by_index(net, tcm->tcm_ifindex); 1647 dev = dev_get_by_index(net, tcm->tcm_ifindex);
1648 if (!dev) 1648 if (!dev)