Age | Commit message (Collapse) | Author |
|
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
The neighbor or neighbor6 network section makes neighbours
configurable via UCI or proto shell handlers. It allows to
install neighbor proxy entries or static neighbor entries
The neighbor or neighbor6 section has the following types:
interface : declares the logical OpenWrt interface
ipaddr : the ip address of the neighbor
mac : the mac address of the neighbor
proxy : specifies whether the neighbor ia a proxy
entry (can be 1 or 0)
router : specifies whether the neighbor is a router
(can be 1 or 0)
Signed-off-by: Alexander Meuris <meurisalexander@gmail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
commit a97297d83e42 ("interface: set interface in TEARDOWN state when checking link state")
broke the if-down hotplug event handling, as the iface->state is now IFS_TEARDOWN when
calling the mark_interface_down() function from the IFPEV_DOWN event.
Fixes: a97297d83e42 ("interface: set interface in TEARDOWN state when checking link state")
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
|
|
In case PROTO_CMD_SETUP cannot be handled due to an invalid state; return
-1 so the calling functions are aware the PROTO_CMD_SETUP has failed.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
When launching PROTO_CMD_TEARDOWN in interface_check_state() the interface
was set in IFS_DOWN state. In case an interface is now brought into IFS_SETUP
state in __interface_set_up() it will launch PROTO_CMD_SETUP trying to
bring the proto shell handler in S_SETUP state which will fail as the proto
shell handler is still in the S_TEARDOWN state.
Fix this by setting the interface in IFS_TEARDOWN state when the PROTO_CMD_TEARDOWN
event is launched which will prevent the interface being brought into IFS_SETUP state
as long as it's not in the IFS_DOWN state.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
This simple patch adds 802.11ad to hwmode list so that netifd-wireless.sh does not otherwise overwrite it with the default hwmode=g
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|
This patch will add support for using GCMP as cipher suite.
This is not a strong cipher but is only one supported by
wil6210 driver in order to have encrypted traffic.
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|
Update the no_delegation parameter on a config reload; in case prefixes
are present update the prefix assignments as well according to the
no_delegation status
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Hotplug events are no longer handled after socket RX queue is
overrun. The issue has been fixed by:
- setting SO_RCVBUF initially to 65535
- doubling SO_RCVBUF value each time RX queue gets overrun
Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
|
|
Rogue ! effectively disabled the ipv6 multicast check. Fix cd089c52
Why is it always the simple changes that catch you out?
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
|
|
Signed-off-by: Dave Taht <dave.taht@gmail.com>
Acked-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Acked-by: Jo-Philipp Wich <jo@mein.io>
|
|
Use sysfs to configure the bridge settings stp/forward_delay/priority
ageing_time/hello_time and max_age as the SIOCDEVPRIVATE bridge ioctl
has no compat ioctl support which makes it impossible to set the above
mentioned bridge paramaters if the kernel is compiled in 64 bit mode
and user_space in 32 bit mode.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
For dynamic interfaces don't return false if vlist_find returns NULL as
the calling function will try to free iface in case of an error which has
already been freed in interface_change_config()
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Detected by Coverity in cid 1441495
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Set config state to remove for dynamic interfaces in the following cases :
-interface is set as not available
-interface is set as down
-interface is set as having no link state
This will trigger an interface delete upon the next call of interface_handle_config_change
Before this change you could end up with lingering inactive dynamic
interfaces in case the aliased interface went down as before a dynamic
interface was only removed when set down via ubus
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Integrate dynamic interface creation code into interface_alloc and
__interface_add so we can get rid of interface_set_dynamic
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Similar as for ip6 tunnels ignore encaplimit by default as not all ISPs
support the destination option header containing the tunnel encapsulation
limit resulting into broken connectivity
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|
This adds PSK3 / SAE support.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Fix segfault in generic_interface_cb by checking the
IPRULE_OUT/IPRULE_IN flags before doing the strcmp for the possible
configured out/in interface(s) of the ip rule.
Also don't copy the interface layer3 device as the layer 3 device is
not yet known when IFEV_CREATE event is launched.
The layer3 device will be known when the IFEV_UP event is processed in
rule_out_cb/rule_in_cb.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Actually change the glob pattern as described in the previous commit.
Fixes: 3c8ac1c ("netifd: fix wpa mixed mode matching")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Change wpa mixed mode matching to not accidently catch wep+mixed.
All documented cases have the character between {wpa,psk} and mixed as a
'-' but no need to break things which were working, so preserve the *
case.
Reported-by: "Rick Farina (Zero_Chaos)" <zerochaos@gentoo.org>
[Allow "psk-mixed" to be prefixed, to align with the *psk2* and *psk* cases,
slightly reword subject and commit message.]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Enable ignore encaplimit by default for ip6 tunnels as not all ISPs support
the destination option header containing the tunnel encapsulation limit
resulting into broken map/ds-lite connectivity.
Setting the ignore encaplimit flag by default is a more sane setting as it
avoids user configuation of the encaplimit uci option for ds-lite/map tunnels
in case of broken connectivity.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
This is a GCC >= 7 feature, not all compilers support it.
Fixes: 908a9f4f1027 ("CMakeLists.txt: add -Wimplicit-fallthrough to the compiler flags")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
|
Let interface_set_down() return void as no usefull error code
is returned by __interface_set_down()
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Don't return an error code in interface_set_up as it's ignored anyway by the
calling functions; but rather add more interface error messages so the actual
problem is visible for the user by doing ifstatus <interface>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Remove interface available checks in the functions interface_start_pending
and interface_handle_config_change so the NO_DEVICE error is reported in
ifstatus <interface> making it clear to the user the configured device in
ifname is not found
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Instead of truncating the device name when it exceeds IFNAMSIZ length;
let device_set_ifname return an error code and do not add the device
to the device list.
This avoids possible issues with device names becoming identical due the
truncation and as a result unexpected behavior.
Further let the different device types gracefully handle the error code
returned by device_init
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Always override the downstream IPv6 mtu in case it differs with the IPv6 mtu
of the upstream link. This allows to increase the downstream IPv6 mtu in
case RA messages are received on the upstream link having a mtu attribute
higher than the downstream IPv6 mtu.
At the same be verbose when failing to set the IPv6 mtu on the downstream link.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
netifd-2018-07-30-75ee7905/interface-ip.c:724:11: error: unused variable 'macaddr' [-Werror=unused-variable]
Signed-off-by: John Crispin <john@phrozen.org>
|
|
Use the mac address stored in the device_settings struct to generate the
eui64 ifaceid as the interface layer3 device does not contain a mac address
for non bridge interfaces
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Signed-off-by: John Crispin <john@phrozen.org>
|
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
Since they are both char arrays, they can never be NULL
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Make sure the displayed prefix size is identical to the kernel installed
prefix size for local IPv6 prefix addresses
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Acked-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Acked-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
fall throughs are usually error-prone, especially when someone else extend
it.
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Acked-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Previous netifd would only apply `ip rule`s while config phase.
If the iprule is depending on an interface (iif or oif), the rule
will fail if the interface is not up.
Allow iprules to track interfaces and their devices by using
the interface events.
Fixes: FS#1571
Acked-by: Hans Dedecker <dedeckeh@gmail.com>
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
|
|
"create" will be called before the proto handlers initialised.
Acked-by: Hans Dedecker <dedeckeh@gmail.com>
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
|
|
Add an #ifdef guard around 56000base* definitions, which don't exist on
Linux 3.18
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|