Commit Graph

5 Commits

Author SHA1 Message Date
Sukrit Bhatnagar
b00c9c390a util: arptable: use VIR_AUTOFREE instead of VIR_FREE for scalar types
By making use of GNU C's cleanup attribute handled by the
VIR_AUTOFREE macro for declaring scalar variables, majority
of the VIR_FREE calls can be dropped, which in turn leads to
getting rid of most of our cleanup sections.

Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2018-07-14 17:01:30 +02:00
Chen Hanxiao
70c67d4a15 virarptable: fix some leaks and format issue
fix some leaks and format issue
Also support virArpTableFree to get NULL.

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2018-03-17 13:19:07 +01:00
Michal Privoznik
9304d916a3 virarptable: Avoid cast align warnings
We have to use VIR_WARNINGS_NO_CAST_ALIGN to avoid clang warning
about increased required alignment caused by some netlink macros.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2018-03-16 09:02:34 +01:00
Michal Privoznik
3ee5f8115d virarptable: Include rtnetlink.h only on Linux
And at the same time, do that from .c rather than .h file.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Chen Hanxiao<chenhanxiao@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-15 14:59:12 +01:00
Chen Hanxiao
a176d67cdf util: introduce helper to parse message from RTM_GETNEIGH query
introduce helper to parse RTM_GETNEIGH query message and
store it in struct virArpTable.

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2018-03-15 11:22:42 +01:00