diff --git a/srcs/lwip/src/arch_linux/core/vxlan_pkg.c b/srcs/lwip/src/arch_linux/core/vxlan_pkg.c index 4d63964..fe7da1f 100644 --- a/srcs/lwip/src/arch_linux/core/vxlan_pkg.c +++ b/srcs/lwip/src/arch_linux/core/vxlan_pkg.c @@ -163,7 +163,7 @@ unsigned char *vxlan_pkg_encode(const unsigned char *pInBuf, int inSize, PVXLAN_ pkg->ip_head._chksum = 0x0000; pkg->udp_head.chksum = 0x0000; - checksum = udp_checksum(pBuf, total_len); + checksum = udp_checksum(pBuf, total_len); pkg->udp_head.chksum = checksum; IPH_CHKSUM_SET(&pkg->ip_head, inet_chksum(&pkg->ip_head, 20)); @@ -220,7 +220,7 @@ static void vxlan_pkg_head_init(PVXLAN_PEER pvxLan) { pkg->qinq_head.in_type = lwip_htons(QINQ_802_1_AD); } -int vxlan_peer_add(unsigned int vni, const char* pIp, const char* pMac) { +int vxlan_peer_add(unsigned int vni, const char *pIp, const char *pMac) { PVXLAN_PEER vxlan_peer; if (!VERIFY_STRING(pIp) || !VERIFY_STRING(pMac)) { @@ -233,7 +233,7 @@ int vxlan_peer_add(unsigned int vni, const char* pIp, const char* pMac) { uv_rwlock_rdunlock(&g_vxLanLinks.lock_peer); if (vxlan_peer == NULL) { - unsigned int peerIp; + unsigned int peerIp; unsigned char peerMac[6]; str_to_mac(pMac, peerMac); @@ -260,6 +260,8 @@ int vxlan_peer_add(unsigned int vni, const char* pIp, const char* pMac) { uv_rwlock_wrlock(&g_vxLanLinks.lock_peer); HASH_ADD_INT(g_pAllvxLanPeers, vni, vxlan_peer); uv_rwlock_wrunlock(&g_vxLanLinks.lock_peer); + + dzlog_debug("Add vxLan[vni = %d]: vSwitch: %s, %s\n", vni, pIp, pMac); } return ERR_SUCCESS;