config: ignore config parser errors

This helps with keeping routers reachable when there are typos in the
network config.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
dprintf of dhcp4o6 removed
system-dummy: indicate link on present devices

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
interface: always delete l3 dev on proto down

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
proto-shell: ensure that l3_dev is always set

A link-down event clears l3_dev, so even if the proto handler does not
provide a new ifname, it still needs to be set explicitly

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
proto-shell: fix a regression with handling multiple proto updates for the same interface

Preserve the device when keep == true

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
proto-static: ensure that the l3 device is properly set

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
interface: add support for a parameter to force setup without a carrier on the underlying device

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
interface: ensure that l3_dev gets set whenever the proto handler marks the interface as up

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
ubus: check the l3_dev pointer before dereferencing it

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
config: add support for disabling interfaces

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
netifd: fix IPv6 Link-local DNS server

interface name must be added to Link-local IPv6
DNS servers, otherwise they are unusable.

Signed-off-by: Ulrich Weber <uw@ocedo.com>
netifd: Mark interface as dynamic after it has been added in the interface list

Adding an interface in the interface list in case of a config update will override the node version of the old interface and thus overriding the dynamic interface marker.
In case of config update interface_set_dynamic is done on an invalid interface pointer as the new interface pointer has been freed.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
netifd: Set prefix assignment enabled if the prefix adress can be installed

No need to install policy routes if the prefix address cannot be installed; clean up of the policy routes
and the prefix address only needs to happen when the prefix assignment was active.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
netifd: Check rt_table parameter when comparing routes

Allows to add identical routes in different routing tables

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
netifd: Rework hotplug event queueing in case of congestion

In case of event congestion (e.g. when several interfaces become active in a short notice) :
-hotplug events will be handled on a first come first served basis (before it was lifo)
-drop a new ifupdate event in favour of an already queued ifup event (before the ifup event was overwritten by the ifupdate event resulting in some hotplug scripts "missing" the ifup event)

Additonal the event flow has been documented

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Signed-off-by: Joeri Barbarien <joeri.barbarien@gmail.com>
interface-event: make eventnames static and const

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
netifd: Add interface config support to enable/disable IPv6 in the kernel per device

Main use case is being able to disable IPv6 on (a) WAN interface(s) when only IPv4 connectivity is offered or 6rd is used.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
netifd: fix a use-after-free issue on wireless config update

After vlist_add() the device could have been freed

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
interface-ip: fix misuse of IN6_IS_ADDR_LINKLOCAL on a netifd specific union

Signed-off-by: Felix Fietkau <nbd@openwrt.org>