LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

Re: [rfc 13/13] [RFC 13/13] IPVS: sip persistence engine

To: Simon Horman <horms@xxxxxxxxxxxx>
Subject: Re: [rfc 13/13] [RFC 13/13] IPVS: sip persistence engine
Cc: lvs-devel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, netfilter@xxxxxxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxx, Wensong Zhang <wensong@xxxxxxxxxxxx>, Patrick McHardy <kaber@xxxxxxxxx>
From: Julian Anastasov <ja@xxxxxx>
Date: Sat, 18 Sep 2010 18:09:28 +0300 (EEST)
        Hello,

On Thu, 5 Aug 2010, Simon Horman wrote:

> Add the SIP callid as a key for persistence.

...

> +static bool ip_vs_sip_ct_match(const struct ip_vs_conn_param *p,
> +                               struct ip_vs_conn *ct)
> +
> +{
> +     bool ret = 0;
> +
> +     if (ct->af == p->af &&
> +         ip_vs_addr_equal(p->af, p->caddr, &ct->caddr) &&
> +         /* protocol should only be IPPROTO_IP if
> +          * d_addr is a fwmark */
> +         ip_vs_addr_equal(p->protocol == IPPROTO_IP ? AF_UNSPEC : p->af,
> +                          p->vaddr, &ct->vaddr) &&
> +         ct->vport == p->vport &&
> +         ct->flags & IP_VS_CONN_F_TEMPLATE &&
> +         ct->protocol == p->protocol &&
> +         ct->pe_data && ct->pe_data_len == p->pe_data_len &&
> +         !strnicmp(ct->pe_data, p->pe_data, p->pe_data_len))

        According to RFC 3261 8.1.1.4 Call-ID,
"Call-IDs are case-sensitive and are simply compared byte-by-byte",
so may be memcmp should be used.

        Also, may be ip_vs_sip_fill_param uses GFP_KERNEL in wrong 
context.

Regards

--
Julian Anastasov <ja@xxxxxx>
--
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>