Hi,

2010/7/23 Simon Horman <ho...@verge.net.au>:
> I will add that libnet seems to be more or less unmaintained.
>
> You seem to make using libnet optional, is there a reason
> not to just remove it? portability?

I just thought that some people may want to preserve the existing
behavior. OpenSUSE has libnet shipped with it for example, and I'm not
sure if they would agree to change the implementation or just want to
keep using libnet.

But ok, If no one has objections I'll revise the patch so that it
removes all libnet code from IPv6addr.c and make it single code.
Any other opinions?

As for portability, I believe that the new implementation is
more portable than using libnet. (cf.
http://developerbugs.linux-foundation.org/show_bug.cgi?id=2034#c10)


>> +#define HWADDR_LEN 6 /* mac address length */
>
> Personally I'd prefer the define outside of the function.

Ok, I just wanted to place them closely but no strong preference.
I'll move it to somewhere around the other macro definitions.

>> +     na->nd_na_target = (*src_ip);
>
> There is no need to enclose *src_ip in brackets.

Right. removing the parens.

>> +     if (sendto(fd, &payload, sizeof(payload), 0,
>> +                (struct sockaddr *)&dst_sin6, sizeof(dst_sin6))
>> +         != sizeof(payload)) {

> Is it valid to assume that there will never be a partial write?

I think that reporting an error is just enough when a partial write
occurred here. The packet is very small (32 bytes) and it should
rarely happen, it will be retried 5 times when it occurred, and if it
still fails then it should be considered that "a really bad things"
happened:-) And also the current libnet code does exactly same as
above inside so no behavior would be changed with this code.

Thanks,

-- 
Keisuke MORI
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to