net_profile_info_t *profile_info = profile;
net_dev_info_t *net_info = __profile_get_net_info(profile_info);
+ if (!net_info) {
+ CONNECTION_LOG(CONNECTION_ERROR, "Invalid operation");
+ CONN_UNLOCK;
+ return CONNECTION_ERROR_INVALID_OPERATION;
+ }
+
int ret = _connection_libnet_enable_ethernet_eap(enable, net_info->ProfileName);
if (ret != CONNECTION_ERROR_NONE) {
CONNECTION_LOG(CONNECTION_ERROR, "Failed to enable EAP over ethernet");
net_profile_info_t *profile_info = profile;
net_dev_info_t *net_info = __profile_get_net_info(profile_info);
- if (net_info->use_eapol == false) {
+ if (!net_info || net_info->use_eapol == false) {
CONNECTION_LOG(CONNECTION_ERROR, "Invalid operation");
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_OPERATION;
net_profile_info_t *profile_info = profile;
net_dev_info_t *net_info = __profile_get_net_info(profile_info);
- if (net_info->use_eapol == false) {
+ if (!net_info || net_info->use_eapol == false) {
CONNECTION_LOG(CONNECTION_ERROR, "Invalid operation");
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_OPERATION;
net_profile_info_t *profile_info = profile;
net_dev_info_t *net_info = __profile_get_net_info(profile_info);
- if (false == __profile_ethernet_validate_eap_passphrase(net_info)) {
+ if (!net_info || false == __profile_ethernet_validate_eap_passphrase(net_info)) {
CONNECTION_LOG(CONNECTION_ERROR, "Invalid operation");
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_OPERATION;
net_profile_info_t *profile_info = profile;
net_dev_info_t *net_info = __profile_get_net_info(profile_info);
- if (false == __profile_ethernet_validate_eap_passphrase(net_info)) {
+ if (!net_info || false == __profile_ethernet_validate_eap_passphrase(net_info)) {
CONNECTION_LOG(CONNECTION_ERROR, "Invalid operation");
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_OPERATION;
net_profile_info_t *profile_info = profile;
net_dev_info_t *net_info = __profile_get_net_info(profile_info);
- if (false == __profile_ethernet_validate_eap_identity(net_info)) {
+ if (!net_info || false == __profile_ethernet_validate_eap_identity(net_info)) {
CONNECTION_LOG(CONNECTION_ERROR, "Invalid operation");
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_OPERATION;
net_profile_info_t *profile_info = profile;
net_dev_info_t *net_info = __profile_get_net_info(profile_info);
- if (false == __profile_ethernet_validate_eap_identity(net_info)) {
+ if (!net_info || false == __profile_ethernet_validate_eap_identity(net_info)) {
CONNECTION_LOG(CONNECTION_ERROR, "Invalid operation");
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_OPERATION;
net_profile_info_t *profile_info = profile;
net_dev_info_t *net_info = __profile_get_net_info(profile_info);
- if (false == __profile_ethernet_validate_eap_ca_cert_file(net_info)) {
+ if (!net_info || false == __profile_ethernet_validate_eap_ca_cert_file(net_info)) {
CONNECTION_LOG(CONNECTION_ERROR, "Invalid operation");
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_OPERATION;
net_profile_info_t *profile_info = profile;
net_dev_info_t *net_info = __profile_get_net_info(profile_info);
- if (false == __profile_ethernet_validate_eap_ca_cert_file(net_info)) {
+ if (!net_info || false == __profile_ethernet_validate_eap_ca_cert_file(net_info)) {
CONNECTION_LOG(CONNECTION_ERROR, "Invalid operation");
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_OPERATION;
net_profile_info_t *profile_info = profile;
net_dev_info_t *net_info = __profile_get_net_info(profile_info);
- if (false == __profile_ethernet_validate_eap_client_cert_file(net_info)) {
+ if (!net_info || false == __profile_ethernet_validate_eap_client_cert_file(net_info)) {
CONNECTION_LOG(CONNECTION_ERROR, "Invalid operation");
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_OPERATION;
net_profile_info_t *profile_info = profile;
net_dev_info_t *net_info = __profile_get_net_info(profile_info);
- if (false == __profile_ethernet_validate_eap_client_cert_file(net_info)) {
+ if (!net_info || false == __profile_ethernet_validate_eap_client_cert_file(net_info)) {
CONNECTION_LOG(CONNECTION_ERROR, "Invalid operation");
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_OPERATION;
net_profile_info_t *profile_info = profile;
net_dev_info_t *net_info = __profile_get_net_info(profile_info);
- if (false == __profile_ethernet_validate_eap_private_key_file(net_info)) {
+ if (!net_info || false == __profile_ethernet_validate_eap_private_key_file(net_info)) {
CONNECTION_LOG(CONNECTION_ERROR, "Invalid operation");
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_OPERATION;
net_profile_info_t *profile_info = profile;
net_dev_info_t *net_info = __profile_get_net_info(profile_info);
- if (false == __profile_ethernet_validate_eap_private_key_file(net_info)) {
+ if (!net_info || false == __profile_ethernet_validate_eap_private_key_file(net_info)) {
CONNECTION_LOG(CONNECTION_ERROR, "Invalid operation");
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_OPERATION;
net_profile_info_t *profile_info = profile;
net_dev_info_t *net_info = __profile_get_net_info(profile_info);
- if (false == __profile_ethernet_validate_eap_anonymous_identity(net_info)) {
+ if (!net_info || false == __profile_ethernet_validate_eap_anonymous_identity(net_info)) {
CONNECTION_LOG(CONNECTION_ERROR, "Invalid operation");
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_OPERATION;
net_profile_info_t *profile_info = profile;
net_dev_info_t *net_info = __profile_get_net_info(profile_info);
- if (false == __profile_ethernet_validate_eap_anonymous_identity(net_info)) {
+ if (!net_info || false == __profile_ethernet_validate_eap_anonymous_identity(net_info)) {
CONNECTION_LOG(CONNECTION_ERROR, "Invalid operation");
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_OPERATION;
net_profile_info_t *profile_info = profile;
net_dev_info_t *net_info = __profile_get_net_info(profile_info);
- if (false == __profile_ethernet_validate_eap_pac_file(net_info)) {
+ if (!net_info || false == __profile_ethernet_validate_eap_pac_file(net_info)) {
CONNECTION_LOG(CONNECTION_ERROR, "Invalid operation");
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_OPERATION;
net_profile_info_t *profile_info = profile;
net_dev_info_t *net_info = __profile_get_net_info(profile_info);
- if (false == __profile_ethernet_validate_eap_pac_file(net_info)) {
+ if (!net_info || false == __profile_ethernet_validate_eap_pac_file(net_info)) {
CONNECTION_LOG(CONNECTION_ERROR, "Invalid operation");
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_OPERATION;
net_profile_info_t *profile_info = profile;
net_dev_info_t *net_info = __profile_get_net_info(profile_info);
- if (false == __profile_ethernet_validate_eap_auth_type(net_info)) {
+ if (!net_info || false == __profile_ethernet_validate_eap_auth_type(net_info)) {
CONNECTION_LOG(CONNECTION_ERROR, "Invalid operation");
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_OPERATION;
net_profile_info_t *profile_info = profile;
net_dev_info_t *net_info = __profile_get_net_info(profile_info);
- if (false == __profile_ethernet_validate_eap_auth_type(net_info)) {
+ if (!net_info || false == __profile_ethernet_validate_eap_auth_type(net_info)) {
CONNECTION_LOG(CONNECTION_ERROR, "Invalid operation");
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_OPERATION;
net_profile_info_t *profile_info = profile;
net_dev_info_t *net_info = __profile_get_net_info(profile_info);
- if (false == __profile_ethernet_validate_eap_peap_version(net_info)) {
+ if (!net_info || false == __profile_ethernet_validate_eap_peap_version(net_info)) {
CONNECTION_LOG(CONNECTION_ERROR, "Invalid operation");
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_OPERATION;
net_profile_info_t *profile_info = profile;
net_dev_info_t *net_info = __profile_get_net_info(profile_info);
- if (false == __profile_ethernet_validate_eap_peap_version(net_info)) {
+ if (!net_info || false == __profile_ethernet_validate_eap_peap_version(net_info)) {
CONNECTION_LOG(CONNECTION_ERROR, "Invalid operation");
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_OPERATION;