summaryrefslogtreecommitdiffhomepage
path: root/vlan.c
AgeCommit message (Collapse)Author
2016-08-26device: prepare for adding device handlers dynamicallyArne Kappen
- remove const from device handler struct - pass device handler type to create function Signed-off-by: Arne Kappen <akappen@inet.tu-berlin.de> Signed-off-by: Felix Fietkau <nbd@nbd.name> [cleanup]
2016-06-06device: Fix device find failure in avl list due to device name changeHans Dedecker
As device name is used as key in avl list a device name change will break the avl find logic. Function device_set_ifname offers api to set the device name and re-inserts the avl node in the list when the avl key value is changed. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2016-02-01vlan: Fix possible segfaultHans Dedecker
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2015-11-04device: Don't process link events anymore in device user specific callback ↵Hans Dedecker
handlers Set link_state for all device types via the device_set_link API as all devices are registered in the device tree list making it possible to always get the device via device_get. The decice link state parameter will now actually reflect the corresponding kernel device carrier state in all cases. Before this change a vlan/macvlan device could still have link_state enabled if an interface was brought down; this was the case when the parent vlan/macvlan device was still enabled as the netlink link_state event would be dropped for vlan/macvlan devices due to keep_link_state in the function cb_rtnl_event. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2015-05-27netifd: Add old style vlan devices to device listHans Dedecker
Just like other device types old vlan style devices are added to the device list which means they're displayed when the device list is displayed via ubus. Additionally global device setting config like default packet steering behavior is now also applied for old style vlan devices when doing a network reload. 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-24vlan: reset device state on initFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-10-20device: make link status detection optional for vlan devicesFelix Fietkau
Fixes a race condition that triggers endless link loss / detect calls when VLAN devices are created. Signed-off-by: Felix Fietkau <nbd@openwrt.org>
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-03-21netifd: Reload proto on topology changeHelmut Schaa
Introduce a new device event "topology change" that gets signaled by bridges on adding/removing members. On "topology changes" the proto handlers are requested to "renew" which is most useful for DHCP. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
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>
2013-12-14Revert "netifd: Link layer state support on device level"Felix Fietkau
This reverts commit c439b52400978dd3799c66e1f632ee68d2c7c9eb.
2013-12-08netifd: Link layer state support on device levelHans Dedecker
Patch implements link layer state awareness (aka carrier detection) in netifd on device level. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2013-09-25vlan: set the name of vlan devices earlierNathan Hintz
Set the device name earlier so that the logging done inside of 'device_init_virtual' can print the name of the device being initialized (instead of an empty string). Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
2013-04-15device: use safe_list for device event, fixes some hang issuesFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-07-05fix ifname for alias+vlan chainsFelix Fietkau
2012-07-05make vlan devices virtual to avoid avl tree issues with changing ifnames ↵Felix Fietkau
when bound to alias interfaces
2012-07-05vlan.c: prevent segfault in get_vlan_device_chain() if the base device does ↵Jo-Philipp Wich
not exist
2012-05-04add copyright headersFelix Fietkau
2011-10-19apply device settings to simple devices with config specified from the ↵Felix Fietkau
interface section (legacy format compatibility), but only if no other config was provided
2011-10-06always recreate devices by default if the config attribute list is not the ↵Felix Fietkau
default one
2011-10-05rename a variable for clarityFelix Fietkau
2011-09-04make device_claim/device_release operate on the device_user instead of the ↵Felix Fietkau
device to avoid refcount bugs
2011-07-29s/release_device/device_release/Felix Fietkau
2011-07-29s/claim_device/device_claim/Felix Fietkau
2011-07-29s/init_device/device_init/Felix Fietkau
2011-07-29s/get_device/device_get/Felix Fietkau
2011-07-29s/cleanup_device/device_cleanup/Felix Fietkau
2011-07-29s/set_device_present/device_set_present/Felix Fietkau
2011-07-29s/add_device_user/device_add_user/Felix Fietkau
2011-07-29s/remove_device_user/device_remove_user/gFelix Fietkau
2011-03-28remove an unnecessary inlineFelix Fietkau
2011-03-27Initial importFelix Fietkau