Skip to content

Commit

Permalink
IPVS: Backup, Adding Version 1 receive capability
Browse files Browse the repository at this point in the history
Functionality improvements
 * flags  changed from 16 to 32 bits
 * fwmark added (32 bits)
 * timeout in sec. added (32 bits)
 * pe data added (Variable length)
 * IPv6 capabilities (3x16 bytes for addr.)
 * Version and type in every conn msg.

ip_vs_process_message() now handles Version 1 messages
and will call ip_vs_process_message_v0() for version 0 messages.

ip_vs_proc_conn() is common for both version, and handles the update of
connection hash.

ip_vs_conn_fill_param_sync()    - Version 1 messages only
ip_vs_conn_fill_param_sync_v0() - Version 0 messages only

Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
  • Loading branch information
Hans Schillstrom authored and Simon Horman committed Nov 25, 2010
1 parent 2981bc9 commit fe5e7a1
Show file tree
Hide file tree
Showing 4 changed files with 440 additions and 123 deletions.
8 changes: 8 additions & 0 deletions include/linux/ip_vs.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@
#define IP_VS_CONN_F_TEMPLATE 0x1000 /* template, not connection */
#define IP_VS_CONN_F_ONE_PACKET 0x2000 /* forward only one packet */

#define IP_VS_CONN_F_BACKUP_MASK (IP_VS_CONN_F_FWD_MASK | \
IP_VS_CONN_F_NOOUTPUT | \
IP_VS_CONN_F_INACTIVE | \
IP_VS_CONN_F_SEQ_MASK | \
IP_VS_CONN_F_NO_CPORT | \
IP_VS_CONN_F_TEMPLATE \
)

/* Flags that are not sent to backup server start from bit 16 */
#define IP_VS_CONN_F_NFCT (1 << 16) /* use netfilter conntrack */

Expand Down
1 change: 1 addition & 0 deletions include/net/ip_vs.h
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,7 @@ void ip_vs_unbind_pe(struct ip_vs_service *svc);
int register_ip_vs_pe(struct ip_vs_pe *pe);
int unregister_ip_vs_pe(struct ip_vs_pe *pe);
struct ip_vs_pe *ip_vs_pe_getbyname(const char *name);
struct ip_vs_pe *__ip_vs_pe_getbyname(const char *pe_name);

static inline void ip_vs_pe_get(const struct ip_vs_pe *pe)
{
Expand Down
5 changes: 2 additions & 3 deletions net/netfilter/ipvs/ip_vs_pe.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ void ip_vs_unbind_pe(struct ip_vs_service *svc)
}

/* Get pe in the pe list by name */
static struct ip_vs_pe *
__ip_vs_pe_getbyname(const char *pe_name)
struct ip_vs_pe *__ip_vs_pe_getbyname(const char *pe_name)
{
struct ip_vs_pe *pe;

IP_VS_DBG(2, "%s(): pe_name \"%s\"\n", __func__,
IP_VS_DBG(10, "%s(): pe_name \"%s\"\n", __func__,
pe_name);

spin_lock_bh(&ip_vs_pe_lock);
Expand Down
Loading

0 comments on commit fe5e7a1

Please sign in to comment.