[NET_SCHED]: Convert packet schedulers from rtnetlink to new netlink API
[deliverable/linux.git] / net / netfilter / xt_RATEEST.c
index c5ba525dc32f049df67db494b2076887d7d0e95f..24c73ba31eaad3d4edc71adc0644a77cce7b4593 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/rtnetlink.h>
 #include <linux/random.h>
 #include <net/gen_stats.h>
+#include <net/netlink.h>
 
 #include <linux/netfilter/x_tables.h>
 #include <linux/netfilter/xt_RATEEST.h>
@@ -98,7 +99,7 @@ xt_rateest_tg_checkentry(const char *tablename,
        struct xt_rateest_target_info *info = (void *)targinfo;
        struct xt_rateest *est;
        struct {
-               struct rtattr           opt;
+               struct nlattr           opt;
                struct gnet_estimator   est;
        } cfg;
 
@@ -128,8 +129,8 @@ xt_rateest_tg_checkentry(const char *tablename,
        est->params.interval    = info->interval;
        est->params.ewma_log    = info->ewma_log;
 
-       cfg.opt.rta_len         = RTA_LENGTH(sizeof(cfg.est));
-       cfg.opt.rta_type        = TCA_STATS_RATE_EST;
+       cfg.opt.nla_len         = nla_attr_size(sizeof(cfg.est));
+       cfg.opt.nla_type        = TCA_STATS_RATE_EST;
        cfg.est.interval        = info->interval;
        cfg.est.ewma_log        = info->ewma_log;
 
This page took 0.039187 seconds and 5 git commands to generate.