Lines Matching refs:add

432                                                 Permission permission, bool add) {
441 add ? "-A" : "-D", RouteController::LOCAL_MANGLE_INPUT,
455 WARN_UNUSED_RESULT int modifyVpnOutputToLocalRule(const char* vpnInterface, bool add) {
456 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_VPN_OUTPUT_TO_LOCAL,
467 bool secure, bool add) {
485 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, priority, table, fwmark.intValue,
495 bool add) {
507 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, priority, table, fwmark.intValue,
520 uid_t uidEnd, bool add) {
533 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_EXPLICIT_NETWORK, table,
543 uid_t uidEnd, bool add) {
550 // If this rule does not specify a UID range, then also add a corresponding high-priority rule
553 if (int ret = modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_VPN_OVERRIDE_OIF,
560 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_OUTPUT_INTERFACE, table,
569 WARN_UNUSED_RESULT int modifyImplicitNetworkRule(unsigned netId, uint32_t table, bool add) {
582 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_IMPLICIT_NETWORK, table,
695 // order to add the route, there must already be a directly-connected route that covers the gateway.
716 WARN_UNUSED_RESULT int modifyLocalNetwork(unsigned netId, const char* interface, bool add) {
717 if (int ret = modifyIncomingPacketMark(netId, interface, PERMISSION_NONE, add)) {
721 INVALID_UID, INVALID_UID, add);
725 Permission permission, bool add) {
731 if (int ret = modifyIncomingPacketMark(netId, interface, permission, add)) {
735 add)) {
739 add)) {
764 return modifyImplicitNetworkRule(netId, table, add);
769 WARN_UNUSED_RESULT int modifyRejectNonSecureNetworkRule(const UidRanges& uidRanges, bool add) {
776 if (int ret = modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE,
788 const UidRanges& uidRanges, bool secure, bool add,
796 if (int ret = modifyVpnUidRangeRule(table, range.getStart(), range.getStop(), secure, add))
801 range.getStop(), add)) {
805 range.getStart(), range.getStop(), add)) {
811 if (int ret = modifyIncomingPacketMark(netId, interface, PERMISSION_NONE, add)) {
814 if (int ret = modifyVpnOutputToLocalRule(interface, add)) {
817 if (int ret = modifyVpnSystemPermissionRule(netId, table, secure, add)) {
820 return modifyExplicitNetworkRule(netId, table, PERMISSION_NONE, UID_ROOT, UID_ROOT, add);
886 // Trying to add a route that already exists shouldn't cause an error.
966 // Don't complain if we can't add the dummy network, since not all devices support it.