]> Pileus Git - ~andy/linux/blobdiff - include/net/route.h
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
[~andy/linux] / include / net / route.h
index b8c1f7703fc6d7695ed0eba73552ffd349e7b484..93e10c453f6b8a08cc12dd3a70cb86d6473a4b19 100644 (file)
@@ -114,7 +114,7 @@ extern int          ip_rt_init(void);
 extern void            ip_rt_redirect(__be32 old_gw, __be32 dst, __be32 new_gw,
                                       __be32 src, struct net_device *dev);
 extern void            rt_cache_flush(struct net *net, int how);
-extern void            rt_cache_flush_batch(void);
+extern void            rt_cache_flush_batch(struct net *net);
 extern int             __ip_route_output_key(struct net *, struct rtable **, const struct flowi *flp);
 extern int             ip_route_output_key(struct net *, struct rtable **, struct flowi *flp);
 extern int             ip_route_output_flow(struct net *, struct rtable **rp, struct flowi *flp, struct sock *sk, int flags);
@@ -231,4 +231,15 @@ static inline int inet_iif(const struct sk_buff *skb)
        return skb_rtable(skb)->rt_iif;
 }
 
+extern int sysctl_ip_default_ttl;
+
+static inline int ip4_dst_hoplimit(const struct dst_entry *dst)
+{
+       int hoplimit = dst_metric_raw(dst, RTAX_HOPLIMIT);
+
+       if (hoplimit == 0)
+               hoplimit = sysctl_ip_default_ttl;
+       return hoplimit;
+}
+
 #endif /* _ROUTE_H */