summaryrefslogtreecommitdiffhomepage
path: root/interface.h
AgeCommit message (Collapse)Author
2016-01-17netifd: Do not add local/source policy rules multiple timesKristian Evensen
interface_ip_set_enabled() is usually called two times right after one another, once to handle config_ip and once to handle proto_ip. As long as ip->iface->l3_dev.dev is set, the local/source policy rules are updated. This value is in several cases set on both config_ip and proto_ip, causing the rules to be added multiple time. The reason is that the kernel does not respect the NLM_F_* flag for rules. In other words, the rule state has to be managed by the routing daemon. Since the local/source policy rules are bound to iface, this commit solves the problem by adding a flag to interface which stores the current rule state. The flag follows the enabled-paramter passed to interface_ip_set_enabled(), similar to route-> and addr->enabled. The flag breaks the alignment of the interface struct, but based on earlier commits this seems to be ok. I have tested the patch in different configurations and have not found any regression. Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
2015-12-19interface: Trigger interface update event when interface data is updated via ↵Hans Dedecker
ubus Interface update event will trigger an interface hotplug event and an ubus notify event which will inform subscribers about the updated interface data field Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2015-08-25Changes for more readability.Yousong Zhou
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2015-01-19netifd: Make interface identifier of delegated IPv6 address configurableHans Dedecker
The ip6ifaceid UCI interface parameter makes the interface identifier of the delegated IPv6 address configurable. The parameter can have the following values: eui64 : Interface identifier is generated from the interface's MAC address random : Interface identifier is generated randomly fixed value : Interface identifier is a fixed value (eg ::1:2) The latter is the default value with a fixed value of ::1 for backwards compatibility Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> Signed-off-by: Joeri Barbarien <joeri.barbarien@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-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-04-11interface: add support for a parameter to force setup without a carrier on ↵Felix Fietkau
the underlying device Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-02-27netifd: Link layer state awareness support on interface levelHans Dedecker
The link layer state is monitored for a given interface; an interface will be setup when both enabled and link layer active. Likewise an interface will be teared down when either disabled or link layer down. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-01-17Add indicator-flags to ubus and hotplug update-eventsSteven Barth
2013-12-14Revert "netifd: Link layer state support on interface level"Felix Fietkau
This reverts commit 7335c3e19ea09674245dda3653d3f40705e68d6b.
2013-12-08netifd: Link layer state support on interface levelHans Dedecker
Patch implements handling of link layer support on interface level. An interface will go into the setup state when it's enabled and the underlying link state is enabled. Vice versa an interface will go to the down state when it's either disabled or underlying link state is disabled. Testing has been done with PPP, IPoE, tunnel and static interfaces Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2013-10-22add helper function for adding/removing devices to interfacesFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-10-19interface: rework code to get rid of arbitrary IFNAMSIZ limitation for ↵Felix Fietkau
interface names Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-10-19interface: remove "dynamic" argument for interface_init, add the ↵Felix Fietkau
interface_set_dynamic function instead Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-10-18Add option "delegate" to toggle prefix delegationSteven Barth
2013-10-17Add protocol update notifications and hotplug legacy callsSteven Barth
2013-10-17Add ubus function to create nested interfacesSteven Barth
2013-06-10config: use the new uci_blob library codeFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-05-30IPv6: reorganize prefix assignmentSteven Barth
* put parameters in a more suitable place * add support for prefix classes
2013-05-17Add option to define target routing table for protocol routes.Steven Barth
This unifies source-routing for both IPv6 and IPv4 (default off). Based on a patch by Kristian Evensen
2013-04-03Rewrite IPv6 prefix assignmentSteven Barth
2013-01-15Initial IPv6 prefix supportSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2012-07-12add simple device config params to interface blob attributes, and add a flag ↵Felix Fietkau
that indicates if it is present
2012-05-23add interface alias supportFelix Fietkau
2012-05-19implement a generic peerdns option to suppress proto handler dns entriesFelix Fietkau
2012-05-04add copyright headersFelix Fietkau
2012-05-04convert interface event queueing to global interface notifierFelix Fietkau
2012-05-04add a new event for interface reloadFelix Fietkau
2012-05-04add a new event for interface freeFelix Fietkau
2012-05-04add global interface event notifierFelix Fietkau
2012-05-04add a ubus interface to dynamically create host routes to a particular ip ↵Felix Fietkau
address, returns the interface that the route goes through
2012-03-23add support for attaching arbitrary state data to interfacesFelix Fietkau
2012-03-23move l3 device tracking to interface core to enforce proper order of ↵Felix Fietkau
address/route removal on device or interface state changes
2012-03-19add support for updating route metricsFelix Fietkau
2012-03-03ubus: use interface_{add,remove}_link for hotplug opsFelix Fietkau
2012-01-24add a generic option for disabling the automatic default route on interfacesFelix Fietkau
2012-01-15use the simplified vlist type for dns servers/searchFelix Fietkau
2011-10-19rework route handling, move parser code to interface-ip.c, add extra options ↵Felix Fietkau
and add further support for pulling routes from config
2011-10-19add support for keeping multiple ip addr/route/dns listsFelix Fietkau
2011-10-19rework device hotplug handling some more, add device_lock/device_unlock to ↵Felix Fietkau
prevent use-after-free bugs
2011-10-19rework and fix hotplug interface handlingFelix Fietkau
2011-10-18add interface users (similar to device users)Felix Fietkau
2011-10-11add some code for keeping track of dns servers and search domains and for ↵Felix Fietkau
writing resolv.conf
2011-10-10add interface uptime to the status infoFelix Fietkau
2011-10-07add support for calls to a hotplug script on interface state changesFelix Fietkau
2011-10-02add some code for properly tearing down, reloading and removing interfacesFelix Fietkau
2011-10-02manage interfaces via vlistFelix Fietkau
2011-09-11proto-shell: add l3 interface claim/releaseFelix Fietkau
2011-09-11make it possible to decouple interface availability from having a main deviceFelix Fietkau
2011-09-08rename "active" to "available"Felix Fietkau