diff options
author | Julius Volz <juliusv@google.com> | 2008-09-02 17:55:38 +0400 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2008-09-05 05:17:05 +0400 |
commit | 3c2e0505d25cdc9425336f167fd4ff5f505aecff (patch) | |
tree | 819711ebce94061695fa8c0edb91a9372553cc73 /net/ipv4/ipvs/ip_vs_proto_tcp.c | |
parent | b18610de9ec2728159f723a9b864ca78a5774193 (diff) | |
download | linux-3c2e0505d25cdc9425336f167fd4ff5f505aecff.tar.xz |
IPVS: Add v6 support to ip_vs_service_get()
Add support for selecting services based on their address family to
ip_vs_service_get() and adjust the callers.
Signed-off-by: Julius Volz <juliusv@google.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'net/ipv4/ipvs/ip_vs_proto_tcp.c')
-rw-r--r-- | net/ipv4/ipvs/ip_vs_proto_tcp.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/ipv4/ipvs/ip_vs_proto_tcp.c b/net/ipv4/ipvs/ip_vs_proto_tcp.c index 15860e1441b0..fe93c9e6ff63 100644 --- a/net/ipv4/ipvs/ip_vs_proto_tcp.c +++ b/net/ipv4/ipvs/ip_vs_proto_tcp.c @@ -74,16 +74,19 @@ tcp_conn_schedule(struct sk_buff *skb, { struct ip_vs_service *svc; struct tcphdr _tcph, *th; + struct ip_vs_iphdr iph; - th = skb_header_pointer(skb, ip_hdrlen(skb), sizeof(_tcph), &_tcph); + ip_vs_fill_iphdr(AF_INET, skb_network_header(skb), &iph); + + th = skb_header_pointer(skb, iph.len, sizeof(_tcph), &_tcph); if (th == NULL) { *verdict = NF_DROP; return 0; } if (th->syn && - (svc = ip_vs_service_get(skb->mark, ip_hdr(skb)->protocol, - ip_hdr(skb)->daddr, th->dest))) { + (svc = ip_vs_service_get(AF_INET, skb->mark, iph.protocol, + &iph.daddr, th->dest))) { if (ip_vs_todrop()) { /* * It seems that we are very loaded. |