]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/net/route.h
[IPV4]: Make ip_tos2prio const.
[net-next-2.6.git] / include / net / route.h
index 486e37aff06ca28751e2a4a1cbf645b52cd3ebee..f7ce6259f86fb50754df9e1ee27744744ffad1f8 100644 (file)
@@ -53,14 +53,15 @@ struct rtable
        union
        {
                struct dst_entry        dst;
-               struct rtable           *rt_next;
        } u;
 
+       /* Cache lookup keys */
+       struct flowi            fl;
+
        struct in_device        *idev;
        
        unsigned                rt_flags;
        __u16                   rt_type;
-       __u16                   rt_multipath_alg;
 
        __be32                  rt_dst; /* Path destination     */
        __be32                  rt_src; /* Path source          */
@@ -69,9 +70,6 @@ struct rtable
        /* Info on neighbour */
        __be32                  rt_gateway;
 
-       /* Cache lookup keys */
-       struct flowi            fl;
-
        /* Miscellaneous cached information */
        __be32                  rt_spec_dst; /* RFC1122 specific destination */
        struct inet_peer        *peer; /* long-living peer info */
@@ -137,7 +135,7 @@ static inline void ip_rt_put(struct rtable * rt)
 
 #define IPTOS_RT_MASK  (IPTOS_TOS_MASK & ~3)
 
-extern __u8 ip_tos2prio[16];
+extern const __u8 ip_tos2prio[16];
 
 static inline char rt_tos2priority(u8 tos)
 {
@@ -146,7 +144,8 @@ static inline char rt_tos2priority(u8 tos)
 
 static inline int ip_route_connect(struct rtable **rp, __be32 dst,
                                   __be32 src, u32 tos, int oif, u8 protocol,
-                                  __be16 sport, __be16 dport, struct sock *sk)
+                                  __be16 sport, __be16 dport, struct sock *sk,
+                                  int flags)
 {
        struct flowi fl = { .oif = oif,
                            .nl_u = { .ip4_u = { .daddr = dst,
@@ -168,7 +167,7 @@ static inline int ip_route_connect(struct rtable **rp, __be32 dst,
                *rp = NULL;
        }
        security_sk_classify_flow(sk, &fl);
-       return ip_route_output_flow(rp, &fl, sk, 0);
+       return ip_route_output_flow(rp, &fl, sk, flags);
 }
 
 static inline int ip_route_newports(struct rtable **rp, u8 protocol,