VirtualBox

Changeset 13910 in vbox for trunk/src/VBox/HostDrivers


Ignore:
Timestamp:
Nov 6, 2008 12:27:56 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
38917
Message:

Solaris/VBoxNetFlt: failure case fixes.

File:
1 edited

Legend:

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

    r13906 r13910  
    17941794                            {
    17951795                                /*
     1796                                 * Inject/Eject from the host IP stack.
     1797                                 */
     1798                                if (!fAttach)
     1799                                    vboxNetFltRetain(pThis, false /* fBusy */);
     1800
     1801                                /*
    17961802                                 * Set global data which will be grabbed by ModOpen.
    17971803                                 * There is a known (though very unlikely) race here because
     
    18011807                                g_VBoxNetFltSolarisStreamType = kIp4Stream;
    18021808
    1803                                 /*
    1804                                  * Inject/Eject from the host IP stack.
    1805                                  */
    1806                                 if (!fAttach)
    1807                                     vboxNetFltRetain(pThis, false /* fBusy */);
    18081809                                rc = strioctl(pIp4VNode, fAttach ? _I_INSERT : _I_REMOVE, (intptr_t)&StrMod, 0, K_TO_K,
    18091810                                            kcred, &ret);
     
    18541855                                         */
    18551856                                        if (fAttach)
    1856                                             strioctl(pIp4VNode, _I_REMOVE, (intptr_t)&StrMod, 0, K_TO_K, kcred, &ret);
     1857                                            strioctl(pArpVNode, _I_REMOVE, (intptr_t)&StrMod, 0, K_TO_K, kcred, &ret);
    18571858                                    }
    18581859                                    else
     
    18601861                                        LogRel((DEVICE_NAME ":vboxNetFltSolarisAttachIp4: failed to %s the ARP stack. rc=%d\n",
    18611862                                                fAttach ? "inject into" : "eject from", rc));
    1862                                         if (!fAttach)
    1863                                             vboxNetFltRelease(pThis, false /* fBusy */);
    18641863                                    }
    18651864
     
    18681867
    18691868                                    vboxNetFltSolarisRelinkIp4(pUdp4VNode, &Ip4Interface, Ip4MuxFd, ArpMuxFd);
     1869
     1870                                    if (!fAttach)
     1871                                        vboxNetFltRelease(pThis, false /* fBusy */);
    18701872                                }
    18711873                                else
     
    18731875                                    LogRel((DEVICE_NAME ":vboxNetFltSolarisAttachIp4: failed to %s the IP stack. rc=%d\n",
    18741876                                            fAttach ? "inject into" : "eject from", rc));
    1875                                     if (!fAttach)
    1876                                         vboxNetFltRelease(pThis, false /* fBusy */);
    18771877                                }
     1878
     1879                                g_VBoxNetFltSolarisInstance = NULL;
     1880                                g_VBoxNetFltSolarisStreamType = kUndefined;
     1881
     1882                                if (!fAttach)
     1883                                    vboxNetFltRelease(pThis, false /* fBusy */);
    18781884                            }
    18791885                            else
     
    20112017                            if (RT_SUCCESS(rc))
    20122018                            {
     2019                                if (!fAttach)
     2020                                    vboxNetFltRetain(pThis, false /* fBusy */);
     2021
    20132022                                /*
    20142023                                 * Set global data which will be grabbed by ModOpen.
     
    20182027                                g_VBoxNetFltSolarisInstance = pThis;
    20192028                                g_VBoxNetFltSolarisStreamType = kIp6Stream;
    2020 
    2021                                 if (!fAttach)
    2022                                     vboxNetFltRetain(pThis, false /* fBusy */);
    20232029
    20242030                                /*
Note: See TracChangeset for help on using the changeset viewer.

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