Hi,
The code of ipvsadm option parsing & processing doesn't look good to me
for a long time. And, with the changes of ipvsadm for time being, some
options are not consistent now. I finally decided to resovle ambiguous
options and rewrite those not-nice code.
The changes of ipvsadm.c is as follows:
Rewrote most code of parsing options (either in popt version or in
getopt_long version) and processing options.
Resolved the duplicate short-name options. For example, the -R
option is used either for "ipvsadm -R" to restore ipvs rules, or
for "-R server-address" to specify real server address; and the -s
is used either for "ipvsadm -s tcp tcpfin udp" to set timeouts, or
for "-s scheduler" to specify scheduler. Now, the -R is to restore
ipvs rules only, and the -r is to specify server-address; the
--set is to set timeouts, and the -s is to specify schedulers.
Made the save/restore options work both in popt version and
getopt_long version.
Add some decriptions about starting/stopping sync daemon in
ipvsadm help.
Keep code neat and shorter (from 1735 lines to 1642)
Update ipvsadm man page for these option changes
You can download it at
http://linux-vs.org/software/kernel-2.4/ipvsadm-1.18-2.src.rpm
Note that it works with 0.9.2 or later.
As always, your testing, bugreports, fixes, comments and suggestions are
welcome.
Wensong
|