%attr(644,root,root) %{_libdir}/systemd/system/stc-manager.service
%attr(644,root,root) %{_libdir}/systemd/system/multi-user.target.wants/stc-manager.service
-%attr(755,root,root) /%{_localstatedir}/lib/stc
+%attr(755,network_fw,network_fw) /%{_localstatedir}/lib/stc
%attr(600,root,root) /%{_localstatedir}/lib/stc/exceptions
#DBus DAC
iptables_rule.d_iprange_type = rule->dst_iprange_type;
/* specify source and destination ip address if any */
- if (rule->src_ip1)
- inet_aton(rule->src_ip1, &iptables_rule.s_ip1);
- if (rule->src_ip2)
- inet_aton(rule->src_ip2, &iptables_rule.s_ip2);
- if (rule->dst_ip1)
- inet_aton(rule->dst_ip1, &iptables_rule.d_ip1);
- if (rule->dst_ip2)
- inet_aton(rule->dst_ip2, &iptables_rule.d_ip2);
+ if (rule->src_ip1) {
+ if (!inet_aton(rule->src_ip1, &iptables_rule.s_ip1))
+ STC_LOGE("Failed to inet aton [%s]", rule->src_ip1);
+ }
+ if (rule->src_ip2) {
+ if (!inet_aton(rule->src_ip2, &iptables_rule.s_ip2))
+ STC_LOGE("Failed to inet aton [%s]", rule->src_ip2);
+ }
+ if (rule->dst_ip1) {
+ if (!inet_aton(rule->dst_ip1, &iptables_rule.d_ip1))
+ STC_LOGE("Failed to inet aton [%s]", rule->dst_ip1);
+ }
+ if (rule->dst_ip2) {
+ if (!inet_aton(rule->dst_ip2, &iptables_rule.d_ip2))
+ STC_LOGE("Failed to inet aton [%s]", rule->dst_ip2);
+ }
if (rule->action == NFACCT_ACTION_DELETE) {
/* delete interface rule */