aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/config/netifd/files/lib
Commit message (Collapse)AuthorAgeFilesLines
* netifd: read udhcpc user scripts from directoryLeon M. George2021-04-171-0/+3
| | | | | | | | | | | | | | Placeholder DHCP user scripts were added recently. These files make package-based installations of such scripts more difficult. Pull user callbacks from directories instead to allow packages and users to install co-existing scripts more easily. References: 130118f7a netifd: add a udhcpc.user placeholder script Signed-off-by: Leon M. George <leon@georgemail.eu> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
* netifd: replace timesvr with timesrvSukru Senli2020-06-271-1/+7
| | | | | | | | /lib/netifd/dhcp.script: Keep support for 'timesvr' while also supporting 'timesrv' Add log message indicating deprecation of 'timesvr' Signed-off-by: Sukru Senli <sukru.senli@iopsys.eu>
* netifd: replace backticks by $(...)Adrian Schmutzler2020-05-131-1/+1
| | | | | | This replaces deprecated backticks by more versatile $(...) syntax. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* netifd/config.sh: remove some bashism (usage of [[)Sven Roederer2020-01-261-1/+1
| | | | | | | "[[" is a bash extension for test. As the ash-implementation is not fully compatible we drop its usage. Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
* netifd: dhcp proto convert release to noreleaseKevin Darbyshire-Bryant2019-11-201-5/+5
| | | | | | | | Change dhcp no/release on shutdown to 'norelease' uci option to match existing proto dhcpv6 usage. Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> Acked-by: Hans Dedecker <dedeckeh@gmail.com>
* netifd: add support for suppressing the DHCP request hostname by setting it to *Felix Fietkau2019-03-161-0/+2
| | | | | | | | | dnsmasq (and probably other DHCP servers as well) does not like to hand out leases with duplicate host names. Adding support for skipping the hostname makes it easier to deploy setups where it is not guaranteed to be unique Signed-off-by: Felix Fietkau <nbd@nbd.name>
* netifd: drop conflicting 'device' interface propertyIvan Shapovalov2018-06-011-3/+0
| | | | | | | | | | Do not set device runtime property on interfaces in the hotplug handler and in fixup_interfaces(). This property conflicts with device option in several proto handlers (mainly QMI and other WWAN/3G protos) and does not seem to be used anywhere. Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
* netifd: add udhcpc link check to dhcp shell handler scriptHans Dedecker2018-03-021-0/+2
| | | | | | | | Fixes the assumption the busybox udhcpc applet is always enabled; in case the symbolic link check fails the DHCP shell handler script will exit and as result the DHCP protocol handler will not be registered in netifd. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* netifd: support DHCP sendopts as list optionsHans Dedecker2018-02-271-5/+7
| | | | | | | | | | | Support config in the form of .... add_list sendopts=router:10.10.10.2 add_list sendopts=nissrv:20.20.20.2 add_list sendopts=0x7D:abba This allows to configure sendopts having white spaces as option value Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* netifd: add defaultreqopts config optionHans Dedecker2018-02-011-3/+5
| | | | | | | | | 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>
* netifd: update dhcp.script to handle dynamic routingMogula Pranay2018-01-101-1/+7
| | | | | | | | | | | | Certain DHCP servers push a gateway outside of the assigned interface subnet, to support those situations, install a host route towards the gateway. If Gateway and IP are served in same network, openwrt quagga cannot learn routes (rip routes are not getting added, showing inactive) whereas working fine when Gateway and IP are in different network. Signed-off-by: Mogula Pranay <mogula.pranay@nxp.com> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* netifd: always send DHCPv4 hostnameMathias Kresin2017-12-081-0/+1
| | | | | | | | | | | 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>
* netifd: fix dns and domain variables pollution in dhcp.scriptTero Jänkä2017-11-021-4/+6
| | | | | | | Unmodified dns and domain variables could be needed in user script (/etc/udhcpc.user). Signed-off-by: Tero Jänkä <tero.janka@gmail.com> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> (cleanup)
* netifd: fix fw3 warnings in dhcp scriptHans Dedecker2017-04-031-1/+1
| | | | | | Fix fw3 warnings in dhcp script in case fw3 is not enabled Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* netifd: Request DHCP option 121 (classless route) by defaultBaptiste Jonglez2016-10-261-2/+5
| | | | | | | | | | | | | | | | | | | 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>
* netifd: Use -x hostname:$hostname instead of -HMerlijn Wajer2016-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | 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>
* netifd: quote vendorid and hostname variables in dhcp scriptHans Dedecker2016-07-121-2/+2
| | | | | | | Quote hostname and vendorid variables in dhcp script so they can hold strings having white spaces Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* netifd: Remove hardcoded DHCP release optionHans Dedecker2016-05-111-1/+1
| | | | | | | 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>
* netifd: Add configurable DHCP release behaviorHans Dedecker2016-04-281-3/+5
| | | | | | | 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>
* netifd: Send DHCP release when client exitsHans Dedecker2016-03-311-1/+1
| | | | | | | | 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>
* netifd-dhcp: supply parameters to user-scriptFelix Fietkau2015-05-081-1/+1
| | | | | | | | | hand over parameters to user-script e.g. $1=deconfig Signed-off-by: Leon George <leon@georgemail.de> Signed-off-by: Christian Mehlis <christian@m3hlis.de> SVN-Revision: 45626
* dhcp: add option specifying overriding custom-routesSteven Barth2015-05-022-2/+8
| | | | | | Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 45594
* network: shorten names of generated interfacesSteven Barth2015-04-171-1/+1
| | | | | | Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 45476
* netifd: dhcp: install host route to gateway (#19182)Jo-Philipp Wich2015-03-151-0/+1
| | | | | | | | | Certain DHCP servers push a gateway outside of the assigned interface subnet, to support those situations install a host route towards the gateway. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 44789
* netifd: store additional DHCP lease informationJo-Philipp Wich2015-01-231-7/+7
| | | | | | | | | Extend the DHCPv4 handler script to store additional information from the DHCP lease in the per-interface data object. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 44092
* netifd: Set source IP for DHCP static routes as wellSteven Barth2014-12-121-2/+1
| | | | | | | | | | | | | Commit ce92f6650bd8a86db04c7a6cbb58e7fdb200a7e6 added source IP support for DHCP default routes. As a side effect of this change the default route could be present twice in netifd (once with source IP set and once with source IP unset) if it was sent by the server in both the router and static route options. Therefore add source IP support as well for static routes as this case was not considered. Additional remove unused parameter type. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> SVN-Revision: 43645
* This patch depends on "Pass source address to proto_add_ipv4_route".Steven Barth2014-12-081-1/+1
| | | | | | | | | I have not found a scenario that would break by setting the source address on default, but please let me know if any special considerations should be taken. Signed-off-by: Kristian Evensen <kristian.evensen at gmail.com> SVN-Revision: 43582
* netifd: fix default ORO-setting for 6rdSteven Barth2014-11-081-1/+1
| | | | | | Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 43214
* netifd: Make mtu configurable of dynamic 6rd tunnel interfaceSteven Barth2014-10-122-2/+5
| | | | | | | | | 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
* netifd: suppress fw3 warnings in dhcp scriptSteven Barth2014-07-301-1/+1
| | | | | | Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> SVN-Revision: 41892
* softwires: redesign dhcp(v6) provisioningSteven Barth2014-07-242-3/+15
| | | | | | Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 41823
* package: netifd: remove blank line at the end of fileJohn Crispin2014-06-021-1/+0
| | | | | | Signed-off-by: Zhao, Gang <gamerh2o@gmail.com> SVN-Revision: 40937
* netifd: Add renew handler for proto dhcpFelix Fietkau2014-04-051-0/+9
| | | | | | Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> SVN-Revision: 40385
* dhcp: Fix broadcast parameter validation support, remove unused netmask ↵John Crispin2014-03-301-2/+1
| | | | | | | | parameter Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> SVN-Revision: 40332
* 6rd / ds-lite: make the firewall-zones of nested-protocols configurableSteven Barth2014-03-262-2/+5
| | | | SVN-Revision: 40020
* dhcp: send 6rd-ORO when expecting 6rd-informationSteven Barth2014-03-261-0/+1
| | | | SVN-Revision: 40019
* netifd: pass on delegate flag from dhcp to 6rdSteven Barth2014-03-132-2/+5
| | | | SVN-Revision: 39909
* netifd: add validation supportJohn Crispin2014-02-181-9/+9
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 39621
* Convert DHCP->6rd and DHCPv6->DS-Lite autoconfig to dynamic interfaceSteven Barth2013-12-151-12/+11
| | | | SVN-Revision: 39061
* netifd: rename customopts to sendopts for consistencySteven Barth2013-10-171-4/+4
| | | | SVN-Revision: 38437
* Added 'customopts' dhcp protocol option, which is an array passed along to ↵Steven Barth2013-10-171-2/+7
| | | | | | | | udhcpc as series of -x options. Signed-off-by: Markus Stenberg <markus.stenberg@iki.fi> SVN-Revision: 38436
* netifd: fix typo in dhcp scriptSteven Barth2013-06-281-1/+1
| | | | SVN-Revision: 37051
* netifd: added support for setting up 6rd from DHCPSteven Barth2013-05-132-2/+28
| | | | SVN-Revision: 36626
* netifd: call /etc/udhcp.user from the netifd dhcp.scriptFelix Fietkau2012-12-151-0/+3
| | | | | | | | | This was done previously when dhcp was handled by the network scripts. So netifd should behave the same. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> SVN-Revision: 34704
* netifd: don't send a default client identifier in DHCP requests if no ↵Jo-Philipp Wich2012-11-051-2/+2
| | | | | | clientid uci option is given (#12426) SVN-Revision: 34089
* Fix broadcast DHCP client startup option in dhcp.shJohn Crispin2012-10-171-1/+1
| | | | | | | | Signed-off-by: Hans Dedecker (hans.dedecker at technicolor.com) Fixes the DHCP request broadcasts replies option parsing SVN-Revision: 33826
* packages: sort network related packages into package/network/Felix Fietkau2012-10-103-0/+187
SVN-Revision: 33688