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_udp.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_udp.c')
-rw-r--r-- | net/ipv4/ipvs/ip_vs_proto_udp.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/ipv4/ipvs/ip_vs_proto_udp.c b/net/ipv4/ipvs/ip_vs_proto_udp.c index 8dfad5db8295..d208ed6eb9fc 100644 --- a/net/ipv4/ipvs/ip_vs_proto_udp.c +++ b/net/ipv4/ipvs/ip_vs_proto_udp.c @@ -80,16 +80,19 @@ udp_conn_schedule(struct sk_buff *skb, struct ip_vs_protocol *pp, { struct ip_vs_service *svc; struct udphdr _udph, *uh; + struct ip_vs_iphdr iph; - uh = skb_header_pointer(skb, ip_hdrlen(skb), - sizeof(_udph), &_udph); + ip_vs_fill_iphdr(AF_INET, skb_network_header(skb), &iph); + + uh = skb_header_pointer(skb, iph.len, sizeof(_udph), &_udph); if (uh == NULL) { *verdict = NF_DROP; return 0; } - if ((svc = ip_vs_service_get(skb->mark, ip_hdr(skb)->protocol, - ip_hdr(skb)->daddr, uh->dest))) { + svc = ip_vs_service_get(AF_INET, skb->mark, iph.protocol, + &iph.daddr, uh->dest); + if (svc) { if (ip_vs_todrop()) { /* * It seems that we are very loaded. |