Commit 9f42c3ff authored by David S. Miller's avatar David S. Miller

Merge nuts.ninka.net:/disk1/davem/BK/network-2.5

into nuts.ninka.net:/disk1/davem/BK/net-2.5
parents 685423fd 967a4ea0
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <asm/div64.h> #include <asm/div64.h>
#include <asm/types.h> #include <asm/types.h>
#include <asm/param.h>
#if (HZ % USER_HZ)==0 #if (HZ % USER_HZ)==0
# define jiffies_to_clock_t(x) ((x) / (HZ / USER_HZ)) # define jiffies_to_clock_t(x) ((x) / (HZ / USER_HZ))
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
#include <net/sock.h> #include <net/sock.h>
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("David S. Miller <davem@redhat.com>"); MODULE_AUTHOR("Bart De Schuymer <bdschuym@pandora.be>");
MODULE_DESCRIPTION("arptables mangle table"); MODULE_DESCRIPTION("arptables arp payload mangle target");
static unsigned int static unsigned int
target(struct sk_buff **pskb, unsigned int hooknum, const struct net_device *in, target(struct sk_buff **pskb, unsigned int hooknum, const struct net_device *in,
......
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
#include <linux/random.h> #include <linux/random.h>
#include <linux/jhash.h> #include <linux/jhash.h>
#include <linux/rcupdate.h> #include <linux/rcupdate.h>
#include <linux/times.h>
#include <net/protocol.h> #include <net/protocol.h>
#include <net/ip.h> #include <net/ip.h>
#include <net/route.h> #include <net/route.h>
...@@ -2309,7 +2310,7 @@ static int rt_fill_info(struct sk_buff *skb, u32 pid, u32 seq, int event, ...@@ -2309,7 +2310,7 @@ static int rt_fill_info(struct sk_buff *skb, u32 pid, u32 seq, int event,
ci.rta_used = rt->u.dst.__use; ci.rta_used = rt->u.dst.__use;
ci.rta_clntref = atomic_read(&rt->u.dst.__refcnt); ci.rta_clntref = atomic_read(&rt->u.dst.__refcnt);
if (rt->u.dst.expires) if (rt->u.dst.expires)
ci.rta_expires = rt->u.dst.expires - jiffies; ci.rta_expires = jiffies_to_clock_t(rt->u.dst.expires - jiffies);
else else
ci.rta_expires = 0; ci.rta_expires = 0;
ci.rta_error = rt->u.dst.error; ci.rta_error = rt->u.dst.error;
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/times.h>
#include <linux/socket.h> #include <linux/socket.h>
#include <linux/sockios.h> #include <linux/sockios.h>
#include <linux/net.h> #include <linux/net.h>
...@@ -717,7 +718,7 @@ int ip6_route_add(struct in6_rtmsg *rtmsg, struct nlmsghdr *nlh, void *_rtattr) ...@@ -717,7 +718,7 @@ int ip6_route_add(struct in6_rtmsg *rtmsg, struct nlmsghdr *nlh, void *_rtattr)
return -ENOMEM; return -ENOMEM;
rt->u.dst.obsolete = -1; rt->u.dst.obsolete = -1;
rt->rt6i_expires = rtmsg->rtmsg_info; rt->rt6i_expires = clock_t_to_jiffies(rtmsg->rtmsg_info);
if (nlh && (r = NLMSG_DATA(nlh))) { if (nlh && (r = NLMSG_DATA(nlh))) {
rt->rt6i_protocol = r->rtm_protocol; rt->rt6i_protocol = r->rtm_protocol;
} else { } else {
...@@ -1535,7 +1536,7 @@ static int rt6_fill_node(struct sk_buff *skb, struct rt6_info *rt, ...@@ -1535,7 +1536,7 @@ static int rt6_fill_node(struct sk_buff *skb, struct rt6_info *rt,
RTA_PUT(skb, RTA_PRIORITY, 4, &rt->rt6i_metric); RTA_PUT(skb, RTA_PRIORITY, 4, &rt->rt6i_metric);
ci.rta_lastuse = jiffies - rt->u.dst.lastuse; ci.rta_lastuse = jiffies - rt->u.dst.lastuse;
if (rt->rt6i_expires) if (rt->rt6i_expires)
ci.rta_expires = rt->rt6i_expires - jiffies; ci.rta_expires = jiffies_to_clock_t(rt->rt6i_expires - jiffies);
else else
ci.rta_expires = 0; ci.rta_expires = 0;
ci.rta_used = rt->u.dst.__use; ci.rta_used = rt->u.dst.__use;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment