diff options
author | Atis Elsts <atis@mikrotik.com> | 2009-10-07 16:55:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-07 16:55:57 -0400 |
commit | ffce908246c93b17304c313886d25cfa8aecd1d7 (patch) | |
tree | 8ffc95c5efa6602db4574357396454910a7efe36 | |
parent | 996ccf49005662ee7fee38a45be5cb27bf370b1d (diff) |
net: Add sk_mark route lookup support for IPv4 listening sockets
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>
-rw-r--r-- | net/ipv4/inet_connection_sock.c | 1 | ||||
-rw-r--r-- | net/ipv4/syncookies.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index 4351ca2cf0b8..9139e8f6fdb1 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c | |||
@@ -358,6 +358,7 @@ struct dst_entry *inet_csk_route_req(struct sock *sk, | |||
358 | const struct inet_request_sock *ireq = inet_rsk(req); | 358 | const struct inet_request_sock *ireq = inet_rsk(req); |
359 | struct ip_options *opt = inet_rsk(req)->opt; | 359 | struct ip_options *opt = inet_rsk(req)->opt; |
360 | struct flowi fl = { .oif = sk->sk_bound_dev_if, | 360 | struct flowi fl = { .oif = sk->sk_bound_dev_if, |
361 | .mark = sk->sk_mark, | ||
361 | .nl_u = { .ip4_u = | 362 | .nl_u = { .ip4_u = |
362 | { .daddr = ((opt && opt->srr) ? | 363 | { .daddr = ((opt && opt->srr) ? |
363 | opt->faddr : | 364 | opt->faddr : |
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c index a6e0e077ac33..5ec678ad70ef 100644 --- a/net/ipv4/syncookies.c +++ b/net/ipv4/syncookies.c | |||
@@ -333,7 +333,8 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb, | |||
333 | * no easy way to do this. | 333 | * no easy way to do this. |
334 | */ | 334 | */ |
335 | { | 335 | { |
336 | struct flowi fl = { .nl_u = { .ip4_u = | 336 | struct flowi fl = { .mark = sk->sk_mark, |
337 | .nl_u = { .ip4_u = | ||
337 | { .daddr = ((opt && opt->srr) ? | 338 | { .daddr = ((opt && opt->srr) ? |
338 | opt->faddr : | 339 | opt->faddr : |
339 | ireq->rmt_addr), | 340 | ireq->rmt_addr), |