LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] Fix for Bug in ipvsadm-1.26 : Invalid operation. Possibl

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [lvs-users] Fix for Bug in ipvsadm-1.26 : Invalid operation. Possibly wrong module version, address not unicast, ...
From: Dev Ankzz <ankzzdev@xxxxxxxxx>
Date: Mon, 6 May 2013 15:57:41 +0530
Hi All,

I got a similar issue with no final resolution.

http://archive.linuxvirtualserver.org/html/lvs-users/2010-01/msg00049.html

I can't respond to the given mail-thread as its an old one and I am
new joiner.

No one is replying as yet to my mail; so thought like updating same.




On Fri, May 3, 2013 at 4:28 PM, Dev Ankzz <ankzzdev@xxxxxxxxx> wrote:

> Hi All,
>
> ipvsadm-1.26 reports error as "*Invalid operation.  Possibly wrong module
> version, address not unicast, ...*" for a valid request with option "-ln
> -t".
>
> *Ex*:
> # ipvsadm -ln -t a.b.c.d:http
> Invalid operation.  Possibly wrong module version, address not unicast, ...
>
>
> *Bug details*:
>
> # ipvsadm -l
> IP Virtual Server version 1.2.1 (size=131072)
> Prot LocalAddress:Port Scheduler Flags
>   -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
> TCP  a.b.c.d:http wrr
>   -> w.x.y.z:http          Masq    100    0          0
>
> # ipvsadm -ln -t a.b.c.d:http
> Invalid operation.  Possibly wrong module version, address not unicast, ...
>
> # which gcc
> /usr/bin/gcc
> # gcc --version
> gcc (GCC) 4.1.1
> Copyright (C) 2006 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> #
>
> *RCA:*
>
> In lipipvs.c tsvc variable was not getting initialized. Field members were
> set to junk values. ipvs_nl_fill_service_attr was used to create message
> using these junk values too. leading to this issue.
>
> *Fix:*
> Initializing the structure variable to 0 solves the issue.
>
> *Diff for the fix:*
>
> diff -urNp ipvsadm-1.26/libipvs/libipvs.c ipvsadm-1.26_lb/libipvs/libipvs.c
> --- ipvsadm-1.26/libipvs/libipvs.c 2011-02-06 18:38:57.000000000 -0800
> +++ ipvsadm-1.26_lb/libipvs/libipvs.c 2013-05-03 02:57:08.000000000 -0700
> @@ -921,6 +921,7 @@ ipvs_get_service(__u32 fwmark, __u16 af,
>   struct ip_vs_get_services *get;
>   struct nl_msg *msg;
>   ipvs_service_t tsvc;
> +                memset(&tsvc, 0, sizeof(ipvs_service_t));
>   tsvc.fwmark = fwmark;
>   tsvc.af = af;
>   tsvc.protocol= protocol;
>
>
>
> *Note : *Works fine with gcc-4.3.2. It initializes uninitialized data
> structure members. So issue is not seen here.
>
> -------------------------------------------------
>
> I am new to this mailing-list but wanted to contribute. If I am posting at
> the wrong place, my sincere apologies. Would request to guide me to correct
> link or mailing list.
>
> Thanks and Regards,
> Ankit
>
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

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