[Openais] mcastport port not correctly handled

Steven Dake sdake at redhat.com
Tue Sep 23 10:01:00 PDT 2008


Fabien,

The root of the problem is two fold.

First I ported all of the whitetank totem code to corosync minus the
totemconfig code.  The totemconfig code does the htons operation instead
of it being done in lower level code as is done in the patch.

I think the patch is the proper solution but totally breaks
compatibility with the whitetank version.

Unfortunately as untidy as this suggestion sounds, I think it is the
only way we can proceed:

1) Add a new configuration value with default of on called "compat"
which provides backwards compatible port numbers for totem to
communicate with.

2) modify the totemip code to consider this option when assigning port
numbers.  compat mode will use the broken htons and htons-1 values
(which are not contiguous) and non compat mode will use the port
specified and the udp port + 1 for the token socket.

As to how this escaped review for all these years, not sure on that
one :(

I will work out a patch now.

Regards
-steve

On Tue, 2008-09-23 at 18:24 +0200, Fabien Thomas wrote:
> Is there a problem to commit this fix in trunk ?
> Another bonus question is why the 2nd port is not incremented related  
> to the base port ?
> 
> Fabien
> 
> > Hi
> >
> > In trunk branch, if you have mcastport:5405 in corosync.conf,
> > the listen port are 7701 and 7445.
> >
> > We got 2 bugs in trunk-branch :
> > A/ corosync is missing htons() when using mcastport.
> > B/ ports are not contiguous.
> >
> > Whitetank-branch use htons() when configuration is read : the bug B  
> > are
> > also spotted.
> >
> > The patch place htons() call in totemip_totemip_to_sockaddr_convert(),
> > and fix A and B :
> > udp4       0      0 Firewall_HA2.5405      *.*
> > udp4       0      0 Firewall_HA2.5404      *.*
> >
> > Regards,
> > Mathieu
> > <patch-totemip- 
> > htons.txt>_______________________________________________
> > Openais mailing list
> > Openais at lists.linux-foundation.org
> > https://lists.linux-foundation.org/mailman/listinfo/openais
> 
> _______________________________________________
> Openais mailing list
> Openais at lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/openais



More information about the Openais mailing list