>>> On 6/18/2015 at 10:03 PM, in message <[email protected]>,
>>> Christine
Caulfield <[email protected]> wrote:
> On 18/06/15 03:20, Lidong Zhong wrote:
> > Hi Christine,
> >
> > Any news about this patch?
> >
>
> Hi Lidong,
>
Hi Christine,
Thanks for your reply.
> I'm afraid I'm going to have to NAK it. Although it technically matches
> the man page, it breaks existing behaviour (the ability to bind to a
> host IP address) and that behaviour is also valid in corosync 2. If you
> can come up with a patch that allows that behaviour AND fixes this
> problem then I'll he happy to review it.
>
I think the condition you described here has already been considered in the
original logic.
The code is here
611 if (tb[IFA_LOCAL]) {
612 memcpy(ipaddr.addr, RTA_DATA(tb[IFA_LOCAL]),
TOTEMIP_ADDRLEN);
613 if (totemip_equal(&ipaddr, bindnet)) {
614 found_if = 1;
615 exact_match_found = 1;
616 }
617 }
Then it will check if the bindnetwork address with netmask.
Regards,
Lidong
> Sorry for delay in responding, I was away for a while.
>
> Chrissie
>
> > Regards,
> > Lidong
> >
> >>>> On 5/15/2015 at 09:52 AM, in
> >> message
> > <[email protected]>, "Lidong
> >> Zhong"
> > <[email protected]> wrote:
> > On 5/14/2015 at 08:23 PM, in message
> >> <[email protected]>, Christine
> >> Caulfield <[email protected]> wrote:
> >>> On 14/05/15 06:36, Lidong Zhong wrote:
> >>>> For instance, the IPs are:
> >>>> eth0: 10.150.10.81/8
> >>>> eth1: 10.150.10.91/24
> >>>> The bindnetaddr in corosync is: 10.150.10.0 and the addr of eth1 is
> >>>> selected in UDPU mode. Then the bindto address probably mistakenly
> >>>> choose
> >>>> the addr of eth0.
> >>>>
> >>>
> >>> Hiya,
> >>>
> >>> Thanks for the patch but I'm not convinced it's the right thing to do
> >>> for all situations. If the bindnet_addr is set to an actual IP address
> >>> and not a subnet mask then it will fail I think. What does your
> >>> corosync.conf look like?
> >>>
> >> Hi Chrissie,
> >>
> >> Thanks for your reply. The full corosync.conf is attached below.
> >> As the man page says, the bindnetaddr always is the local interface ip
> >> with netmask. It should be a full ip address only in IPv6 case. And I
> >> think
>
> >> there
> >> is no problem for the current code to handle IPv6 address.
> >>
> >> Regards,
> >> Lidong
> >>
> >>> Chrissie
> >>>
> >>>> Signed-off-by: Lidong Zhong <[email protected]>
> >>>> ---
> >>>> exec/totemip.c | 2 +-
> >>>> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/exec/totemip.c b/exec/totemip.c
> >>>> index ab175a8..c1fa800 100644
> >>>> --- a/exec/totemip.c
> >>>> +++ b/exec/totemip.c
> >>>> @@ -626,7 +626,7 @@ int totemip_iface_check(struct totem_ip_address
> >>> *bindnet,
> >>>> memcpy(&network,
> >>>> RTA_DATA(tb[IFA_LOCAL]), sizeof(uint32_t));
> >>>> memcpy(&addr, bindnet->addr,
> >>>> sizeof(uint32_t));
> >>>>
> >>>> - if ((addr & netmask) ==
> >>>> (network & netmask)) {
> >>>> + if (addr == (network &
> >>>> netmask)) {
> >>>> memcpy(ipaddr.addr,
> >>>> RTA_DATA(tb[IFA_ADDRESS]), TOTEMIP_ADDRLEN);
> >>>> found_if = 1;
> >>>> }
> >>>>
> >>>
> >>> _______________________________________________
> >>> discuss mailing list
> >>> [email protected]
> >>> http://lists.corosync.org/mailman/listinfo/discuss
> >>>
> >>>
> >>
> >>
> >>
> >
> >
>
>
>
_______________________________________________
discuss mailing list
[email protected]
http://lists.corosync.org/mailman/listinfo/discuss