selftests/bpf: Use send_to_addr_str in xdp_bonding

The first user of send_to_addr_str() is send_udp_packets() in xdp_bonding.
Use sprintf() to generate "addr_str" string from ifindex, sll_halen and
sll_addr, and pass it to send_to_addr_str(). Since IPPROTO_ICMP is used,
set it as opts.proto and pass opts to the helper too.

Use ASSERT_OK_FD() to check the return fd of send_to_addr_str().

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
1 file changed