~ubuntu-branches/ubuntu/vivid/virtualbox-ose/vivid

« back to all changes in this revision

Viewing changes to src/VBox/Devices/Network/slirp/bootp.c

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2010-03-11 17:16:37 UTC
  • mfrom: (0.3.4 upstream) (0.4.8 sid)
  • Revision ID: james.westby@ubuntu.com-20100311171637-43z64ia3ccpj8vqn
Tags: 3.1.4-dfsg-2ubuntu1
* Merge from Debian unstable (LP: #528561), remaining changes:
  - VirtualBox should go in Accessories, not in System tools (LP: #288590)
    - debian/virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add Apport hook
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Add Launchpad integration
    - debian/control
    - debian/lpi-bug.xpm
    - debian/patches/u02-lp-integration.dpatch
  - Replace *-source packages with transitional packages for *-dkms
* Fix crash in vboxvideo_drm with kernel 2.6.33 / backported drm code
  (LP: #535297)
* Add a list of linux-headers packages to the apport hook
* Update debian/patches/u02-lp-integration.dpatch with a
  DEP-3 compliant header
* Add ${misc:Depends} to virtualbox-ose-source and virtualbox-ose-guest-source
  Depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
188
188
    memset(rbp, 0, sizeof(struct bootp_t));
189
189
    rbp->bp_op = BOOTP_REPLY;
190
190
    rbp->bp_xid = bp->bp_xid; /* see table 3 of rfc2131*/
191
 
    rbp->bp_flags = bp->bp_flags;
 
191
    rbp->bp_flags = bp->bp_flags; /* figure 2 of rfc2131 */
192
192
    rbp->bp_giaddr.s_addr = bp->bp_giaddr.s_addr;
193
193
#if 0 /*check flags*/
194
194
    saddr.sin_port = htons(BOOTP_SERVER);
420
420
        }
421
421
        else
422
422
        {
423
 
            /*see table 4 rfc2131*/
424
 
            if (bp->bp_flags & DHCP_FLAGS_B)
 
423
            /* table 4 of rfc2131 */
 
424
            if (bp->bp_flags & RT_H2N_U16_C(DHCP_FLAGS_B))
425
425
                dhcp_stat = REBINDING;
426
426
            else
427
427
                dhcp_stat = RENEWING;
728
728
             - sizeof(struct udphdr);
729
729
    m->m_data += sizeof(struct udphdr)
730
730
               + sizeof(struct ip);
731
 
    if ((flags & DHCP_FLAGS_B) || nack != 0)
 
731
    if (   (flags & RT_H2N_U16_C(DHCP_FLAGS_B))
 
732
        || nack != 0)
732
733
        daddr.sin_addr.s_addr = INADDR_BROADCAST;
733
734
    else
734
735
        daddr.sin_addr.s_addr = rbp->bp_yiaddr.s_addr; /*unicast requested by client*/