lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 04 Oct 2010 22:46:24 +0900
From:	Simon Horman <>
Cc:	Jan Engelhardt <>,
	Stephen Hemminger <>,
	Wensong Zhang <>,
	Julian Anastasov <>, Patrick McHardy <>
Subject: [patch v5 00/12] IPVS: SIP Persistence Engine

This patch series adds load-balancing of UDP SIP based on Call-ID to
IPVS as well as a frame-work for extending IPVS to handle alternate
persistence requirements.


This is v5 of the patch series which fixes a typo introduced in v4.

v4 of the patch series which addressed the following concerns
raised by Julian Anastasov:
 - initialize compat structures to avoid crash in
   ip_vs_add_service for pe_name
 - fix ip_vs_conn_out_get_proto to properly check the
   ip_vs_conn_fill_param_proto result

These changes and changes from previous revisions of this patch series
are noted on a per-patch basis.

I have taken the liberty of including Acked-by: Julian Anastasov <>
although the ack was provided before the v4 and v5 above were discovered.


The approach that I have taken is what I call persistence engines.
The basic idea being that you can provide a module to LVS that alters
the way that it handles connection templates, which are at the core
of persistence. In particular, an additional key can be added, and
any of the normal IP address, port and protocol information can either
be used or ignored.

In the case of the SIP persistence engine, the only persistence engine, all
the keys used by the default persistence behaviour are used and the callid
is added as an extra key. I originally intended to ignore the cip, but this
can optionally be done by setting the persistence mask (-M) to
while allowing the flexibility of other mask values.

It is envisaged that the SIP persistence engine will be used in conjunction
with one-packet scheduling. I'm interested to hear if that doesn't fit your


A persistence engine is associated with a virtual service
(as are schedulers). I have added the --pe option to the
ivpsadm -A and -E commands to allow the persistence engine
of a virtual service to be added, changed, or deleted.

e.g. ipvsadm -A -u -p 60 -M -o --pe sip

There are no other configuration parameters at this time.


When a connection template is created, if its virtual service
has a persistence engine, then the persistence engine can add
an extra key to the connection template. For the SIP module this
is the callid. More generically, it is known as "pe data". And
both the name of the persistence engine, "pe name", and "pe data"
can be viewed in /proc/net/ip_vs_conn and by passing the
--persistent-conn option to ipvsadm -Lc.

# ipvsadm -Lcn --persistent-conn
UDP 00:38  UDP sip 193373839

Here we see a single persistence template (cport is 0), which has been
handled by the sip persistence engine. The pe data (callid) is 193373839.

In the case where the persistence engine can't match a packet for some
reason, the connection will fall back to the normal persistence handling.
This seems reasonable, as that if the packet ought to be dropped, iptables
could be used.

A limited amount of debugging information has been added which
can be enabled using a value of 9 or greater in


The kernel patches (12) are available in git as the pe-5 branch of

The ipvsadm patches (2) are available in git as the pe-5 branch of

There is no change to the ipvsadm patches since the v2 series
so I will not repost them.

To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists