[Bug 10946] Add support for "Merit Dump" DHCP option

bugzilla at busybox.net bugzilla at busybox.net
Fri Apr 13 11:20:49 UTC 2018


https://bugs.busybox.net/show_bug.cgi?id=10946

Denys Vlasenko <vda.linux at googlemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #1 from Denys Vlasenko <vda.linux at googlemail.com> ---
I added support for arbitrary options to be specified as strings:

BusyBox v1.29.0.git (2018-04-01 19:58:41 CEST) multi-call binary.

Usage: udhcpc [-fbqvRB] [-a[MSEC]] [-t N] [-T SEC] [-A SEC/-n]
        [-i IFACE] [-s PROG] [-p PIDFILE]
        [-oC] [-r IP] [-V VENDOR] [-F NAME] [-x OPT:VAL]... [-O OPT]...

        -i IFACE        Interface to use (default eth0)
        -s PROG         Run PROG at DHCP events (default
/usr/share/udhcpc/default.script)
        -p FILE         Create pidfile
        -B              Request broadcast replies
        -t N            Send up to N discover packets (default 3)
        -T SEC          Pause between packets (default 3)
        -A SEC          Wait if lease is not obtained (default 20)
        -n              Exit if lease is not obtained
        -q              Exit after obtaining lease
        -R              Release IP on exit
        -f              Run in foreground
        -b              Background if lease is not obtained
        -S              Log to syslog too
        -a[MSEC]        Validate offered address with ARP ping
        -r IP           Request this IP address
        -o              Don't request any options (unless -O is given)
        -O OPT          Request option OPT from server (cumulative)
        -x OPT:VAL      Include option OPT in sent packets (cumulative)
                        Examples of string, numeric, and hex byte opts:
                        -x hostname:bbox - option 12
                        -x lease:3600 - option 51 (lease time)
                        -x 0x3d:0100BEEFC0FFEE - option 61 (client id)
                        -x 14:'"dumpfile"' - option 14 (shell-quoted)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        -F NAME         Ask server to update DNS mapping for NAME
        -V VENDOR       Vendor identifier (default 'udhcp VERSION')
        -C              Don't send MAC as client identifier
        -v              Verbose


examples/udhcp/udhcpd.conf:
 .........
 option lease   864000          # default: 10 days
 option msstaticroutes  10.0.0.0/8 10.127.0.1           # single static route
 option staticroutes    10.0.0.0/8 10.127.0.1, 10.11.12.0/24 10.11.12.1
 # Arbitrary option in hex or string form:
 option 0x08    01020304        # option 8: "cookie server IP addr: 1.2.3.4"
 option 14      "dumpfile"

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list