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@LinuxVirtualServer.org Send requests to lvs-users-requ...@linuxvirtualserver.org or go to http://lists.graemef.net/mailman/listinfo/lvs-users