Re: bug in Release( entry *VE ) RH 7.3

Ezra Nugroho <[email protected]> 09 Jun 2003 15:53:14 -0500
Newsgroups gmane.comp.apache.mod-wackamole.general
Message-ID <[email protected]>
Thanks for the quick response.

I quickly found out that that was not the problem.
I have also verified that there was no bug in the main code leading to
the call of Release ( entry *VE)

Interface handling in ife.c works, but in wackamole.c doesn't.
The only thing I can think of right now is the interface presentations
that are passed to if_down are different.

req that is passed to if_down in ife.c is much simpler than ifdown in
wackamole.c. Remeber ife call for releasing interface is only 'ife -d
ip_address', no netmask, no broadcast.

Is there any C function call to do variable dump? I am not familiar with
gdb yet...
Is there something you can pass my way about 'struct interface'.
I don't know what the structure is, and I don't know where I can find
it.

I am darn close. I'll get there with a little nudge :).





On Mon, 2003-06-09 at 14:37, Theo E. Schlossnagle wrote:
> Ezra Nugroho wrote:
> > Strange...
> > 
> > The interface handling works as expected when I tried ife.
> > So, it's looking like the problem is, as I thought earlier, in 
> > Release( entry *VE )  function.
> > 
> > My C programing skill is really rustic, so, ehm.., I might need some
> > help debuging it.
> >  Let's see:
> > 
> > static  void    Release( entry *VE )
> > {
> >   int ic, n=0;
> >   struct interface idown, *nif;
> > 
> >   for(nif=&VE->pseudo_if; n<MAX_DEP_IF; nif = &(VE->extra_ifs[n++])) {
> >         if(nif->ipaddr.s_addr == 0) break;
> 
> 
> It is supposed to drop all the interfaces in the VE.  VE != VIP.  VE is a set 
> of virtual IP addresses.  You should have two VEs, each with on VIP specified.
> 
> You should only have one VIP in each of your VEs using your configuration.
> 
> wackamole is designed to work on routers too:
> 
> Prefer None
> VirtualInterfaces {
>          { fxp2:10.77.52.1/32 fxp1:192.168.52.1/32 fxp0:192.168.0.1/32 }
> }
> 
> The above conf shows a sine VE with one psuedo_if and two extra_ifs.  If the 
> VE drops, it need to drop all three of those IPs and if the VE is "brought up" 
> it needs to bring all three IPs up.  (note the extra set of braces).
> 
> -- 
> Theo Schlossnagle
> Principal Consultant
> OmniTI Computer Consulting, Inc. -- http://www.omniti.com/
> Phone:  +1 410 872 4910 x201     Fax:  +1 410 872 4911
> 1024D/82844984/95FD 30F1 489E 4613 F22E  491A 7E88 364C 8284 4984
> 2047R/33131B65/71 F7 95 64 49 76 5D BA  3D 90 B9 9F BE 27 24 E7