Re: [PATCH v3 1/4] util: introduce helper to parse /proc/net/arp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




At 2018-01-29 20:01:30, "Peter Krempa" <pkrempa@xxxxxxxxxx> wrote:
>On Mon, Jan 29, 2018 at 16:35:33 +0800, Chen Hanxiao wrote:
>> From: Chen Hanxiao <chenhanxiao@xxxxxxxxx>
>> 
>> introduce helper to parse /proc/net/arp and
>> store it in struct virArpTable.
>> 
>> Signed-off-by: Chen Hanxiao <chenhanxiao@xxxxxxxxx>
>> ---
>> v3:
[...]
>
>
>without limiting the size here is a great idea. That is a buffer
>overflow right here.
>
>Also parsing /proc/net/arp is not enough, it will not list IPv6
>neighbors.
>
>Additionally I'd stay away from parsing this file completely. Not even
>the obsolete 'arp' utility is using this but rather uses AF_NETLINK
>socket to discover it.
>
>NACK on this approach.

I'll use RTM_GETNEIGH to get these.
Thanks for the advice.

Regards,
- Chen

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux