diff options
author | Patrick McHardy <kaber@trash.net> | 2008-01-22 22:11:17 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 15:11:10 -0800 |
commit | 1e90474c377e92db7262a8968a45c1dd980ca9e5 (patch) | |
tree | 645af56dcb17cf1a76fd3b7f1a8b833a3fffc3d7 /net/netfilter/xt_RATEEST.c | |
parent | 01480e1cf5e2118eba8a8968239f3242072f9563 (diff) |
[NET_SCHED]: Convert packet schedulers from rtnetlink to new netlink API
Convert packet schedulers to use the netlink API. Unfortunately a gradual
conversion is not possible without breaking compilation in the middle or
adding lots of casts, so this patch converts them all in one step. The
patch has been mostly generated automatically with some minor edits to
at least allow seperate conversion of classifiers and actions.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter/xt_RATEEST.c')
-rw-r--r-- | net/netfilter/xt_RATEEST.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/netfilter/xt_RATEEST.c b/net/netfilter/xt_RATEEST.c index c5ba525dc32f..24c73ba31eaa 100644 --- a/net/netfilter/xt_RATEEST.c +++ b/net/netfilter/xt_RATEEST.c @@ -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; |