ctdb-common: Factor out common ARP code
authorMartin Schwenke <martin@meltin.net>
Fri, 10 Aug 2018 07:04:32 +0000 (17:04 +1000)
committerAmitay Isaacs <amitay@samba.org>
Thu, 30 Aug 2018 02:48:57 +0000 (04:48 +0200)
commit2ebb25dfc890923180ecb06d6e17ddb2948e7d2b
tree1e2de35c441a79782928b03092d0dc31232ef828
parent172b87cb1be460a06b7bea0b598a5bf159d3faab
ctdb-common: Factor out common ARP code

Finding the interface and the MAC address are obvious.  Might as well
set up the common parts of the destination address structure.

Continue to open the socket and find the MAC address first.  This
might seem odd because marshalling and other subsequent steps may
fail.  However, in the future this code might be optimised to open a
single socket to send ARPs for a list of addresses on each interface,
so don't change the logic.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/common/system_socket.c