/system/netd/server/ |
D | FwmarkServer.cpp | 164 Fwmark fwmark; in processClient() local 165 socklen_t fwmarkLen = sizeof(fwmark.intValue); in processClient() 166 if (getsockopt(*socketFd, SOL_SOCKET, SO_MARK, &fwmark.intValue, &fwmarkLen) == -1) { in processClient() 174 permission = static_cast<Permission>(permission | fwmark.permission); in processClient() 212 if (!fwmark.explicitlySelected) { in processClient() 213 if (!fwmark.protectedFromVpn) { in processClient() 214 fwmark.netId = mNetworkController->getNetworkForConnect(client->getUid()); in processClient() 215 } else if (!mNetworkController->isVirtualNetwork(fwmark.netId)) { in processClient() 216 fwmark.netId = mNetworkController->getDefaultNetwork(); in processClient() 245 netdEventListener->onConnectEvent(fwmark.netId, connectInfo.error, in processClient() [all …]
|
D | RouteController.cpp | 262 uint32_t table, uint32_t fwmark, uint32_t mask, in modifyIpRule() argument 266 if (fwmark & ~mask) { in modifyIpRule() 267 ALOGE("mask 0x%x does not select all the bits set in fwmark 0x%x", mask, fwmark); in modifyIpRule() 318 { &fwmark, mask ? sizeof(fwmark) : 0 }, in modifyIpRule() 349 uint32_t fwmark, uint32_t mask, const char* iif, in modifyIpRule() argument 351 return modifyIpRule(action, priority, FR_ACT_TO_TBL, table, fwmark, mask, iif, oif, uidStart, in modifyIpRule() 356 uint32_t fwmark, uint32_t mask) { in modifyIpRule() argument 357 return modifyIpRule(action, priority, table, fwmark, mask, IIF_NONE, OIF_NONE, INVALID_UID, in modifyIpRule() 474 Fwmark fwmark; in modifyIncomingPacketMark() local 476 fwmark.netId = netId; in modifyIncomingPacketMark() [all …]
|
D | NetdHwService.cpp | 71 Fwmark fwmark; in createOemNetwork() local 72 fwmark.netId = netId; in createOemNetwork() 73 fwmark.explicitlySelected = true; in createOemNetwork() 74 fwmark.protectedFromVpn = true; in createOemNetwork() 75 fwmark.permission = PERMISSION_SYSTEM; in createOemNetwork() 76 _hidl_cb(netIdToNetHandle(netId), fwmark.intValue, toHalStatus(ret)); in createOemNetwork()
|
D | NetworkController.cpp | 206 Fwmark fwmark; in getNetworkForDnsLocked() local 207 fwmark.protectedFromVpn = true; in getNetworkForDnsLocked() 208 fwmark.permission = PERMISSION_SYSTEM; in getNetworkForDnsLocked() 217 fwmark.netId = *netId; in getNetworkForDnsLocked() 218 fwmark.explicitlySelected = true; in getNetworkForDnsLocked() 219 return fwmark.intValue; in getNetworkForDnsLocked() 226 fwmark.explicitlySelected = true; in getNetworkForDnsLocked() 249 fwmark.netId = *netId; in getNetworkForDnsLocked() 250 return fwmark.intValue; in getNetworkForDnsLocked() 320 Fwmark fwmark; in getNetworkContext() local [all …]
|
D | TetherController.cpp | 254 Fwmark fwmark; in startTethering() local 255 fwmark.netId = NetworkController::LOCAL_NET_ID; in startTethering() 256 fwmark.explicitlySelected = true; in startTethering() 257 fwmark.protectedFromVpn = true; in startTethering() 258 fwmark.permission = PERMISSION_SYSTEM; in startTethering() 260 snprintf(markStr, sizeof(markStr), "0x%x", fwmark.intValue); in startTethering() 401 Fwmark fwmark; in setDnsForwarders() local 402 fwmark.netId = netId; in setDnsForwarders() 403 fwmark.explicitlySelected = true; in setDnsForwarders() 404 fwmark.protectedFromVpn = true; in setDnsForwarders() [all …]
|
D | SockDiagTest.cpp | 357 Fwmark fwmark; in modifySocketForTest() local 358 fwmark.netId = permissionTestcases[i].netId; in modifySocketForTest() 359 fwmark.explicitlySelected = permissionTestcases[i].explicitlySelected; in modifySocketForTest() 360 fwmark.permission = permissionTestcases[i].permission; in modifySocketForTest() 361 return setsockopt(s, SOL_SOCKET, SO_MARK, &fwmark.intValue, sizeof(fwmark.intValue)); in modifySocketForTest()
|
D | ClatdController.cpp | 421 fwmark.netId = networkId; in init() 422 fwmark.explicitlySelected = true; in init() 423 fwmark.protectedFromVpn = true; in init() 424 fwmark.permission = PERMISSION_SYSTEM; in init() 426 snprintf(fwmarkString, sizeof(fwmarkString), "0x%x", fwmark.intValue); in init()
|
D | ClatdController.h | 64 Fwmark fwmark; member
|
D | XfrmControllerTest.cpp | 438 Fwmark fwmark; in testIpSecAddSecurityAssociation() local 439 fwmark.intValue = outputmark.outputMark; in testIpSecAddSecurityAssociation() 440 EXPECT_EQ(testOutputNetid, fwmark.netId); in testIpSecAddSecurityAssociation() 441 EXPECT_EQ(PERMISSION_SYSTEM, fwmark.permission); in testIpSecAddSecurityAssociation() 442 EXPECT_TRUE(fwmark.explicitlySelected); in testIpSecAddSecurityAssociation() 443 EXPECT_TRUE(fwmark.protectedFromVpn); in testIpSecAddSecurityAssociation()
|
D | XfrmController.cpp | 1316 Fwmark fwmark; in fillNlAttrXfrmOutputMark() local 1317 fwmark.netId = underlyingNetId; in fillNlAttrXfrmOutputMark() 1320 fwmark.permission = PERMISSION_SYSTEM; in fillNlAttrXfrmOutputMark() 1321 fwmark.explicitlySelected = true; in fillNlAttrXfrmOutputMark() 1322 fwmark.protectedFromVpn = true; in fillNlAttrXfrmOutputMark() 1323 output_mark->outputMark = fwmark.intValue; in fillNlAttrXfrmOutputMark()
|
D | NetdNativeService.cpp | 1249 Fwmark fwmark; in getFwmarkForNetwork() local 1250 fwmark.netId = netId; in getFwmarkForNetwork() 1252 markMask->mark = fwmark.intValue; in getFwmarkForNetwork()
|
/system/hardware/interfaces/net/netd/testutils/ |
D | VtsHalNetNetdTestUtils.cpp | 89 int countRulesForFwmark(const uint32_t fwmark) { in countRulesForFwmark() argument 92 StringPrintf("from all fwmark 0x(%x|[0-9a-f]+%04x)/.* lookup ", fwmark, fwmark); in countRulesForFwmark()
|
D | VtsHalNetNetdTestUtils.h | 42 int countRulesForFwmark(const uint32_t fwmark);
|
/system/netd/client/ |
D | NetdClient.cpp | 463 Fwmark fwmark; in getNetworkForSocket() local 464 socklen_t fwmarkLen = sizeof(fwmark.intValue); in getNetworkForSocket() 465 if (getsockopt(socketFd, SOL_SOCKET, SO_MARK, &fwmark.intValue, &fwmarkLen) == -1) { in getNetworkForSocket() 468 *netId = fwmark.netId; in getNetworkForSocket()
|
/system/netd/tests/ |
D | binder_test.cpp | 3329 bool sendIPv6PacketFromUid(uid_t uid, const in6_addr& dstAddr, Fwmark* fwmark, int tunFd) { in sendIPv6PacketFromUid() argument 3340 socklen_t fwmarkLen = sizeof(fwmark->intValue); in sendIPv6PacketFromUid() 3341 EXPECT_NE(-1, getsockopt(testSocket, SOL_SOCKET, SO_MARK, &(fwmark->intValue), &fwmarkLen)); in sendIPv6PacketFromUid() 3381 Fwmark fwmark; in expectVpnFallthroughWorks() local 3382 EXPECT_FALSE(sendIPv6PacketFromUid(0, outsideVpnAddr, &fwmark, fallthroughFd)); in expectVpnFallthroughWorks() 3383 EXPECT_FALSE(sendIPv6PacketFromUid(0, insideVpnAddr, &fwmark, fallthroughFd)); in expectVpnFallthroughWorks() 3389 EXPECT_TRUE(sendIPv6PacketFromUid(0, outsideVpnAddr, &fwmark, fallthroughFd)); in expectVpnFallthroughWorks() 3390 EXPECT_EQ(fallthroughNetId | 0xC0000, static_cast<int>(fwmark.intValue)); in expectVpnFallthroughWorks() 3391 EXPECT_TRUE(sendIPv6PacketFromUid(0, insideVpnAddr, &fwmark, fallthroughFd)); in expectVpnFallthroughWorks() 3392 EXPECT_EQ(fallthroughNetId | 0xC0000, static_cast<int>(fwmark.intValue)); in expectVpnFallthroughWorks() [all …]
|
/system/core/rootdir/ |
D | init.rc | 255 # reflect fwmark from incoming packets onto generated replies 259 # set fwmark on accepted sockets
|