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