Lines Matching refs:add
473 bool add) { in modifyIncomingPacketMark() argument
484 "%s %s -i %s -j MARK --set-mark 0x%x/0x%x", add ? "-A" : "-D", in modifyIncomingPacketMark()
498 [[nodiscard]] static int modifyVpnOutputToLocalRule(const char* vpnInterface, bool add) { in modifyVpnOutputToLocalRule() argument
499 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_VPN_OUTPUT_TO_LOCAL, in modifyVpnOutputToLocalRule()
510 bool secure, bool add) { in modifyVpnUidRangeRule() argument
528 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, priority, table, fwmark.intValue, in modifyVpnUidRangeRule()
538 bool add) { in modifyVpnSystemPermissionRule() argument
550 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, priority, table, fwmark.intValue, in modifyVpnSystemPermissionRule()
563 uid_t uidEnd, bool add) { in modifyExplicitNetworkRule() argument
576 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_EXPLICIT_NETWORK, table, in modifyExplicitNetworkRule()
586 uid_t uidEnd, bool add) { in modifyOutputInterfaceRules() argument
597 if (int ret = modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_VPN_OVERRIDE_OIF, in modifyOutputInterfaceRules()
604 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_OUTPUT_INTERFACE, table, in modifyOutputInterfaceRules()
613 [[nodiscard]] static int modifyImplicitNetworkRule(unsigned netId, uint32_t table, bool add) { in modifyImplicitNetworkRule() argument
626 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_IMPLICIT_NETWORK, table, in modifyImplicitNetworkRule()
744 [[nodiscard]] static int modifyLocalNetwork(unsigned netId, const char* interface, bool add) { in modifyLocalNetwork() argument
745 if (int ret = modifyIncomingPacketMark(netId, interface, PERMISSION_NONE, add)) { in modifyLocalNetwork()
749 INVALID_UID, INVALID_UID, add); in modifyLocalNetwork()
754 Permission permission, bool add) { in modifyPhysicalNetwork() argument
760 if (int ret = modifyIncomingPacketMark(netId, interface, permission, add)) { in modifyPhysicalNetwork()
764 add)) { in modifyPhysicalNetwork()
768 add)) { in modifyPhysicalNetwork()
793 return modifyImplicitNetworkRule(netId, table, add); in modifyPhysicalNetwork()
798 [[nodiscard]] static int modifyRejectNonSecureNetworkRule(const UidRanges& uidRanges, bool add) { in modifyRejectNonSecureNetworkRule() argument
805 if (int ret = modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_PROHIBIT_NON_VPN, in modifyRejectNonSecureNetworkRule()
816 const UidRanges& uidRanges, bool secure, bool add, in modifyVirtualNetwork() argument
824 if (int ret = modifyVpnUidRangeRule(table, range.start, range.stop, secure, add)) { in modifyVirtualNetwork()
828 range.stop, add)) { in modifyVirtualNetwork()
832 range.stop, add)) { in modifyVirtualNetwork()
838 if (int ret = modifyIncomingPacketMark(netId, interface, PERMISSION_NONE, add)) { in modifyVirtualNetwork()
841 if (int ret = modifyVpnOutputToLocalRule(interface, add)) { in modifyVirtualNetwork()
844 if (int ret = modifyVpnSystemPermissionRule(netId, table, secure, add)) { in modifyVirtualNetwork()
847 return modifyExplicitNetworkRule(netId, table, PERMISSION_NONE, UID_ROOT, UID_ROOT, add); in modifyVirtualNetwork()
921 void maybeModifyQdiscClsact(const char* interface, bool add) { in maybeModifyQdiscClsact() argument
929 if (StartsWith(interface, "v4-") && add) return; in maybeModifyQdiscClsact()
938 if (add) { in maybeModifyQdiscClsact()