[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADvbK_fxww6-EfDgdo-4e=UscsB_pvJO4z1NAPiFyujiA5xr0Q@mail.gmail.com>
Date: Mon, 14 Dec 2015 19:48:01 +0800
From: Xin Long <lucien.xin@...il.com>
To: David Miller <davem@...emloft.net>
Cc: network dev <netdev@...r.kernel.org>,
Hannes Frederic Sowa <hannes@...essinduktion.org>
Subject: Re: [PATCHv2 net-next] ipv6: allow routes to be configured with
expire values
>
> This is the wrong way to do this.
>
> Currently we only ever dump rta_cacheinfo values to the user.
>
> If we use it to set things, we have to completely consider every
> member of that structure as potentially having meaning either
> intended by the user or choosen by us in the future.
>
> Therefore it is a poor choice to start using for specifying the
> expires value, and some other mechanism such as a new RTNETLINK
> attribute, should be used for this.
we did it like this to avoid adding the new RTNETLINK attribute.
now I got your meaning, and rta_cacheinfo seems to be designed
for dumping info, not for seting info. i guess you hope we do it like:
+ if (tb[RTA_EXPIRES]) {
+ unsigned long timeout =
addrconf_timeout_fixup(nla_get_u32(tb[RTA_EXPIRES]), HZ);
+
+ if (addrconf_finite_timeout(timeout)) {
+ cfg->fc_expires = jiffies_to_clock_t(timeout * HZ);
+ cfg->fc_flags |= RTF_EXPIRES;
+ }
+ }
hi Hannes, we seem to go back here again, what do you think ?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists