VirtualBox

Ignore:
Timestamp:
Dec 9, 2008 4:51:30 PM (16 years ago)
Author:
vboxsync
Message:

Linux hostif: hopefully fixed the problem for 64-bit host platforms. Removed some warnings as well.

File:
1 edited

Legend:

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

    r14968 r15193  
    4848
    4949#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
    50 # define VBOX_SKB_TRANSPORT_HDR(skb) skb->transport_header
    51 # define VBOX_SKB_NETWORK_HDR(skb) skb->network_header
    52 # define VBOX_SKB_MAC_HDR(skb) skb->mac_header
     50# define VBOX_SKB_RESET_NETWORK_HDR(skb) skb_reset_network_header(skb)
     51# define VBOX_SKB_RESET_MAC_HDR(skb) skb_reset_mac_header(skb)
    5352#else /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) */
    54 # define VBOX_SKB_TRANSPORT_HDR(skb) skb->h.raw
    55 # define VBOX_SKB_NETWORK_HDR(skb) skb->nh.raw
    56 # define VBOX_SKB_MAC_HDR(skb) skb->mac.raw
     53# define VBOX_SKB_RESET_NETWORK_HDR(skb) skb->nh.raw = skb->data
     54# define VBOX_SKB_RESET_MAC_HDR(skb) skb->mac.raw = skb->data
    5755#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) */
    5856
     
    313311        if (fDstWire)
    314312        {
    315             VBOX_SKB_NETWORK_HDR(pPkt) = pPkt->data;
     313            VBOX_SKB_RESET_NETWORK_HDR(pPkt);
    316314            /* Restore ethernet header back. */
    317315            skb_push(pPkt, ETH_HLEN);
    318316        }
     317        VBOX_SKB_RESET_MAC_HDR(pPkt);
    319318        VBOXNETFLT_SKB_CB(pPkt) = VBOXNETFLT_CB_TAG;
    320319
     
    714713
    715714{
    716     int rc;
     715    int rc = NOTIFY_OK;
    717716#ifdef DEBUG
    718717    char *pszEvent = "<unknown>";
     
    884883        if (fActive)
    885884        {
    886             int err = 0;
    887885            Assert(!pThis->u.s.fPromiscuousSet);
    888886
     
    895893            {
    896894                rtnl_lock();
    897                 err = dev_change_flags(pDev, fIf | IFF_UP);
     895                int err = dev_change_flags(pDev, fIf | IFF_UP);
    898896                rtnl_unlock();
    899897                fIf = dev_get_flags(pDev);
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