Hmm, I tried the IPaddr that comes with heartbeat-0.4.9.1 (I'm currently
using 0.4.9)
I still can't get it to work with a /32.
>
Here are some samples:
./findif 216.163.120.4/24
eth0 netmask 255.255.255.0 broadcast 216.163.120.255
-- looks good
./findif 216.163.120.4/31
eth0 netmask 255.255.255.254 broadcast 216.163.120.5
-- looks good
./findif 216.163.120.4/32
eth0 netmask 255.255.255.0 broadcast 216.163.120.255
-- Huh????
Here is a patch to findif.c:
--- findif.c Mon Sep 30 23:18:08 2002
+++ findif2.c Mon Sep 30 23:19:51 2002
@@ -195,9 +195,8 @@
}
- if (netmask != BAD_NETMASK) {
- best_netmask = netmask;
- }else if (best_netmask == 0L) {
+ best_netmask = netmask;
+ if (best_netmask == 0L) {
fprintf(stderr
, "ERROR: Cannot use default route w/o netmask
[%s]\n"
, address);
I have no idea what Alan thought when he coded this but I'm sure he must
have thought about something that breaks. I also didn't know Alan
Robertson coded this ;).
For now I've hardcoded in the proper netmask and broadcast I want for a /32
in the IPaddr script. Interestingly enough when I do this, and rerun findif
for /32 I get the right values:
./findif 216.163.120.4/32
eth0 netmask 255.255.255.255 broadcast 216.163.120.4
Oh, so he did have a reason to not allow the BAD_NETMASK. First you need
to setup the ip address.
So I know hardcoding these values in the script is not ideal, but it looks
like it works. Any reason not to do so? LVS seems to be functional on my
development environment.
If it works try it.
Good luck,
Roberto Nibali, ratz
--
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq'|dc
|