aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/config/netifd/files
Commit message (Collapse)AuthorAgeFilesLines
* netifd: dhcp proto convert release to noreleaseKevin Darbyshire-Bryant2019-11-202-5/+28
| | | | | | | | 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,lldpd,rpcd,log: use generic service_runningPetr Štetiar2019-09-151-5/+0
| | | | | | | | | | | | | | | | | | commit eb204d14f75c ("base-files: implement generic service_running") introduced generic service_running so it's not needed to copy&paste same 3 lines over and over again. I've removed service_running from netifd/network init script as well, because it was not working properly, looked quite strange and I didn't understand the intention: $ /etc/init.d/network stop $ service network running && echo "yes" || echo "nope" ( have to wait for 30s ) Command failed: Request timed out yes Signed-off-by: Petr Štetiar <ynezz@true.cz>
* netifd: add support for the new ar8xxx MIB counters settingsPetr Štetiar2019-05-201-1/+3
| | | | | | | | | Commit "generic: ar8216: add mib_poll_interval switch attribute" has added mib_poll_interval global config option and commit "generic: ar8216: group MIB counters and use two basic ones only by default" has added mib_type config option. Signed-off-by: Petr Štetiar <ynezz@true.cz>
* 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: do not validate relevant section when ipv6 is not supportedRosy Song2018-09-251-2/+2
| | | | Signed-off-by: Rosy Song <rosysong@rosinson.com>
* netifd: drop conflicting 'device' interface propertyIvan Shapovalov2018-06-012-4/+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: update to the latest version, rewrite RPS/XPS handlingFelix Fietkau2018-02-281-0/+67
| | | | | | | | Remove RPS/XPS support from netifd core, move the logic to a hotplug script that uses a different policy which provides better performance and more fairness across flows Signed-off-by: Felix Fietkau <nbd@nbd.name>
* 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: return error status in reload_serviceHans Dedecker2017-04-241-1/+4
| | | | | | | | Based on a patch by Alexandru Ardelean. netifd ubus reload call returns the actual reload error status; return error status as well in reload_service Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* 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: fix stopping netifd + interfacesFelix Fietkau2017-02-231-10/+3
| | | | | | | stop() is overwritten by rc.common, so implement stop_service instead. While at it, remove the now unnecessary restart() override Signed-off-by: Felix Fietkau <nbd@nbd.name>
* 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: ifup-shellscript - fix wrong usage of 'local'Felix Fietkau2015-12-101-3/+1
| | | | | | | | | | | | | | | | | | this error was not visible until recent bump to busybox 1.24.1 stable which introduced a warning message when keyword 'local' is not used with a shell-function. this does not change behavior and is a cosmetic cleanup. fixes the following output: root@box:~ ifup <interface> /sbin/ifup: local: line 362: not in a function /sbin/ifup: local: line 362: not in a function /sbin/ifup: local: line 1: not in a function Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com> SVN-Revision: 47828
* base-files: set kernel.core_pattern in sysctl.confFelix Fietkau2015-09-111-1/+0
| | | | | | | | | | Move the pattern setting from netifd's service script to /etc/sysctl.conf. Put the timestamp component '%t' just after executable name '%e' for more natural order from output of ls command. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> SVN-Revision: 46867
* 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: do not stop service on shutdown, only call ifdownFelix Fietkau2015-01-241-1/+1
| | | | | | | | Also add a small delay, like on restart Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 44096
* 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: fix an error message during network shutdownSteven Barth2014-10-021-1/+2
| | | | | | | | | | | | | When 'wifi down' is called by /etc/init.d/network, it is run from stop_service( ). This function is in turn invoked from stop( ). stop( ) messes up the order by first procd_kill-ing the network settings, then calling wifi to down the wifi networking interfaces. By redefining stop( ) instead, the proper order is restored. Signed-off-by: Michel Stam <m.stam@fugro.nl> SVN-Revision: 42745
* package/*: remove useless explicit set of function returncodeJohn Crispin2014-08-251-14/+0
| | | | | | | | | | | | | | | | | | | | | | somebody started to set a function returncode in the validation stuff and everybody copies it, e.g. myfunction() { fire_command return $? } a function automatically returns with the last returncode, so we can safely remove the command 'return $?'. reference: http://tldp.org/LDP/abs/html/exit-status.html "The last command executed in the function or script determines the exit status." Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com> SVN-Revision: 42278
* 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
* netifd: use procd_add_reload_triggerFelix Fietkau2014-06-111-4/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 41147
* netfid: make procd watch the network.interface object for eventsJohn Crispin2014-06-051-0/+1
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 41010
* 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: replace the sleep 5 with an ubus wait_for call to speed up init scriptFelix Fietkau2014-05-311-1/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 40891
* 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: fix validation constraintsJo-Philipp Wich2014-02-211-15/+15
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 39648
* netifd: add validation supportJohn Crispin2014-02-182-9/+114
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 39621
* netifd: initialize the switch early at start time and on reload (fixes #13015)Felix Fietkau2013-12-311-6/+10
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 39183