Home
last modified time | relevance | path

Searched refs:fwmark (Results 1 – 8 of 8) sorted by relevance

/system/netd/server/
DFwmarkServer.cpp110 Fwmark fwmark; in processClient() local
111 socklen_t fwmarkLen = sizeof(fwmark.intValue); in processClient()
112 if (getsockopt(*socketFd, SOL_SOCKET, SO_MARK, &fwmark.intValue, &fwmarkLen) == -1) { in processClient()
120 permission = static_cast<Permission>(permission | fwmark.permission); in processClient()
158 if (!fwmark.explicitlySelected) { in processClient()
159 if (!fwmark.protectedFromVpn) { in processClient()
160 fwmark.netId = mNetworkController->getNetworkForConnect(client->getUid()); in processClient()
161 } else if (!mNetworkController->isVirtualNetwork(fwmark.netId)) { in processClient()
162 fwmark.netId = mNetworkController->getDefaultNetwork(); in processClient()
191 netdEventListener->onConnectEvent(fwmark.netId, connectInfo.error, in processClient()
[all …]
DRouteController.cpp218 uint32_t table, uint32_t fwmark, uint32_t mask, const char* iif, in modifyIpRule() argument
221 if (fwmark & ~mask) { in modifyIpRule()
222 ALOGE("mask 0x%x does not select all the bits set in fwmark 0x%x", mask, fwmark); in modifyIpRule()
273 { &fwmark, mask ? sizeof(fwmark) : 0 }, in modifyIpRule()
304 uint32_t fwmark, uint32_t mask, const char* iif, in modifyIpRule() argument
306 return modifyIpRule(action, priority, FR_ACT_TO_TBL, table, fwmark, mask, iif, oif, uidStart, in modifyIpRule()
311 uint32_t fwmark, uint32_t mask) { in modifyIpRule() argument
312 return modifyIpRule(action, priority, table, fwmark, mask, IIF_NONE, OIF_NONE, INVALID_UID, in modifyIpRule()
418 Fwmark fwmark; in modifyIncomingPacketMark() local
420 fwmark.netId = netId; in modifyIncomingPacketMark()
[all …]
DTetherController.cpp176 Fwmark fwmark; in startTethering() local
177 fwmark.netId = NetworkController::LOCAL_NET_ID; in startTethering()
178 fwmark.explicitlySelected = true; in startTethering()
179 fwmark.protectedFromVpn = true; in startTethering()
180 fwmark.permission = PERMISSION_SYSTEM; in startTethering()
182 snprintf(markStr, sizeof(markStr), "0x%x", fwmark.intValue); in startTethering()
249 Fwmark fwmark; in setDnsForwarders() local
250 fwmark.netId = netId; in setDnsForwarders()
251 fwmark.explicitlySelected = true; in setDnsForwarders()
252 fwmark.protectedFromVpn = true; in setDnsForwarders()
[all …]
DClatdController.cpp74 Fwmark fwmark; in startClatd() local
75 fwmark.netId = netId; in startClatd()
76 fwmark.explicitlySelected = true; in startClatd()
77 fwmark.protectedFromVpn = true; in startClatd()
78 fwmark.permission = PERMISSION_SYSTEM; in startClatd()
81 snprintf(fwmarkString, sizeof(fwmarkString), "0x%x", fwmark.intValue); in startClatd()
DNetworkController.cpp193 Fwmark fwmark; in getNetworkForDns() local
194 fwmark.protectedFromVpn = true; in getNetworkForDns()
195 fwmark.permission = PERMISSION_SYSTEM; in getNetworkForDns()
201 fwmark.explicitlySelected = true; in getNetworkForDns()
224 fwmark.netId = *netId; in getNetworkForDns()
225 return fwmark.intValue; in getNetworkForDns()
289 Fwmark fwmark; in getNetworkContext() local
290 fwmark.netId = nc.app_netid; in getNetworkContext()
291 fwmark.explicitlySelected = explicitlySelected; in getNetworkContext()
292 fwmark.protectedFromVpn = explicitlySelected && canProtect(uid); in getNetworkContext()
[all …]
DSockDiagTest.cpp354 Fwmark fwmark; in modifySocketForTest() local
355 fwmark.netId = permissionTestcases[i].netId; in modifySocketForTest()
356 fwmark.explicitlySelected = permissionTestcases[i].explicitlySelected; in modifySocketForTest()
357 fwmark.permission = permissionTestcases[i].permission; in modifySocketForTest()
358 return setsockopt(s, SOL_SOCKET, SO_MARK, &fwmark.intValue, sizeof(fwmark.intValue)); in modifySocketForTest()
/system/netd/client/
DNetdClient.cpp191 Fwmark fwmark; in getNetworkForSocket() local
192 socklen_t fwmarkLen = sizeof(fwmark.intValue); in getNetworkForSocket()
193 if (getsockopt(socketFd, SOL_SOCKET, SO_MARK, &fwmark.intValue, &fwmarkLen) == -1) { in getNetworkForSocket()
196 *netId = fwmark.netId; in getNetworkForSocket()
/system/core/rootdir/
Dinit.rc134 # reflect fwmark from incoming packets onto generated replies
138 # set fwmark on accepted sockets