aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ip_vs.h
diff options
context:
space:
mode:
authorJulius Volz <juliusv@google.com>2008-09-02 09:55:33 -0400
committerSimon Horman <horms@verge.net.au>2008-09-04 21:17:03 -0400
commite7ade46a53055c19a01c8becbe7807f9075d6fee (patch)
tree8e75c543dbf015d0f1056941526e9671a1afc780 /include/net/ip_vs.h
parentfab0de02fb0da83b90cec7fce4294747d86d5c6f (diff)
IPVS: Change IPVS data structures to support IPv6 addresses
Introduce new 'af' fields into IPVS data structures for specifying an entry's address family. Convert IP addresses to be of type union nf_inet_addr. Signed-off-by: Julius Volz <juliusv@google.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'include/net/ip_vs.h')
-rw-r--r--include/net/ip_vs.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index a25ad243031d..d32825585500 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -21,6 +21,9 @@
21#include <linux/timer.h> 21#include <linux/timer.h>
22 22
23#include <net/checksum.h> 23#include <net/checksum.h>
24#include <linux/netfilter.h> /* for union nf_inet_addr */
25#include <linux/ipv6.h> /* for struct ipv6hdr */
26#include <net/ipv6.h> /* for ipv6_addr_copy */
24 27
25#ifdef CONFIG_IP_VS_DEBUG 28#ifdef CONFIG_IP_VS_DEBUG
26#include <linux/net.h> 29#include <linux/net.h>
@@ -259,9 +262,10 @@ struct ip_vs_conn {
259 struct list_head c_list; /* hashed list heads */ 262 struct list_head c_list; /* hashed list heads */
260 263
261 /* Protocol, addresses and port numbers */ 264 /* Protocol, addresses and port numbers */
262 __be32 caddr; /* client address */ 265 u16 af; /* address family */
263 __be32 vaddr; /* virtual address */ 266 union nf_inet_addr caddr; /* client address */
264 __be32 daddr; /* destination address */ 267 union nf_inet_addr vaddr; /* virtual address */
268 union nf_inet_addr daddr; /* destination address */
265 __be16 cport; 269 __be16 cport;
266 __be16 vport; 270 __be16 vport;
267 __be16 dport; 271 __be16 dport;
@@ -314,8 +318,9 @@ struct ip_vs_service {
314 atomic_t refcnt; /* reference counter */ 318 atomic_t refcnt; /* reference counter */
315 atomic_t usecnt; /* use counter */ 319 atomic_t usecnt; /* use counter */
316 320
321 u16 af; /* address family */
317 __u16 protocol; /* which protocol (TCP/UDP) */ 322 __u16 protocol; /* which protocol (TCP/UDP) */
318 __be32 addr; /* IP address for virtual service */ 323 union nf_inet_addr addr; /* IP address for virtual service */
319 __be16 port; /* port number for the service */ 324 __be16 port; /* port number for the service */
320 __u32 fwmark; /* firewall mark of the service */ 325 __u32 fwmark; /* firewall mark of the service */
321 unsigned flags; /* service status flags */ 326 unsigned flags; /* service status flags */
@@ -342,7 +347,8 @@ struct ip_vs_dest {
342 struct list_head n_list; /* for the dests in the service */ 347 struct list_head n_list; /* for the dests in the service */
343 struct list_head d_list; /* for table with all the dests */ 348 struct list_head d_list; /* for table with all the dests */
344 349
345 __be32 addr; /* IP address of the server */ 350 u16 af; /* address family */
351 union nf_inet_addr addr; /* IP address of the server */
346 __be16 port; /* port number of the server */ 352 __be16 port; /* port number of the server */
347 volatile unsigned flags; /* dest status flags */ 353 volatile unsigned flags; /* dest status flags */
348 atomic_t conn_flags; /* flags to copy to conn */ 354 atomic_t conn_flags; /* flags to copy to conn */
@@ -366,7 +372,7 @@ struct ip_vs_dest {
366 /* for virtual service */ 372 /* for virtual service */
367 struct ip_vs_service *svc; /* service it belongs to */ 373 struct ip_vs_service *svc; /* service it belongs to */
368 __u16 protocol; /* which protocol (TCP/UDP) */ 374 __u16 protocol; /* which protocol (TCP/UDP) */
369 __be32 vaddr; /* virtual IP address */ 375 union nf_inet_addr vaddr; /* virtual IP address */
370 __be16 vport; /* virtual port number */ 376 __be16 vport; /* virtual port number */
371 __u32 vfwmark; /* firewall mark of service */ 377 __u32 vfwmark; /* firewall mark of service */
372}; 378};