PANS - Support unreachable default network
Framework provides several preferences in PANS feature. To meet those preferences, Netd needs to support two operations for framework: (1) Set OEM-paid network as default network for apps. (2) Prohibit apps to use default network if it is not explicitly selected. The #1 is supported by previous commit already. This commit implements the #2, which adds a new IP rule priority for unconnected socket, reuses existing IP rule priorities in explicit and implicit network selection. Rules are looks like: 15000: from all fwmark 0x10034/0x1ffff iif lo uidrange x-y unreachable ... 22000: from all fwmark 0x34/0x1ffff iif lo uidrange x-y unreachable ... 27000: from all fwmark 0x0/0xffff iif lo uidrange x-y unreachable An UNREACHABLE network (netId 52) is created for framework to specify that the default network is unavailable for designated apps. Bug: 181579204 Test: atest Change-Id: I21530928a85870df673e2d1387fde130fe5a0104
Loading
Please register or sign in to comment