Commit Graph

25 Commits (60e07ffec5d797ffae4417a8b8fc1854158e8faf)

Author SHA1 Message Date
Hans Dedecker 60e07ffec5 netifd: add defaultreqopts config option
By default udhcpc asks for a default list of options; the config option
defaultreqopts allows to tweak this behavior.
When set to 0 udhcpc will not ask for any options except for the options
specified in the reqopts config option.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Mathias Kresin abdf0dea3a netifd: always send DHCPv4 hostname
udhcpc doesn't send a hostname by default. Use the system hostname if
nothing else is specified, to always send a hostname.

It syncs the behaviour to odhcpc, which always sends a hostname.

Signed-off-by: Mathias Kresin <dev@kresin.me>
Acked-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Hans Dedecker <dedeckeh@gmail.com>
7 years ago
Baptiste Jonglez 89817614bb netifd: Request DHCP option 121 (classless route) by default
This option, defined by RFC3442, allows a DHCP server to send static
routes to a client.  But the client has to request this option
explicitely.

Static routes are useful when the gateway configured by DHCP cannot be
in the same subnet as the client.  This happens, for instance, when
using DHCP to hand out addresses in /32 subnets.

A new configuration option "classlessroute" is available, allowing
users to disable this feature (the option defaults to true).

Other DHCP clients already request this option by default (dhcpcd, for
instance, and possibly Windows).  If a DHCP server does not support
this option, it will simply ignore it.

Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
8 years ago
Merlijn Wajer 4a0c4d8151 netifd: Use -x hostname:$hostname instead of -H
Passing the hostname is currently broken in since the shipped busybox includes this commit:
https://git.busybox.net/busybox/commit/networking/udhcp/dhcpc.c?id=2017d48c0d70bef8768efb42909e605ea8eb5a21

Before:

    Sun Jan 31 18:11:32 2016 daemon.notice netifd: Interface 'wan' is now down
    Sun Jan 31 18:11:32 2016 daemon.notice netifd: Interface 'wan' is setting up now
    Sun Jan 31 18:11:32 2016 daemon.notice netifd: wan (18158): udhcpc: option -h NAME is deprecated, use -x hostname:NAME
    Sun Jan 31 18:11:32 2016 daemon.notice netifd: wan (18158): udhcpc: malformed hex string 'WR150'

After:

    Sun Jan 31 18:11:33 2016 daemon.notice netifd: wan (18169): udhcpc (v1.23.2) started
    Sun Jan 31 18:11:33 2016 daemon.notice netifd: wan (18169): Sending discover...
    Sun Jan 31 18:11:33 2016 daemon.notice netifd: wan (18169): Sending select for xxx.yyy.zzz.xyz...
    Sun Jan 31 18:11:33 2016 daemon.notice netifd: wan (18169): Lease of xxx.yyy.zzz.xyz obtained, lease time 600

Signed-off-by: Merlijn Wajer <merlijn@wizzup.org>
8 years ago
Hans Dedecker 99e5bec2c6 netifd: quote vendorid and hostname variables in dhcp script
Quote hostname and vendorid variables in dhcp script so they can
hold strings having white spaces

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
8 years ago
Hans Dedecker f9a3123bbf netifd: Remove hardcoded DHCP release option
Remove the udhcpc -R release option as sending a DHCP release
is configurable via the uci option release.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
8 years ago
Hans Dedecker a83f049b5b netifd: Add configurable DHCP release behavior
Make sending a DHCP release configurable when the client exits allowing to clean up
IP/mac state info in intermediate devices.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
8 years ago
Hans Dedecker 81a5f1ac9e netifd: Send DHCP release when client exits
Let DHCP client send a release when it exists so the DHCP server is
informed the IP address is released and allowing to clean up IP/mac
state info in intermediate devices.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
8 years ago
Steven Barth a132313238 dhcp: add option specifying overriding custom-routes
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 45594
9 years ago
Steven Barth 990b501ec4 netifd: fix default ORO-setting for 6rd
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 43214
10 years ago
Steven Barth 9106cc0af9 netifd: Make mtu configurable of dynamic 6rd tunnel interface
Patch allows to configure the mtu of the dynamic 6rd tunnel interface when created by dhcp script.
In some setups it's desirable to have config control over the 6rd tunnel mtu to maximize the traffic throughput

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

SVN-Revision: 42871
10 years ago
Steven Barth 9231df5665 softwires: redesign dhcp(v6) provisioning
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 41823
10 years ago
John Crispin 40218343cd package: netifd: remove blank line at the end of file
Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>

SVN-Revision: 40937
10 years ago
Felix Fietkau dca014db76 netifd: Add renew handler for proto dhcp
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>

SVN-Revision: 40385
10 years ago
John Crispin c7168b64ef dhcp: Fix broadcast parameter validation support, remove unused netmask parameter
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

SVN-Revision: 40332
10 years ago
Steven Barth 0555ebf66d 6rd / ds-lite: make the firewall-zones of nested-protocols configurable
SVN-Revision: 40020
10 years ago
Steven Barth 2a893c2057 dhcp: send 6rd-ORO when expecting 6rd-information
SVN-Revision: 40019
10 years ago
Steven Barth edd75e332c netifd: pass on delegate flag from dhcp to 6rd
SVN-Revision: 39909
10 years ago
John Crispin 8fb44e0d1e netifd: add validation support
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 39621
10 years ago
Steven Barth 56bc536713 netifd: rename customopts to sendopts for consistency
SVN-Revision: 38437
11 years ago
Steven Barth c759b49a4f Added 'customopts' dhcp protocol option, which is an array passed along to udhcpc as series of -x options.
Signed-off-by: Markus Stenberg <markus.stenberg@iki.fi>

SVN-Revision: 38436
11 years ago
Steven Barth ea71678b09 netifd: added support for setting up 6rd from DHCP
SVN-Revision: 36626
11 years ago
Jo-Philipp Wich 611b2e8bb3 netifd: don't send a default client identifier in DHCP requests if no clientid uci option is given (#12426)
SVN-Revision: 34089
12 years ago
John Crispin c2b8d1a619 Fix broadcast DHCP client startup option in dhcp.sh
Signed-off-by: Hans Dedecker (hans.dedecker at technicolor.com)

Fixes the DHCP request broadcasts replies option parsing

SVN-Revision: 33826
12 years ago
Felix Fietkau 405e21d167 packages: sort network related packages into package/network/
SVN-Revision: 33688
12 years ago