VirtualBox

Changeset 64307 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 17, 2016 6:49:15 PM (8 years ago)
Author:
vboxsync
Message:

NAT: bugref:8563: fixed bootp regression

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/bootp.c

    r64299 r64307  
    870870    size_t vlen;
    871871
    872     if (mlen < RT_OFFSETOF(struct bootp_t, bp_vend) + BOOTP_VENDOR_LEN)
     872    if (mlen < RT_OFFSETOF(struct bootp_t, bp_vend) + sizeof(rfc1533_cookie))
     873    {
     874        LogRelMax(50, ("NAT: ignoring invalid BOOTP request (mlen %u too short)\n", mlen));
    873875        return;
     876    }
    874877
    875878    if (bp->bp_op != BOOTP_REQUEST)
     879    {
     880        LogRelMax(50, ("NAT: ignoring invalid BOOTP request (wrong opcode %u)\n", bp->bp_op));
    876881        return;
     882    }
    877883
    878884    if (bp->bp_htype != RTNET_ARP_ETHER)
     885    {
     886        LogRelMax(50, ("NAT: ignoring invalid BOOTP request (wrong HW type %u)\n", bp->bp_htype));
    879887        return;
     888    }
    880889
    881890    if (bp->bp_hlen != ETH_ALEN)
     891    {
     892        LogRelMax(50, ("NAT: ignoring invalid BOOTP request (wrong HW address length %u)\n", bp->bp_hlen));
    882893        return;
     894    }
    883895
    884896    if (bp->bp_hops != 0)
     897    {
     898        LogRelMax(50, ("NAT: ignoring invalid BOOTP request (wrong hop count %u)\n", bp->bp_hops));
    885899        return;
     900    }
    886901
    887902    vlen = mlen - RT_OFFSETOF(struct bootp_t, bp_vend);
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