Lines Matching refs:add

77 // it upstream, we'll remove this and rely on the kernel header values. For now, add a static assert
440 Permission permission, bool add) {
451 if (execIptables(V4V6, "-t", "mangle", add ? "-A" : "-D", "INPUT", "-i", interface, "-j",
464 WARN_UNUSED_RESULT int modifyVpnOutputToLocalRule(const char* vpnInterface, bool add) {
465 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_VPN_OUTPUT_TO_LOCAL,
476 bool secure, bool add) {
494 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, priority, table, fwmark.intValue,
504 bool add) {
516 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, priority, table, fwmark.intValue,
529 uid_t uidEnd, bool add) {
542 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_EXPLICIT_NETWORK, table,
552 uid_t uidEnd, bool add) {
559 // If this rule does not specify a UID range, then also add a corresponding high-priority rule
562 if (int ret = modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_VPN_OVERRIDE_OIF,
569 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_OUTPUT_INTERFACE, table,
579 Permission permission, bool add) {
592 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_IMPLICIT_NETWORK, table,
691 ALOGE("Can't add IPv4 default route to %s: %s", interface, strerror(-ret));
696 ALOGE("Can't add IPv6 default route to %s: %s", interface, strerror(-ret));
707 // order to add the route, there must already be a directly-connected route that covers the gateway.
728 WARN_UNUSED_RESULT int modifyLocalNetwork(unsigned netId, const char* interface, bool add) {
729 if (int ret = modifyIncomingPacketMark(netId, interface, PERMISSION_NONE, add)) {
733 INVALID_UID, INVALID_UID, add);
737 Permission permission, bool add) {
743 if (int ret = modifyIncomingPacketMark(netId, interface, permission, add)) {
747 add)) {
751 add)) {
754 return modifyImplicitNetworkRule(netId, table, permission, add);
758 const UidRanges& uidRanges, bool secure, bool add,
766 if (int ret = modifyVpnUidRangeRule(table, range.first, range.second, secure, add)) {
770 range.second, add)) {
774 range.second, add)) {
780 if (int ret = modifyIncomingPacketMark(netId, interface, PERMISSION_NONE, add)) {
783 if (int ret = modifyVpnOutputToLocalRule(interface, add)) {
786 if (int ret = modifyVpnSystemPermissionRule(netId, table, secure, add)) {
789 return modifyExplicitNetworkRule(netId, table, PERMISSION_NONE, UID_ROOT, UID_ROOT, add);
872 // Trying to add a route that already exists shouldn't cause an error.
962 // Don't complain if we can't add the dummy network, since not all devices support it.