Author: wirtz Date: Fri Aug 19 17:41:14 2011 New Revision: 2720 Log: extended debug output on "invalid MAC" to clarify happens mostly when pinging from a legacy router's pisaTunnel interface Modified: trunk/pisasd/sdtun.c Modified: trunk/pisasd/sdtun.c ============================================================================== --- trunk/pisasd/sdtun.c Thu Aug 11 17:34:22 2011 (r2719) +++ trunk/pisasd/sdtun.c Fri Aug 19 17:41:14 2011 (r2720) @@ -89,15 +89,18 @@ entry->heartbeat_flag = true; if (entry->type == PISA_CONTYPE_LEGACY_ROUTER) { + + char mac_str[ARP_STRLEN]; + pisa_mac_write_string(mac, mac_str); + map = pisa_nat_mapping_find_by_mac(sd_ctx.natlist, mac); + if (!mac->m[0] && !mac->m[1] && !mac->m[2] && !mac->m[3] && !mac->m[4] && !mac->m[5]) { - PISA_DEBUG(PL_DATA, "remote -> local: invalid MAC, dropping\n"); + PISA_DEBUG(PL_DATA, "remote -> local: invalid MAC, dropping (MAC: %s)\n", mac_str); return; } if (!map) { - char mac_str[ARP_STRLEN]; - pisa_mac_write_string(mac, mac_str); struct in_addr local = { 0 }; char ip_str[INET_ADDRSTRLEN]; if (!pisa_client_get_legacy_client_ipv4(&local)) { @@ -108,8 +111,6 @@ inet_ntop(AF_INET, &local, ip_str, sizeof(ip_str)); PISA_DEBUG(PL_LEGACY, "Adding mapping for unknown legacy client: MAC %s IP %s\n", mac_str, ip_str); } else if (map->connection != entry) { - char mac_str[ARP_STRLEN]; - pisa_mac_write_string(mac, mac_str); PISA_DEBUG(PL_LEGACY, "Legacy client handover detected for MAC %s\n", mac_str); pisa_nat_update_connection(sd_ctx.natlist, map, entry, srcaddr); } -- This is the pisa developer mailing list. Please also subscribe to the main pisa list at: //www.freelists.org/list/pisa