summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2015-05-23interface: minor fix for unnecessary ++ operation.Yousong Zhou
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2015-05-23interface: remove redundant iface_attr_info.Yousong Zhou
BLOBMSG_TYPE_STRING is the default type for elements of BLOBMSG_TYPE_ARRAY. Array type IFACE_ATTR_DNS_SEARCH was already missing there, so drop the whole part anyway. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2015-05-23system: fix typo in returning address length.Yousong Zhou
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2015-05-19linux: add compat-define for IFA_F_NOPREFIXROUTESteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2015-05-19ipv6: use kernel >= 3.14 handling of offlink-addressesSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2015-05-12netifd: Support for configurable default packet steering behaviorHans Dedecker
The default packet steering behavior can be configured via the parameter default_ps in the global section; the default value is true to keep backwards compatibility. Device packet steering (rps/xps) config can still be used to override the default behavior. This allows you to disable packet steering for all devices without the need to define a device config list which disables receive/transmit packet steering Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2015-04-21proto-shell: retry setup if the proto handler script quits without changing ↵Felix Fietkau
the state or starting a process Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-04-19interface: remove obsolete device config apply codeFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-04-19interface: allow an interface to specify device configs even when there are ↵Felix Fietkau
other interfaces attached to the same device Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-04-19netifd: fix an uninitialized variableFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-04-18device: add support for removing interface config on reloadFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-04-18interface: detect and handle changes in device configFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-04-17utils.h: remove leftover commented out codeFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-04-17device: remove DEV_ATTR_IFNAME, it is unusedFelix Fietkau
Ensures that interfaces with only 'ifname' matching the device config don't cause iface->device_config to be set Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-04-14Cleanup issues reported by scan-buildSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2015-04-03netifd: Interface last error supportHans Dedecker
Adds interface last error support which preserves the last reported error reported by the protocol handler till the interface is up; e.g. survives network reload and interface restarts. This is mainly usefull for tracking down why an interface fails to establish; eg auth failure/traffic limit for PPP interfaces Protocol handlers register last error support by setting lasterror=1 in the proto_init function Signed-off-by: Johan Peeters <johan.peeters111@gmail.com> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2015-03-31Revert "linux: adjust default policy rules"Steven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2015-03-31netifd: add metric argument for proto_add_ipv4_routeSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2015-03-27linux: adjust default policy rulesSteven Barth
2015-03-23bridge: allow enabling or disabling the multicast querier independently of ↵Matthias Schiffer
IGMP snooping In larger networks, especially big batman-adv meshes, it may be desirable to enable IGMP snooping on every bridge without enabling the multicast querier to specifically put the querier on a well-connected node. This patch adds a new UCI option 'multicast_querier' for bridges which allows this. The default is still the value of the 'igmp_snooping' option to maintain backwards compatiblity. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2015-03-22device: fix default initialization for RPS/XPSFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-03-22device: add support for configuring RPS/XPS (enabled by default if available)Felix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-03-21Fix regression with IPv6 source-dest-routesSteven Barth
2015-03-19add missing argument for ipv4 routesSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2015-03-19Add table argument to shell API for routesSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2015-03-19add prelocal table to manipulate locally destinated trafficSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2015-03-19netifd:Make sure interface device config is also cachedHans Dedecker
Fixes issue interface device config is not applied in some cases. As the interface device config was applied but not always cached; an interface device config diff was not always detected. Simplify device config setting by exposing as api only device_apply_config Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2015-03-06netifd: fixes for json-c 0.12John Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2015-02-28wireless: fix teardown, always pass the previous config to the teardown ↵Felix Fietkau
handler instead of the new one Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-02-17netifd: Set interface device config when device has old settingsHans Dedecker
If interface device settings are removed in UCI they were not removed in the device settings; calling device_set_config when device settings are present solves this. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2015-02-17netifd: Keep reference to a config copy in device type specific reload ↵Hans Dedecker
handler as the original config pointer might go stale Fixes random observed crashes in blobmsg_parse when device type specific config data is parsed. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2015-02-17netifd: Fix possible hotplug race conditionsHans Dedecker
Don't drop ifup/ifdown events in case an interface event is cached as it leads to possible race conditions (eg firewall not being reloaded as ifup is dropped) when multiple interface events are fired in a short timeframe (eg multiple PPP link flaps). Always overwrite the cached interface event except for the interface update event so the hotplug scripts are launched with the last known status. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2015-02-16utils.c: add missing includeFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-02-16Revert "interface: do not set device_config where only the ifname option ↵Felix Fietkau
matches" This reverts commit 8dd2eedafccc9f898d391b93a59efb1412c5b5e9. This commit was reported to cause a regression with setting MTU on interfaces. Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-02-09netifd: Add option to configure base_reachable_time_ms for each deviceHans Dedecker
The UCI parameter neighreachabletime allows to control the hardware address to IP mapping lifetime in the neighbour table for both IPv4 and IPv6 Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> Signed-off-by: Jean-Francois Remy <jeff@melix.org>
2015-02-09netifd: Remove unnecessary default_config check in config_parse_interfaceHans Dedecker
No need to check default_config twice as it's already checked in config_parse_interface Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2015-02-09netifd: set current_config for simple devices when parsing device configHans Dedecker
If currrent_config is not set when the simple device config is applied the device will be deleted in device_reset_old Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2015-01-24Revert "vlan: reset device state on init"Felix Fietkau
This is causing a regression with some VLAN configurations This reverts commit a4445215e06ee3056427effbef617f4525ee1836.
2015-01-24device: force changes to be applied via state change if necessaryFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-01-24interface: suppress unnecessary device config overridesFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-01-24interface: apply device config passed through interface configFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-01-24device: simplify config blob memory allocation handlingFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-01-24interface: do not set device_config where only the ifname option matchesFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-01-24vlan: reset device state on initFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-01-24device: apply config changes from device sectionsFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-01-24device: move config apply handling to a helper functionFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-01-23device: set dev->default_config to false for devices parsed from configFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-01-23device: add support for specifying a configuration for simple vlan devicesFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-01-23bridge: fix retrying member enable when the bridge is otherwise emptyFelix Fietkau
Ensure that the bridge gets created before retrying Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-01-23bridge: mark tested members as present during enable retryFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>