)]}'
{
  "commit": "104e41fae9e9cc5737ecd1328d2363e5708e3f9b",
  "tree": "6530771f1a44c1c1aaf12a9af7d1b61bb0ffde99",
  "parents": [
    "67808b9f03a7d9762fb425682d3a8a153ee3928d"
  ],
  "author": {
    "name": "chiachangwang",
    "email": "chiachangwang@google.com",
    "time": "Wed Sep 07 08:10:30 2022 +0000"
  },
  "committer": {
    "name": "Chiachang Wang",
    "email": "chiachangwang@google.com",
    "time": "Thu Oct 13 06:15:53 2022 +0000"
  },
  "message": "Remove the overlapping uid range check\n\nThe overlapping uid range check will stop the uid update if the\nexisting range could cover the new updated rules. E.g. Update\nrange {0-10010, 10011-99999} to replace the existing range\n{0-99999}.\n\nThe overlap uid range check was introduced in S as a safety\ncheck, not for a bug fix. The uid range update relies on rules\nupdated from ConnectivityService. If unexpected duplicate uid\nrange rules are added to netd, they may mess up the ip rules.\nNetd is nearly stateless that it does not know what is currently\nset in IP rules but relies on the uid ranges stored in netd. So it\nfundamentally requires the correctness of binder calls from the\nupper layer. The uid ranges update is already correctly calculated\nin ConnectivityService before updating to netd.\n\nAlternative fix for the issue is trying to address the design\nin ConnectivityService to remove the old uid range first before\nadding new ranges. The problem here is that this may cause\npackets leakage that packets are not subject to any uid rules\nduring the rule update. This would not be a proper fix for the\nissue.\n\nAlso consider that this overlap check was started from S. This\nmay break the design in S devices if we only update design in\nnetd since netd is platform code unlike ConnectivityService that\nis in a mainline module. This is OK because the possibility in\nAPI surface to update uid range is started from T in VpnManager\nthat is also a platform code. The VPNs created from other\nsources(legacy VPN or VpnService) would need to reconnect to\nupdate the uid range. The new uid range update will result in\na new VPN network. The overlap check was not actually used in\nS devices. That is, it\u0027s not really necessary in current design.\nRemove this check does not actually introduce other legacy\nissue, either.\n\nBug: 243900420\nTest: cd system/netd ; atest\nTest: manually test with VPN to exclude some uids and check the\n      result\nChange-Id: I4b26e4f5371cdce90b2595c82798ecc46963a92e\nMerged-In: I4b26e4f5371cdce90b2595c82798ecc46963a92e\n(cherry picked from commit 65bc4ea7f13dd8e870eaab2d5ad0e89e54a29c85)\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "85f942f4c7b1444fecaee8cda17ce483d940ba38",
      "old_mode": 33188,
      "old_path": "server/Network.cpp",
      "new_id": "156cfb3e01044357e4ddd529397f1d572d7cfd5d",
      "new_mode": 33188,
      "new_path": "server/Network.cpp"
    },
    {
      "type": "modify",
      "old_id": "e18e1cdbee6d04755faf2bd923c5832c35ef0d9b",
      "old_mode": 33188,
      "old_path": "server/Network.h",
      "new_id": "dfead17730245d0644fe004daf8e4e0ab3af4b22",
      "new_mode": 33188,
      "new_path": "server/Network.h"
    },
    {
      "type": "modify",
      "old_id": "bb3f653d88b785d563807becf46f9c876c32a498",
      "old_mode": 33188,
      "old_path": "server/PhysicalNetwork.cpp",
      "new_id": "681306415608253cfc53bce3dd65613b34b0f990",
      "new_mode": 33188,
      "new_path": "server/PhysicalNetwork.cpp"
    },
    {
      "type": "modify",
      "old_id": "c90f30b96ea3b4adcc420c7929418ee513ff0d3c",
      "old_mode": 33188,
      "old_path": "server/UidRanges.cpp",
      "new_id": "765df32253457b1dcfdb77cab611f5752fb32eec",
      "new_mode": 33188,
      "new_path": "server/UidRanges.cpp"
    },
    {
      "type": "modify",
      "old_id": "9123eb1711682702df0623bc7d8642bb2d864895",
      "old_mode": 33188,
      "old_path": "server/UidRanges.h",
      "new_id": "f20dc443c027f8de746958ab00d13c2f6481e128",
      "new_mode": 33188,
      "new_path": "server/UidRanges.h"
    },
    {
      "type": "modify",
      "old_id": "68802251907440ac7840bc42c728b98269d01018",
      "old_mode": 33188,
      "old_path": "server/UnreachableNetwork.cpp",
      "new_id": "dd6318c0dfe9df02d2c5bc476c0c6c4b386a0d80",
      "new_mode": 33188,
      "new_path": "server/UnreachableNetwork.cpp"
    },
    {
      "type": "modify",
      "old_id": "495fd16180b151b422287e4450dd721f49f627c7",
      "old_mode": 33188,
      "old_path": "server/VirtualNetwork.cpp",
      "new_id": "e0f60407c15ee8b5c21c40f9906e7bb504eb203d",
      "new_mode": 33188,
      "new_path": "server/VirtualNetwork.cpp"
    },
    {
      "type": "modify",
      "old_id": "bc1e73935860e11cfc06c04317270cde87081998",
      "old_mode": 33188,
      "old_path": "tests/binder_test.cpp",
      "new_id": "cb70fe31161aa5f13c3ff4d3bf99e38bb5d21b12",
      "new_mode": 33188,
      "new_path": "tests/binder_test.cpp"
    }
  ]
}
