VirtualBox

Ignore:
Timestamp:
May 28, 2015 5:53:48 AM (10 years ago)
Author:
vboxsync
Message:

IntNet/NetFlt: Fix a bug accidentally introduced in unsuspecting
r87651. We ignored all netdev events except NETDEV_REGISTER because
we compared wrong pointers looking for "our" device.

Public ticket #12264 looks like one likely manifestation.
Variable reuse is bad, m'kay...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c

    r56104 r56120  
    18251825{
    18261826    PVBOXNETFLTINS      pThis = VBOX_FLT_NB_TO_INST(self);
     1827    struct net_device  *pMyDev = ASMAtomicUoReadPtrT(&pThis->u.s.pDev, struct net_device *);
    18271828#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
    18281829    struct net_device  *pDev  = netdev_notifier_info_to_dev(ptr);
     
    18331834
    18341835    Log(("VBoxNetFlt: got event %s(0x%lx) on %s, pDev=%p pThis=%p pThis->u.s.pDev=%p\n",
    1835          vboxNetFltLinuxGetNetDevEventName(ulEventType), ulEventType, pDev->name, pDev, pThis, ASMAtomicUoReadPtrT(&pThis->u.s.pDev, struct net_device *)));
     1836         vboxNetFltLinuxGetNetDevEventName(ulEventType), ulEventType, pDev->name, pDev, pThis, pMyDev));
     1837
    18361838    if (    ulEventType == NETDEV_REGISTER
    18371839        && !strcmp(pDev->name, pThis->szName))
     
    18411843    else
    18421844    {
    1843         pDev = ASMAtomicUoReadPtrT(&pThis->u.s.pDev, struct net_device *);
    1844         if (pDev == ptr)
     1845        if (pDev == pMyDev)
    18451846        {
    18461847            switch (ulEventType)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette