LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

Re: [bug] FWMARKs and persistence in IPVS: The Use of Unions

To: Simon Horman <horms@xxxxxxxxxxxx>
Subject: Re: [bug] FWMARKs and persistence in IPVS: The Use of Unions
Cc: netfilter-devel <netfilter-devel@xxxxxxxxxxxxxxx>, lvs-devel@xxxxxxxxxxxxxxx, Fabien Duchêne <fabien.duchene@xxxxxxxxxxxxxxxxxxxx>, Joseph Mack NA3T <jmack@xxxxxxxx>, Julius Volz <julius.volz@xxxxxxxxx>
From: Jan Engelhardt <jengelh@xxxxxxxxxx>
Date: Tue, 28 Apr 2009 11:07:40 +0200 (CEST)
On Tuesday 2009-04-28 10:15, Simon Horman wrote:
>
>It seems to me that it should be easy enough to fix by changing
>fwmark in ip_vs_sched_persist() from:
>
>union nf_inet_addr fwmark = {
>       .all = { 0, 0, 0, htonl(svc->fwmark) }
>};
>
>to:
>
>union nf_inet_addr fwmark = {
>       .all = { htonl(svc->fwmark), 0, 0, 0 }
>};
>
>Assuming that this would result in fwmark->ip being set to
>htonl(svc->fwmark), which is relevant if svc->af is AF_INET - that is,
>for IPv4.[...]
>An alternate idea would be to change the af value used for fwmarks,
>but this seems to be even less clean than the current (slightly broken)
>technique of using nf_inet_addr for IPv4 or IPv6 addresses, or fwmarks.

If you use ->all, then using NFPROTO_UNSPEC as af
seems to me like a good match.
--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

<Prev in Thread] Current Thread [Next in Thread>