iptables_rule_s *rule)
{
if (builder == NULL || rule == NULL)
- return;
+ return; //LCOV_EXCL_LINE
g_variant_builder_add(builder, "{sv}", RULE_CHAIN,
g_variant_new_string(rule->chain));
params);
if (message == NULL) {
- STC_LOGE("Failed to invoke dbus method");
- return STC_ERROR_FAIL;
+ STC_LOGE("Failed to invoke dbus method"); //LCOV_EXCL_LINE
+ return STC_ERROR_FAIL; //LCOV_EXCL_LINE
}
g_variant_get(message, "(i)", &result);
params);
if (message == NULL) {
- STC_LOGE("Failed to invoke dbus method");
- return STC_ERROR_FAIL;
+ STC_LOGE("Failed to invoke dbus method"); //LCOV_EXCL_LINE
+ return STC_ERROR_FAIL; //LCOV_EXCL_LINE
}
g_variant_get(message, "(i)", &result);
params);
if (message == NULL) {
- STC_LOGE("Failed to invoke dbus method");
- return STC_ERROR_FAIL;
+ STC_LOGE("Failed to invoke dbus method"); //LCOV_EXCL_LINE
+ return STC_ERROR_FAIL; //LCOV_EXCL_LINE
}
g_variant_get(message, "(i)", &result);
params);
if (message == NULL) {
- STC_LOGE("Failed to invoke dbus method");
- return STC_ERROR_FAIL;
+ STC_LOGE("Failed to invoke dbus method"); //LCOV_EXCL_LINE
+ return STC_ERROR_FAIL; //LCOV_EXCL_LINE
}
g_variant_get(message, "(i)", &result);
g_variant_new("(s)", chain));
if (message == NULL) {
- STC_LOGE("Failed to invoke dbus method");
- return STC_ERROR_FAIL;
+ STC_LOGE("Failed to invoke dbus method"); //LCOV_EXCL_LINE
+ return STC_ERROR_FAIL; //LCOV_EXCL_LINE
}
g_variant_get(message, "(i)", &result);
g_variant_new("(s)", chain));
if (message == NULL) {
- STC_LOGE("Failed to invoke dbus method");
- return STC_ERROR_FAIL;
+ STC_LOGE("Failed to invoke dbus method"); //LCOV_EXCL_LINE
+ return STC_ERROR_FAIL; //LCOV_EXCL_LINE
}
g_variant_get(message, "(i)", &result);
g_variant_new("(s)", chain));
if (message == NULL) {
- STC_LOGE("Failed to invoke dbus method");
- return STC_ERROR_FAIL;
+ STC_LOGE("Failed to invoke dbus method"); //LCOV_EXCL_LINE
+ return STC_ERROR_FAIL; //LCOV_EXCL_LINE
}
g_variant_get(message, "(i)", &result);
g_variant_new("(s)", chain));
if (message == NULL) {
- STC_LOGE("Failed to invoke dbus method");
- return STC_ERROR_FAIL;
+ STC_LOGE("Failed to invoke dbus method"); //LCOV_EXCL_LINE
+ return STC_ERROR_FAIL; //LCOV_EXCL_LINE
}
g_variant_get(message, "(i)", &result);
g_variant_new("(s)", chain));
if (message == NULL) {
- STC_LOGE("Failed to invoke dbus method");
- return STC_ERROR_FAIL;
+ STC_LOGE("Failed to invoke dbus method"); //LCOV_EXCL_LINE
+ return STC_ERROR_FAIL; //LCOV_EXCL_LINE
}
g_variant_get(message, "(i)", &result);
g_variant_new("(s)", chain));
if (message == NULL) {
- STC_LOGE("Failed to invoke dbus method");
- return STC_ERROR_FAIL;
+ STC_LOGE("Failed to invoke dbus method"); //LCOV_EXCL_LINE
+ return STC_ERROR_FAIL; //LCOV_EXCL_LINE
}
g_variant_get(message, "(i)", &result);
stc_s *stc = stc_get_manager();
if (!stc || !stc->connection)
- return STC_ERROR_INVALID_PARAMETER;
+ return STC_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
ret = __iptables_rule_add(stc->connection, rule);
if (ret != STC_ERROR_NONE)
- goto done;
+ goto done; //LCOV_EXCL_LINE
ret = __ip6tables_rule_add(stc->connection, rule);
done:
stc_s *stc = stc_get_manager();
if (!stc || !stc->connection)
- return STC_ERROR_INVALID_PARAMETER;
+ return STC_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
ret = __iptables_rule_remove(stc->connection, rule);
if (ret != STC_ERROR_NONE)
- goto done;
+ goto done; //LCOV_EXCL_LINE
ret = __ip6tables_rule_remove(stc->connection, rule);
done:
stc_s *stc = stc_get_manager();
if (!stc || !stc->connection)
- return STC_ERROR_INVALID_PARAMETER;
+ return STC_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
ret = __iptables_flush_chain(stc->connection, STC_IN_CHAIN);
if (ret != STC_ERROR_NONE)
- goto done;
+ goto done; //LCOV_EXCL_LINE
ret = __iptables_flush_chain(stc->connection, STC_OUT_CHAIN);
if (ret != STC_ERROR_NONE)
- goto done;
+ goto done; //LCOV_EXCL_LINE
ret = __iptables_flush_chain(stc->connection, STC_FRWD_CHAIN);
if (ret != STC_ERROR_NONE)
- goto done;
+ goto done; //LCOV_EXCL_LINE
ret = __ip6tables_flush_chain(stc->connection, STC_IN_CHAIN);
if (ret != STC_ERROR_NONE)
- goto done;
+ goto done; //LCOV_EXCL_LINE
ret = __ip6tables_flush_chain(stc->connection, STC_OUT_CHAIN);
if (ret != STC_ERROR_NONE)
- goto done;
+ goto done; //LCOV_EXCL_LINE
ret = __ip6tables_flush_chain(stc->connection, STC_FRWD_CHAIN);
done:
stc_s *stc = stc_get_manager();
if (!stc || !stc->connection) {
- __STC_LOG_FUNC_EXIT__;
- return STC_ERROR_INVALID_PARAMETER;
+ __STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
+ return STC_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
}
ret = __iptables_add_chain(stc->connection, STC_IN_CHAIN);
if (ret != STC_ERROR_NONE) {
- __STC_LOG_FUNC_EXIT__;
- goto done;
+ __STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
+ goto done; //LCOV_EXCL_LINE
}
ret = __iptables_add_chain(stc->connection, STC_OUT_CHAIN);
if (ret != STC_ERROR_NONE) {
- __STC_LOG_FUNC_EXIT__;
- goto done;
+ __STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
+ goto done; //LCOV_EXCL_LINE
}
ret = __iptables_add_chain(stc->connection, STC_FRWD_CHAIN);
if (ret != STC_ERROR_NONE) {
- __STC_LOG_FUNC_EXIT__;
- goto done;
+ __STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
+ goto done; //LCOV_EXCL_LINE
}
ret = __ip6tables_add_chain(stc->connection, STC_IN_CHAIN);
if (ret != STC_ERROR_NONE) {
- __STC_LOG_FUNC_EXIT__;
- goto done;
+ __STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
+ goto done; //LCOV_EXCL_LINE
}
ret = __ip6tables_add_chain(stc->connection, STC_OUT_CHAIN);
if (ret != STC_ERROR_NONE) {
- __STC_LOG_FUNC_EXIT__;
- goto done;
+ __STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
+ goto done; //LCOV_EXCL_LINE
}
ret = __ip6tables_add_chain(stc->connection, STC_FRWD_CHAIN);
if (ret != STC_ERROR_NONE) {
- __STC_LOG_FUNC_EXIT__;
- goto done;
+ __STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
+ goto done; //LCOV_EXCL_LINE
}
ret = __iptables_add_chain_jump_rule("INPUT", STC_IN_CHAIN);
if (ret != STC_ERROR_NONE) {
- __STC_LOG_FUNC_EXIT__;
- goto done;
+ __STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
+ goto done; //LCOV_EXCL_LINE
}
ret = __iptables_add_chain_jump_rule("OUTPUT", STC_OUT_CHAIN);
if (ret != STC_ERROR_NONE) {
- __STC_LOG_FUNC_EXIT__;
- goto done;
+ __STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
+ goto done; //LCOV_EXCL_LINE
}
ret = __iptables_add_chain_jump_rule("FORWARD", STC_FRWD_CHAIN);
stc_s *stc = stc_get_manager();
if (!stc || !stc->connection) {
- __STC_LOG_FUNC_EXIT__;
- return STC_ERROR_INVALID_PARAMETER;
+ __STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
+ return STC_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
}
ret = __iptables_remove_chain(stc->connection, STC_IN_CHAIN);
if (ret != STC_ERROR_NONE) {
- __STC_LOG_FUNC_EXIT__;
- goto done;
+ __STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
+ goto done; //LCOV_EXCL_LINE
}
ret = __iptables_remove_chain(stc->connection, STC_OUT_CHAIN);
if (ret != STC_ERROR_NONE) {
- __STC_LOG_FUNC_EXIT__;
- goto done;
+ __STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
+ goto done; //LCOV_EXCL_LINE
}
ret = __iptables_remove_chain(stc->connection, STC_FRWD_CHAIN);
if (ret != STC_ERROR_NONE) {
- __STC_LOG_FUNC_EXIT__;
- goto done;
+ __STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
+ goto done; //LCOV_EXCL_LINE
}
ret = __ip6tables_remove_chain(stc->connection, STC_IN_CHAIN);
if (ret != STC_ERROR_NONE) {
- __STC_LOG_FUNC_EXIT__;
- goto done;
+ __STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
+ goto done; //LCOV_EXCL_LINE
}
ret = __ip6tables_remove_chain(stc->connection, STC_OUT_CHAIN);
if (ret != STC_ERROR_NONE) {
- __STC_LOG_FUNC_EXIT__;
- goto done;
+ __STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
+ goto done; //LCOV_EXCL_LINE
}
ret = __ip6tables_remove_chain(stc->connection, STC_FRWD_CHAIN);