net sched actions: aggregate dumping of actions timeinfo
[deliverable/linux.git] / net / sched / act_nat.c
index c0a879f940de1b8d7477936a50bb6beee91176aa..06ccb03f25da5a92c3c1ad8105fa55111eb92a8d 100644 (file)
@@ -103,7 +103,7 @@ static int tcf_nat(struct sk_buff *skb, const struct tc_action *a,
 
        spin_lock(&p->tcf_lock);
 
-       p->tcf_tm.lastuse = jiffies;
+       tcf_lastuse_update(&p->tcf_tm);
        old_addr = p->old_addr;
        new_addr = p->new_addr;
        mask = p->mask;
@@ -264,9 +264,8 @@ static int tcf_nat_dump(struct sk_buff *skb, struct tc_action *a,
 
        if (nla_put(skb, TCA_NAT_PARMS, sizeof(opt), &opt))
                goto nla_put_failure;
-       t.install = jiffies_to_clock_t(jiffies - p->tcf_tm.install);
-       t.lastuse = jiffies_to_clock_t(jiffies - p->tcf_tm.lastuse);
-       t.expires = jiffies_to_clock_t(p->tcf_tm.expires);
+
+       tcf_tm_dump(&t, &p->tcf_tm);
        if (nla_put_64bit(skb, TCA_NAT_TM, sizeof(t), &t, TCA_NAT_PAD))
                goto nla_put_failure;
 
This page took 0.025983 seconds and 5 git commands to generate.