net: Add sk_mark route lookup support for IPv4 listening sockets
authorAtis Elsts <atis@mikrotik.com>
Wed, 7 Oct 2009 20:55:57 +0000 (13:55 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Oct 2009 20:55:57 +0000 (13:55 -0700)
Add support for route lookup using sk_mark on IPv4 listening sockets.

Signed-off-by: Atis Elsts <atis@mikrotik.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/inet_connection_sock.c
net/ipv4/syncookies.c

index 4351ca2cf0b8554eadd258295d44a93455f3e506..9139e8f6fdb129319963a9c9f753b9e38533d221 100644 (file)
@@ -358,6 +358,7 @@ struct dst_entry *inet_csk_route_req(struct sock *sk,
        const struct inet_request_sock *ireq = inet_rsk(req);
        struct ip_options *opt = inet_rsk(req)->opt;
        struct flowi fl = { .oif = sk->sk_bound_dev_if,
+                           .mark = sk->sk_mark,
                            .nl_u = { .ip4_u =
                                      { .daddr = ((opt && opt->srr) ?
                                                  opt->faddr :
index a6e0e077ac33481c9e19eb129a17f45a812929b0..5ec678ad70ef3bd96254a893ee95d478d413b537 100644 (file)
@@ -333,7 +333,8 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
         * no easy way to do this.
         */
        {
-               struct flowi fl = { .nl_u = { .ip4_u =
+               struct flowi fl = { .mark = sk->sk_mark,
+                                   .nl_u = { .ip4_u =
                                              { .daddr = ((opt && opt->srr) ?
                                                          opt->faddr :
                                                          ireq->rmt_addr),