Lines Matching refs:add
132 static void maybeModifyQdiscClsact(const char* interface, bool add);
458 bool add) { in modifyIncomingPacketMark() argument
469 "%s %s -i %s -j MARK --set-mark 0x%x/0x%x", add ? "-A" : "-D", in modifyIncomingPacketMark()
483 [[nodiscard]] static int modifyVpnOutputToLocalRule(const char* vpnInterface, bool add) { in modifyVpnOutputToLocalRule() argument
484 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_VPN_OUTPUT_TO_LOCAL, in modifyVpnOutputToLocalRule()
495 uint32_t subPriority, bool secure, bool add) { in modifyVpnUidRangeRule() argument
513 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, priority + subPriority, table, in modifyVpnUidRangeRule()
523 bool add) { in modifyVpnSystemPermissionRule() argument
535 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, priority, table, fwmark.intValue, in modifyVpnSystemPermissionRule()
548 uid_t uidEnd, uint32_t subPriority, bool add) { in modifyExplicitNetworkRule() argument
561 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, in modifyExplicitNetworkRule()
572 uid_t uidEnd, uint32_t subPriority, bool add) { in modifyOutputInterfaceRules() argument
583 if (int ret = modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_VPN_OVERRIDE_OIF, in modifyOutputInterfaceRules()
590 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, in modifyOutputInterfaceRules()
600 [[nodiscard]] static int modifyImplicitNetworkRule(unsigned netId, uint32_t table, bool add) { in modifyImplicitNetworkRule() argument
613 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_IMPLICIT_NETWORK, table, in modifyImplicitNetworkRule()
733 [[nodiscard]] static int modifyLocalNetwork(unsigned netId, const char* interface, bool add) { in modifyLocalNetwork() argument
734 if (int ret = modifyIncomingPacketMark(netId, interface, PERMISSION_NONE, add)) { in modifyLocalNetwork()
737 maybeModifyQdiscClsact(interface, add); in modifyLocalNetwork()
740 add); in modifyLocalNetwork()
744 uid_t uidEnd, uint32_t subPriority, bool add, in modifyUidNetworkRule() argument
764 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, in modifyUidNetworkRule()
772 uint32_t subPriority, bool add) { in modifyUidDefaultNetworkRule() argument
788 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, in modifyUidDefaultNetworkRule()
796 bool add, bool modifyNonUidBasedRules) { in modifyPhysicalNetwork() argument
805 add, EXPLICIT)) { in modifyPhysicalNetwork()
809 add, IMPLICIT)) { in modifyPhysicalNetwork()
813 add)) { in modifyPhysicalNetwork()
824 if (int ret = modifyIncomingPacketMark(netId, interface, permission, add)) { in modifyPhysicalNetwork()
828 UidRanges::DEFAULT_SUB_PRIORITY, add)) { in modifyPhysicalNetwork()
832 UidRanges::DEFAULT_SUB_PRIORITY, add)) { in modifyPhysicalNetwork()
857 return modifyImplicitNetworkRule(netId, table, add); in modifyPhysicalNetwork()
863 uint32_t subPriority, bool add, in modifyUidUnreachableRule() argument
883 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, in modifyUidUnreachableRule()
891 uint32_t subPriority, bool add) { in modifyUidDefaultUnreachableRule() argument
907 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, in modifyUidDefaultUnreachableRule()
914 bool add) { in modifyUnreachableNetwork() argument
917 if (int ret = modifyUidUnreachableRule(netId, range.start, range.stop, subPriority, add, in modifyUnreachableNetwork()
921 if (int ret = modifyUidUnreachableRule(netId, range.start, range.stop, subPriority, add, in modifyUnreachableNetwork()
926 add)) { in modifyUnreachableNetwork()
935 [[nodiscard]] static int modifyRejectNonSecureNetworkRule(const UidRanges& uidRanges, bool add) { in modifyRejectNonSecureNetworkRule() argument
942 if (int ret = modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_PROHIBIT_NON_VPN, in modifyRejectNonSecureNetworkRule()
953 const UidRangeMap& uidRangeMap, bool secure, bool add, in modifyVirtualNetwork() argument
963 add)) { in modifyVirtualNetwork()
967 range.stop, subPriority, add)) { in modifyVirtualNetwork()
971 range.stop, subPriority, add)) { in modifyVirtualNetwork()
978 if (int ret = modifyIncomingPacketMark(netId, interface, PERMISSION_NONE, add)) { in modifyVirtualNetwork()
981 if (int ret = modifyVpnOutputToLocalRule(interface, add)) { in modifyVirtualNetwork()
984 if (int ret = modifyVpnSystemPermissionRule(netId, table, secure, add)) { in modifyVirtualNetwork()
988 UidRanges::DEFAULT_SUB_PRIORITY, add); in modifyVirtualNetwork()
1062 static void maybeModifyQdiscClsact(const char* interface, bool add) { in maybeModifyQdiscClsact() argument
1068 if (StartsWith(interface, "v4-") && add) return; in maybeModifyQdiscClsact()
1077 if (add) { in maybeModifyQdiscClsact()