
7 Feb
2018
7 Feb
'18
2:09 a.m.
At 2018-01-29 20:01:30, "Peter Krempa" <pkrempa@redhat.com> wrote:
On Mon, Jan 29, 2018 at 16:35:33 +0800, Chen Hanxiao wrote:
From: Chen Hanxiao <chenhanxiao@gmail.com>
introduce helper to parse /proc/net/arp and store it in struct virArpTable.
Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com> --- 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