~ubuntu-branches/ubuntu/raring/virtualbox-ose/raring

« back to all changes in this revision

Viewing changes to src/VBox/HostDrivers/VBoxNetFlt/freebsd/VBoxNetFlt-freebsd.c

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-01-30 23:27:25 UTC
  • mfrom: (0.3.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20110130232725-2ouajjd2ggdet0zd
Tags: 4.0.2-dfsg-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add Apport hook.
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Drop *-source packages.
* Drop ubuntu-01-fix-build-gcc45.patch, fixed upstream.
* Drop ubuntu-02-as-needed.patch, added to the Debian package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: VBoxNetFlt-freebsd.c $ */
 
1
/* $Id: VBoxNetFlt-freebsd.c 30111 2010-06-09 12:14:59Z vboxsync $ */
2
2
/** @file
3
3
 * VBoxNetFlt - Network Filter Driver (Host), FreeBSD Specific Code.
4
4
 */
497
497
    bool fActive;
498
498
    int error;
499
499
 
500
 
    ifp = (void *)ASMAtomicUoReadPtr((void * volatile *)&pThis->u.s.ifp);
 
500
    ifp = ASMAtomicUoReadPtrT(&pThis->u.s.ifp, struct ifnet *);
501
501
 
502
502
    if (fDst & INTNETTRUNKDIR_WIRE)
503
503
    {
567
567
 
568
568
    RTSpinlockAcquireNoInts(pThis->hSpinlock, &Tmp);
569
569
 
570
 
    ASMAtomicUoWritePtr((void * volatile *)&pThis->u.s.ifp, ifp);
 
570
    ASMAtomicUoWritePtr(&pThis->u.s.ifp, ifp);
571
571
    pThis->u.s.node = node;
572
572
    bcopy(IF_LLADDR(ifp), &pThis->u.s.MacAddr, ETHER_ADDR_LEN);
573
573
    ASMAtomicUoWriteBool(&pThis->fDisconnectedFromHost, false);
610
610
{
611
611
    struct ifnet *ifp, *ifp0;
612
612
 
613
 
    ifp = (struct ifnet *)ASMAtomicUoReadPtr((void * volatile *)&pThis->u.s.ifp);
 
613
    ifp = ASMAtomicUoReadPtrT(&pThis->u.s.ifp, struct ifnet *);
614
614
    /*
615
615
     * Attempt to check if the interface is still there and re-initialize if
616
616
     * something has changed.
668
668
 
669
669
    Log(("%s: fActive:%d\n", __func__, fActive));
670
670
 
671
 
    ifp = (struct ifnet *)ASMAtomicUoReadPtr((void * volatile *)&pThis->u.s.ifp);
672
 
    node = (node_p)ASMAtomicUoReadPtr((void * volatile *)&pThis->u.s.node);
 
671
    ifp = ASMAtomicUoReadPtrT(&pThis->u.s.ifp, struct ifnet *);
 
672
    node = ASMAtomicUoReadPtrT(&pThis->u.s.node, node_p);
673
673
 
674
674
    memset(&ifreq, 0, sizeof(struct ifreq));
675
675
    /* Activate interface */