From ab7ddc3a4fbda4eb550c06ff732920cbfef9b430 Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Mon, 13 Nov 2023 17:03:11 +0100 Subject: [PATCH] nl_vxlan::create_endpoint(): fix error log on add neigh failure There is no link variable in this nl_vxlan::create_endpoint(), only vxlan_link and br_link. This was hidden due to the OBJ_CAST(), but when the OBJ_CAST() was dropped, g++ started to complain. Fix this by replacing link with neigh, since neigh is what the text before the variable says. Fixes the following warning: ../git/src/netlink/nl_vxlan.cc: In member function 'int basebox::nl_vxlan::create_endpoint(rtnl_link*, rtnl_link*, nl_addr*)': ../git/src/netlink/nl_vxlan.cc:674:45: warning: the address of 'int link(const char*, const char*)' will never be NULL [-Waddress] 674 | << ") to add l2 neigh " << link; | ^~~~ Fixes: ec04fe2d229e ("vxlan: add existing neighbors for new endpoint") Signed-off-by: Jonas Gorski --- src/netlink/nl_vxlan.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/netlink/nl_vxlan.cc b/src/netlink/nl_vxlan.cc index 971f74dc..c3438485 100644 --- a/src/netlink/nl_vxlan.cc +++ b/src/netlink/nl_vxlan.cc @@ -671,7 +671,7 @@ int nl_vxlan::create_endpoint(rtnl_link *vxlan_link, rtnl_link *br_link, rv = add_l2_neigh(neigh, lport_id, tunnel_id); if (rv < 0) { LOG(ERROR) << __FUNCTION__ << ": failed (rv=" << rv - << ") to add l2 neigh " << link; + << ") to add l2 neigh " << neigh; } }