bugfix TSG-18106:删除SCE网关默认值127.0.0.1
This commit is contained in:
@@ -349,7 +349,7 @@ void health_check_session_init(const char *profile)
|
|||||||
MESA_load_profile_string_def(profile, "bfdd", "path", path, sizeof(path), "/var/run/frr/bfdd.vty");
|
MESA_load_profile_string_def(profile, "bfdd", "path", path, sizeof(path), "/var/run/frr/bfdd.vty");
|
||||||
MESA_load_profile_string_def(profile, "bfdd", "device", hc_dev_name, sizeof(hc_dev_name), "eth0");
|
MESA_load_profile_string_def(profile, "bfdd", "device", hc_dev_name, sizeof(hc_dev_name), "eth0");
|
||||||
MESA_load_profile_string_def(profile, "bfdd", "local_address", local_address, sizeof(local_address), "127.0.0.1");
|
MESA_load_profile_string_def(profile, "bfdd", "local_address", local_address, sizeof(local_address), "127.0.0.1");
|
||||||
MESA_load_profile_string_def(profile, "bfdd", "gateway", gateway_address, sizeof(gateway_address), "127.0.0.1");
|
MESA_load_profile_string_nodef(profile, "bfdd", "gateway", gateway_address, sizeof(gateway_address));
|
||||||
MESA_load_profile_string_def(profile, "bfdd", "default_gw_mac", default_gw_mac_str, sizeof(default_gw_mac_str), "aa:aa:aa:aa:aa:aa");
|
MESA_load_profile_string_def(profile, "bfdd", "default_gw_mac", default_gw_mac_str, sizeof(default_gw_mac_str), "aa:aa:aa:aa:aa:aa");
|
||||||
|
|
||||||
if (enable == 0)
|
if (enable == 0)
|
||||||
@@ -359,7 +359,9 @@ void health_check_session_init(const char *profile)
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_sf_status = sf_status_create(profile);
|
g_sf_status = sf_status_create(profile);
|
||||||
|
if (strlen(gateway_address) > 0) {
|
||||||
health_check_method_table_add(&g_handle_none, gateway_address);
|
health_check_method_table_add(&g_handle_none, gateway_address);
|
||||||
|
}
|
||||||
health_check_session_foreach();
|
health_check_session_foreach();
|
||||||
listen_arp_table();
|
listen_arp_table();
|
||||||
send_icmp_cycle();
|
send_icmp_cycle();
|
||||||
@@ -773,6 +775,12 @@ int health_check_session_get_mac(uint64_t session_id, u_char mac_buff[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (memcmp(mac, init_mac, ETH_ALEN) == 0) {
|
if (memcmp(mac, init_mac, ETH_ALEN) == 0) {
|
||||||
|
if (strlen(gateway_address) == 0) {
|
||||||
|
LOG_DEBUG("health check session id [%lu] profile id [%d] health check method [%s] get mac [null]", session_id, tmp->profile_id, str_method);
|
||||||
|
pthread_rwlock_unlock(&g_handle.rwlock);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
health_check_method_table_get_mac(&g_handle_none, gateway_address, mac);
|
health_check_method_table_get_mac(&g_handle_none, gateway_address, mac);
|
||||||
if (memcmp(mac, init_mac, ETH_ALEN) == 0) {
|
if (memcmp(mac, init_mac, ETH_ALEN) == 0) {
|
||||||
LOG_DEBUG("health check session id [%lu] profile id [%d] health check method [%s] get mac [null]", session_id, tmp->profile_id, str_method);
|
LOG_DEBUG("health check session id [%lu] profile id [%d] health check method [%s] get mac [null]", session_id, tmp->profile_id, str_method);
|
||||||
|
|||||||
Reference in New Issue
Block a user