Ignore:
Timestamp:
Dec 20, 2016, 4:07:32 PM (7 years ago)
Author:
Bruno Cornec
Message:

New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.

Location:
branches/3.3
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/3.3/mindi-busybox/networking/udhcp/arpping.c

    r3232 r3621  
    4040        uint32_t from_ip,
    4141        uint8_t *from_mac,
    42         const char *interface)
     42        const char *interface,
     43        unsigned timeo)
    4344{
    4445    int timeout_ms;
     
    4849    struct sockaddr addr;   /* for interface name */
    4950    struct arpMsg arp;
     51
     52    if (!timeo)
     53        return 1;
    5054
    5155    s = socket(PF_PACKET, SOCK_PACKET, htons(ETH_P_ARP));
     
    8488
    8589    /* wait for arp reply, and check it */
    86     timeout_ms = 2000;
     90    timeout_ms = (int)timeo;
    8791    do {
    8892        typedef uint32_t aliased_uint32_t FIX_ALIASING;
     
    125129         * (people did see overflows here when system time jumps):
    126130         */
    127     } while ((unsigned)timeout_ms <= 2000);
     131    } while ((unsigned)timeout_ms <= timeo);
    128132
    129133 ret:
    130134    close(s);
    131     log1("%srp reply received for this address", rv ? "No a" : "A");
     135    log1("%srp reply received for this address", rv ? "no a" : "A");
    132136    return rv;
    133137}
Note: See TracChangeset for help on using the changeset viewer.