summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2014-10-04wireless: print the active configuration in status infoFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-10-04wireless: fix blob buf in put_container()Felix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-10-04wireless: display anonymous interface section names using index based ↵Felix Fietkau
extended syntax Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-10-04wireless: copy the vif section name instead of keeping a reference that ↵Felix Fietkau
might go stale Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-10-02netifd: IPIP tunnel supportHans Dedecker
Adds IPIP tunnel support to netifd. Following IPIP tunnel parameters can be configured : -peeraddr (IPv4 remote address) -ipaddr (IPv4 local address) -mtu (IPIP tunnel mtu) -ttl (time to live of encapsulting packets) -tos (type of service either inherit (outer header inherits the value of the inner header) or hex value) -df (don't fragment flag of encapsulating packets) -tunlink (bind tunnel to this interface) Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-09-29netifd: GRE Tos supportHans Dedecker
Tos support is added as a generic gre parameter which can have the following values : -inherit (outer header inherits the tos value of the inner header) -hex value Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-09-17netifd-device: add support for promisc settingMartin Hundebøll
Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
2014-09-08ipv6: work around kernel on-link handling issueSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2014-08-31interface: call proto teardown before marking the interface as downFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-08-31interface: do not try to bring up an unavailable interfaceFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-08-31interface: cancel the remove timer on cleanupFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-08-31proto-shell: also set proto_task_killed for SIGKILLFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-08-31proto-shell: set proto_task_killed for SIGTERM onlyUlrich Weber
otherwise teardown will not kill the process if the interface was renewed before, which set proto_task_killed Signed-off-by: Ulrich Weber <uw@ocedo.com>
2014-08-13handler: explicitly include json.hFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-08-13ipv6: assign prefixes with length <64 with /64 on-link routesSteven Barth
on-link routes for prefixes bigger than /64 make no sense and might confuse some users Signed-off-by: Steven Barth <steven@midlink.org>
2014-08-07netifd: More fine grained handling of unwanted proto shell actionsHans Dedecker
In commit e1ec2d2b9e7f7692a4ff88a0361bbcdbe34f0d99 (proto-shell: extend race condition avoidance), changes were made to prevent notifications from the proto handler during the proto shell states teardown and abort. These changes unfortunately also prevent netifd from being notified of a number of proto handler events like notify_error, blok_restart and kill during the teardown state. This introduces issues when the protocol is ppp, the authfail UCI parameter is set and authentication fails; the interface autostart parameter cannot be set to disabled while the ppp daemon keeps running as these proto handler notifications are dropped in the teardown state. The attached patch blocks the notifications in the individual notification handlers which should not get notifications during teardown/abort state and allows notify_error/blok_restart/kill notifications during these states. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-08-06Disable new-style tunnel creation for older kernelsSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2014-08-05netifd: Accept notify errors in proto_shell teardown or abort stateHans Dedecker
In commit e1ec2d2b9e7f7692a4ff88a0361bbcdbe34f0d99 (proto-shell: extend race condition avoidance), changes were made to prevent notifications from the proto handler during teardown. According to the comments, this was done to avoid the shell proto state being reset to S_IDLE and the interface hanging in IFS_TEARDOWN state. These changes unfortunately also prevent netifd from being notified of the errors (proto_shell_notify_error) that actually caused the teardown. This is for instance an issue when the protocol is ppp and e.g. PAP/CHAP authentication fails. Since proto_shell_notify_error does not touch the proto state, it seems like a good idea to at least allow these notifications in teardown state. The attached patch accomplishes this. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> Signed-off-by: Joeri Barbarien <joeri.barbarien@gmail.com>
2014-08-05netifd: fix incorrect number of bytes memset in clear_if_addrHans Dedecker
Fix clear_if_addr for IPv6 addresses as an incorrect number of bytes were memset due to wrong sizeof argument Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-07-30netifd: GRE tunnel supportHans Dedecker
Adds support for gre, gretap, grev6 and grev6tap tunnels Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-07-30netifd: Allow to add link devices which can be marked as non externalHans Dedecker
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-07-30netifd: Set device down based on being a non external device in device_releaseHans Dedecker
Line up the device state manipulation by checking the external device parameter consistent and not the hotplug device parameter Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-07-29add_dynamic: remove redundant codeSteven Barth
device_config is unneeded since add_dynamic is used to create aliases checking of setup state is unneeded because of race condition fixes Signed-off-by: Steven Barth <steven@midlink.org>
2014-07-29proto-shell: extend race condition avoidanceSteven Barth
Disallow all notifications from the proto handler during teardown to avoid the shell proto state being reset to S_IDLE and the interface hanging in IFS_TEARDOWN state. Signed-off-by: Steven Barth <steven@midlink.org>
2014-07-28ubus: add del_dynamic as complement to add_dynamicSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2014-07-27interface: enable force_link by default for proto=staticFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-07-26proto-shell: fix renew_pending handlingFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-07-26proto-shell: fix setup/renew race conditionFelix Fietkau
If a renew event arrives before the setup event has been processed, the renew event needs to be deferred, otherwise interfaces can get stuck Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-07-25Only add dynamic interfaces if the underlying interface is readySteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2014-07-24proto-shell: don't accept up-notifications in teardown stateSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2014-07-24interface: fix restart after reload with external devicesFelix Fietkau
When an interface goes down, the main_dev is reset to NULL. Track an externally added device separately to be able to bring it back up. Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-07-24bridge: enable multicast querier functionality by defaultFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-07-23Set DEVICE for legacy ifupdate event as wellSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2014-07-23Make dynamic interfaces always autostartSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2014-07-18scripts: set type for the "key" attributeFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-07-17bridge: enable IGMP snooping by defaultFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-06-29interface: clean up l3 device reference on remove/reloadFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-06-29bridge: enable multicast_to_unicast on all wireless bridge portsFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-06-26device: fall back to simple interface status check if not provided by the ↵Felix Fietkau
device type Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-06-26interface: fix indentationFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-06-26proto-shell: add debug msg for calling handlersFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-06-26system-dummy: set present flags on all devicesFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-06-20interface: don't store table id in route if the default table is usedSteven Barth
Use system_is_default_rt_table() to test whether the resolved routing table is the default one, in this case do not apply the table attribute to the route object. This is needed for backwards compatibility - only routes using a non-default table shall report it in the ifstatus output. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2014-06-20system: fix treatment of RT_TABLE_MAINSteven Barth
Do not treat RT_TABLE_MAIN as RT_TABLE_UNSPEC in system_resolve_rt_table() in order to allow ip rules with lookup main to work as expected. Provide a new function system_is_default_rt_table() to allow calling code to specifically test for RT_TABLE_MAIN, this is going to be needed for the backwards compatible handling of the table attribute in route objects. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2014-06-18linux: unify functions to delete linksSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2014-06-18netifd: Route type supportHans Dedecker
Patch adds route type support in netifd by means of the route parameter type. By default the route type was unicast; the parameter adss support for local/broadcast/multicast/unicast routes which will be put into the appropriate routing table. If route type parameter is unset the route type will be unicast as before. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-06-18netifd: Check device_claim return code in all casesHans Dedecker
Fixes observed issue a tunnel interface is reported as up although device_claim failed Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-06-18netifd: Fix ipip6 tunnel memleak in case of tunnel creation failureHans Dedecker
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-06-18netifd: Fix macvlan delete via netlinkHans Dedecker
Fix macvlan delete via netlink as netlink attribute IFLA_IFNAME data size was incorrect (size reject by the kernel) and NLM_F_REQUEST flag was missing. In addition some minor improvements (attribute IFLA_INFO_KIND can be left out as RTM_DELLINK does not require the attribute) Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-06-18netifd: Fix vlan delete via netlinkHans Dedecker
Fix vlan delete via netlink as netlink attribute IFLA_IFNAME data size was incorrect. In addition some minor improvements. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>