Changeset 57315 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
- Timestamp:
- Aug 13, 2015 11:26:32 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
r57121 r57315 2080 2080 int err; 2081 2081 int rc = VINF_SUCCESS; 2082 IPRT_LINUX_SAVE_EFL_AC(); 2082 2083 NOREF(pvIfData); 2083 2084 … … 2128 2129 } 2129 2130 2131 IPRT_LINUX_RESTORE_EFL_AC(); 2130 2132 return rc; 2131 2133 } … … 2134 2136 void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, bool fActive) 2135 2137 { 2136 struct net_device * 2137 2138 LogFlow(("vboxNetFltPortOsSetActive: pThis=%p (%s), fActive=%s, fDisablePromiscuous=%s\n", 2139 pThis, pThis->szName, fActive?"true":"false",2140 pThis ->fDisablePromiscuous?"true":"false"));2138 struct net_device *pDev; 2139 IPRT_LINUX_SAVE_EFL_AC(); 2140 2141 LogFlow(("vboxNetFltPortOsSetActive: pThis=%p (%s), fActive=%RTbool, fDisablePromiscuous=%RTbool\n", 2142 pThis, pThis->szName, fActive, pThis->fDisablePromiscuous)); 2141 2143 2142 2144 if (pThis->fDisablePromiscuous) … … 2185 2187 vboxNetFltLinuxReleaseNetDev(pThis, pDev); 2186 2188 } 2189 IPRT_LINUX_RESTORE_EFL_AC(); 2187 2190 } 2188 2191 … … 2196 2199 if (ASMAtomicCmpXchgBool(&pThis->u.s.fPacketHandler, false, true)) 2197 2200 { 2201 IPRT_LINUX_SAVE_EFL_AC(); 2198 2202 dev_remove_pack(&pThis->u.s.PacketType); 2199 2203 Log(("vboxNetFltOsDisconnectIt: this=%p: Packet handler removed.\n", pThis)); 2204 IPRT_LINUX_RESTORE_EFL_AC(); 2200 2205 } 2201 2206 return VINF_SUCCESS; … … 2205 2210 int vboxNetFltOsConnectIt(PVBOXNETFLTINS pThis) 2206 2211 { 2212 IPRT_LINUX_SAVE_EFL_AC(); 2213 2207 2214 /* 2208 2215 * Report the GSO capabilities of the host and device (if connected). … … 2225 2232 vboxNetFltLinuxReportNicGsoCapabilities(pThis); 2226 2233 2234 IPRT_LINUX_RESTORE_EFL_AC(); 2227 2235 return VINF_SUCCESS; 2228 2236 } … … 2233 2241 struct net_device *pDev; 2234 2242 bool fRegistered; 2243 IPRT_LINUX_SAVE_EFL_AC(); 2235 2244 2236 2245 #ifdef VBOXNETFLT_WITH_HOST2WIRE_FILTER … … 2273 2282 unregister_netdevice_notifier(&pThis->u.s.Notifier); 2274 2283 module_put(THIS_MODULE); 2284 2285 IPRT_LINUX_RESTORE_EFL_AC(); 2275 2286 } 2276 2287 … … 2280 2291 int err; 2281 2292 NOREF(pvContext); 2293 IPRT_LINUX_SAVE_EFL_AC(); 2282 2294 2283 2295 pThis->u.s.Notifier.notifier_call = vboxNetFltLinuxNotifierCallback; 2284 2296 err = register_netdevice_notifier(&pThis->u.s.Notifier); 2285 2297 if (err) 2298 { 2299 IPRT_LINUX_RESTORE_EFL_AC(); 2286 2300 return VERR_INTNET_FLT_IF_FAILED; 2301 } 2287 2302 if (!pThis->u.s.fRegistered) 2288 2303 { 2289 2304 unregister_netdevice_notifier(&pThis->u.s.Notifier); 2290 2305 LogRel(("VBoxNetFlt: failed to find %s.\n", pThis->szName)); 2306 IPRT_LINUX_RESTORE_EFL_AC(); 2291 2307 return VERR_INTNET_FLT_IF_NOT_FOUND; 2292 2308 } … … 2295 2311 if ( pThis->fDisconnectedFromHost 2296 2312 || !try_module_get(THIS_MODULE)) 2313 { 2314 IPRT_LINUX_RESTORE_EFL_AC(); 2297 2315 return VERR_INTNET_FLT_IF_FAILED; 2316 } 2298 2317 2299 2318 if (pThis->pSwitchPort->pfnNotifyHostAddress) … … 2314 2333 if (err) 2315 2334 { 2316 LogRel(("%s: failed to enumerate network devices: error %d\n", 2317 __FUNCTION__, err));2335 LogRel(("%s: failed to enumerate network devices: error %d\n", __FUNCTION__, err)); 2336 IPRT_LINUX_RESTORE_EFL_AC(); 2318 2337 return VINF_SUCCESS; 2319 2338 } … … 2324 2343 err = register_inetaddr_notifier(&pThis->u.s.NotifierIPv4); 2325 2344 if (err) 2326 LogRel(("%s: failed to register IPv4 notifier: error %d\n", 2327 __FUNCTION__, err)); 2345 LogRel(("%s: failed to register IPv4 notifier: error %d\n", __FUNCTION__, err)); 2328 2346 2329 2347 pThis->u.s.NotifierIPv6.notifier_call = vboxNetFltLinuxNotifierIPv6Callback; 2330 2348 err = register_inet6addr_notifier(&pThis->u.s.NotifierIPv6); 2331 2349 if (err) 2332 LogRel(("%s: failed to register IPv6 notifier: error %d\n", 2333 __FUNCTION__, err));2334 } 2335 2350 LogRel(("%s: failed to register IPv6 notifier: error %d\n", __FUNCTION__, err)); 2351 } 2352 2353 IPRT_LINUX_RESTORE_EFL_AC(); 2336 2354 return VINF_SUCCESS; 2337 2355 } … … 2339 2357 int vboxNetFltOsPreInitInstance(PVBOXNETFLTINS pThis) 2340 2358 { 2359 IPRT_LINUX_SAVE_EFL_AC(); 2360 2341 2361 /* 2342 2362 * Init the linux specific members. … … 2356 2376 #endif 2357 2377 2378 IPRT_LINUX_RESTORE_EFL_AC(); 2358 2379 return VINF_SUCCESS; 2359 2380 }
Note:
See TracChangeset
for help on using the changeset viewer.