Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
3.9 KiB

  1. 12.05.01 chrisdar
  2. BUG 499552 NLB: Ensure that adapter bouncing decision is consistent in wlbsctrl.dll and netcfgx.dll
  3. Added check in ParamWriteConfig to determine whether VIP changed. If so, need to bounce the adapter.
  4. Flag that controlled whether or not to bounce adapter was called *_mac_addr_change. Since changing
  5. VIP could trigger this, changed name of flag to *_notify_adapter_required.
  6. 07.19.02 chrisdar
  7. 661678 NLB: May need to start cancelling NotifyAddrChange requests in api\notification.cpp
  8. While testing fix, I wrote a test program to randomly execute notifcation api calls simultaneously
  9. in multiple threads. The APIs invoked are those exposed by wlbsctrl.dll that are used by the ipsec
  10. team to tell NLB of session up/down. This test app runs without failure in a steady state
  11. environment in which no changes are being made to the IP addresses. (See
  12. %SDXROOT%\nt\net\wlbs\api\test\notify\MThread)
  13. While testing the API calls and doing add/remove to the Tcp/ip address table I frequently see one
  14. error per IP address change. No errors were seen while updating an existing entry in the Tcp/ip
  15. address table.
  16. Two classes of error have been seen thus far, though this may be limited by coincidental timing of
  17. the invoked API with the change to Tcp/ip:
  18. 1. BuildIPToGUIDMap map fails with ERROR_BUFFER_OVERFLOW. This function uses
  19. GetAdaptersInfo to determine the IP addresses configured on the host. An initial call is made
  20. with this API to determine the size of the buffer needed to hold this information. Then a
  21. second call is made after allocating a buffer of the needed size. The problem is that a network
  22. property change between the first and second calls could change the memory allocation
  23. requirements. This is where and how we failed.
  24. 2. A call to CancelIPChangeNotify fails with ERROR_INVALID_PARAMETER. At this point I don't know
  25. why this call would be failing. Previously, this error was seen if we cancel a notification
  26. that was never registered, but that has been mitigated:
  27. The notification APIs in wlbsctrl.dll (including the one that cancels notifications) are
  28. written such that an initialize API function is not needed. The "notify" calls will take care
  29. of initialization if needed and set an "initialized" flag to prevent initialization on the
  30. next notify
  31. call. Thus when the flag is FALSE it indicates that no notification has yet been made. The
  32. cancel API call unwinds the initialization (setting the flag to false) and early
  33. exits if the initialized flag is not TRUE. This avoids doing an unnecessary cancel under normal
  34. conditions even if the caller doesn't keep track of whether it is needed. This behavior was
  35. initially added so I could invoke the notifify APIs in random order without inducing this
  36. error when canceling a notificatin that was never set. Once we started mucking with the IP
  37. address list, I began seeing this error again.The flag tracking initialization is protected
  38. by a critical section.
  39. ADDEDNDUM to 1.: I also see that for certain failures (such as this one) we don't call HeapFree
  40. for the memory we allocated. While looking into fixing this, we are apparently making more sdk
  41. calls than needed. The code first gets a list of adapters (GetAdaptersInfo) then a list of
  42. IPs (GetIpAddrTable). It traverses the IP table and uses an index in each entry that maps into
  43. an entry in the adapter table. From the adapter entry it gets the GUID and caches the IP, GUID
  44. combo. BUT, the output of GetAdaptersInfo has a linked list of IPs that it owns already, so
  45. the call to GetIpAddrTable isn't needed. Talk to Sean about this. Maybe this information isn't
  46. populated or it may be unreliable.