- Timestamp:
- Jun 17, 2015 4:30:44 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetLwf-win.cpp
r56293 r56485 66 66 # include <ndis.h> 67 67 #endif 68 #include <mstcpip.h> 68 69 RT_C_DECLS_END 69 70 … … 2183 2184 } 2184 2185 2186 /* 2187 * Uncommenting the following line produces debug log messages on IP address changes, 2188 * including wired interfaces. No actual calls to a switch port are made. This is for 2189 * debug purposes only! 2190 * #define VBOXNETLWFWIN_DEBUGIPADDRNOTIF 1 2191 */ 2185 2192 static void vboxNetLwfWinIpAddrChangeCallback(IN PVOID pvCtx, 2186 2193 IN PMIB_UNICASTIPADDRESS_ROW pRow, … … 2199 2206 return; 2200 2207 2201 if (pRow && pThis->pSwitchPort->pfnNotifyHostAddress) 2208 if ( pRow 2209 #ifndef VBOXNETLWFWIN_DEBUGIPADDRNOTIF 2210 && pThis->pSwitchPort->pfnNotifyHostAddress 2211 #endif /* !VBOXNETLWFWIN_DEBUGIPADDRNOTIF */ 2212 ) 2202 2213 { 2203 2214 switch (pRow->Address.si_family) 2204 2215 { 2205 2216 case AF_INET: 2217 if ( IN4_IS_ADDR_LINKLOCAL(&pRow->Address.Ipv4.sin_addr) 2218 || pRow->Address.Ipv4.sin_addr.s_addr == IN4ADDR_LOOPBACK) 2219 { 2220 Log(("vboxNetLwfWinIpAddrChangeCallback: ignoring %s address (%RTnaipv4)\n", 2221 pRow->Address.Ipv4.sin_addr.s_addr == IN4ADDR_LOOPBACK ? "loopback" : "link-local", 2222 pRow->Address.Ipv4.sin_addr)); 2223 break; 2224 } 2206 2225 Log(("vboxNetLwfWinIpAddrChangeCallback: %s IPv4 addr=%RTnaipv4 on luid=(%u,%u)\n", 2207 2226 fAdded ? "add" : "remove", pRow->Address.Ipv4.sin_addr, 2208 2227 pRow->InterfaceLuid.Info.IfType, pRow->InterfaceLuid.Info.NetLuidIndex)); 2228 #ifndef VBOXNETLWFWIN_DEBUGIPADDRNOTIF 2209 2229 pThis->pSwitchPort->pfnNotifyHostAddress(pThis->pSwitchPort, fAdded, kIntNetAddrType_IPv4, 2210 2230 &pRow->Address.Ipv4.sin_addr); 2231 #endif /* !VBOXNETLWFWIN_DEBUGIPADDRNOTIF */ 2211 2232 break; 2212 2233 case AF_INET6: 2213 Log(("vboxNetLwfWinIpAddrChangeCallback: %s IPv6 addr=%RTnaipv6 luid=(%u,%u)\n", 2234 if (Ipv6AddressScope(pRow->Address.Ipv6.sin6_addr.u.Byte) <= ScopeLevelLink) 2235 { 2236 Log(("vboxNetLwfWinIpAddrChangeCallback: ignoring link-local address (%RTnaipv6)\n", 2237 &pRow->Address.Ipv6.sin6_addr)); 2238 break; 2239 } 2240 Log(("vboxNetLwfWinIpAddrChangeCallback: %s IPv6 addr=%RTnaipv6 scope=%d luid=(%u,%u)\n", 2214 2241 fAdded ? "add" : "remove", &pRow->Address.Ipv6.sin6_addr, 2242 Ipv6AddressScope(pRow->Address.Ipv6.sin6_addr.u.Byte), 2215 2243 pRow->InterfaceLuid.Info.IfType, pRow->InterfaceLuid.Info.NetLuidIndex)); 2244 #ifndef VBOXNETLWFWIN_DEBUGIPADDRNOTIF 2216 2245 pThis->pSwitchPort->pfnNotifyHostAddress(pThis->pSwitchPort, fAdded, kIntNetAddrType_IPv6, 2217 2246 &pRow->Address.Ipv6.sin6_addr); 2247 #endif /* !VBOXNETLWFWIN_DEBUGIPADDRNOTIF */ 2218 2248 break; 2219 2249 } … … 2226 2256 void vboxNetLwfWinRegisterIpAddrNotifier(PVBOXNETFLTINS pThis) 2227 2257 { 2228 if (pThis->pSwitchPort && pThis->pSwitchPort->pfnNotifyHostAddress) 2258 LogFlow(("==>vboxNetLwfWinRegisterIpAddrNotifier: instance=%p\n", pThis)); 2259 if ( pThis->pSwitchPort 2260 #ifndef VBOXNETLWFWIN_DEBUGIPADDRNOTIF 2261 && pThis->pSwitchPort->pfnNotifyHostAddress 2262 #endif /* !VBOXNETLWFWIN_DEBUGIPADDRNOTIF */ 2263 ) 2229 2264 { 2230 2265 NETIO_STATUS Status; … … 2249 2284 else 2250 2285 pThis->u.s.WinIf.hNotifier = NULL; 2286 LogFlow(("<==vboxNetLwfWinRegisterIpAddrNotifier\n")); 2251 2287 } 2252 2288
Note:
See TracChangeset
for help on using the changeset viewer.