Age | Commit message (Collapse) | Author |
|
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>
|
|
Run the bridge_reset_primary function only after the member being removed
has been marked as not present.
This change prevents the bridge_reset_primary function from choosing the
member being removed as the new primary member.
Signed-off-by: Alex Oprea <alex.oprea@inteno.se>
|
|
Lots of configurations have triggered various issues in this feature,
any many people don't even need this.
Let's disable it by default until it has become more stable
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
When no MAC address option is given, the MAC address of
bst->primary_port is used to override the bridge device address.
When the config changes and a new MAC address is provided in the config,
bridge_reset_primary needs to stop overriding it
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
The bridge name is a copy of the device name; but the device name can
change which is the case when an aliased interface is used as bridge member.
This will result into unwanted side effects like bridge reload triggering
a topology change effect after doing network reload; therefore use the
configured ifname as fixed bridge member name.
Also don't display bridge member devices which are hidden
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
While at it; make device_types static if only used in the device type file
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Device handlers now also declare if they have bridge capabilities and include
a string to prefix device names for their types.
Signed-off-by: Arne Kappen <akappen@inet.tu-berlin.de>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [cleanup/fixes]
|
|
- 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]
|
|
RFCs suggest some parameters of IGMP and MLD to be configurable by
the administrator. With this patch the following parameters are
configurable:
* robustness (default: 2)
* query_interval (default: 12500 [125s])
* query_response_interval (default: 1000 [10s])
* last_member_interval (default: 100 [1s])
Depending on the size and nature of the network topology administrators
might want to increase or decrease these parameters.
netifd will take care of configuring any other parameters which are
dependant on the ones above and set them according to the formulas
provided in the RFCs. These parameters of the bridge are
membership_interval, querier_interval, startup_query_interval,
startup_query_count and last_member_count.
RFCs allow setting three more parameters to be configurable:
startup_query_interval, startup_query_count and last_member_count.
However this patch does not export them, as they can be indirectly
tuned via the given, exported four parameters, too.
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
|
|
Signed-off-by: Steven Barth <steven@midlink.org>
|
|
If the number of entries in the MDB exceeds hash_max then the
multicast snooping capabilities of the bridge are disabled
automatically.
The default value for hash_max is 512 which is already exceeded by some
wireless community mesh networks. They need to be able to set a higher
value.
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
|
|
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>
|
|
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>
|
|
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>
|
|
Ensure that the bridge gets created before retrying
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
The kernel will refuse to add a vlan device to a bridge when the base
device of that vlan is already a member. This can happen on config
reload.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
Fixes an issue where a bridge member will be removed from the bridge
upon an interface ifup as the bridge node version -1 is overwritten
by vlist_add while the new created bridge member pointer is freed in
bridge_member_update
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
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>
|
|
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>
|
|
Reapply bridge mtu setting as adding a bridge member will override the bridge mtu in the kernel
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Check in the right order to decide if the bridge have to be set up.
Additionally we are consistent with setting it down.
Signed-off-by: Emanuel Taube <emanuel.taube@gmail.com>
|
|
Need to check calloc result. In case of failure the bridge member will be missing.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
|
|
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
After removing all ifname options from bridge interface and executing network
reload the configuration was not applied properly on the system. With this
change that is no longer a issue.
Signed-off-by: Luka Perkov <luka@openwrt.org>
|
|
Signed-off-by: Luka Perkov <luka@openwrt.org>
|
|
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
|
|
|
|
[netifd] add bridge priority option
Using the bridge priority (lower numbers are higher in the
hierarchy), one can ensure that the router is chosen as root
bridge in a setup with spanning tree protocol.
For instance, one can set the priority of network lan to 32767,
causing the router to win over all directly and indirectly
connected nodes that have a default priority of 32768.
The reason for doing that is that otherwise it has a default
priority 32768 as well and any other connected node could win and
get root bridge. In a home setup, those nodes are often desktop
or laptop boxes and get switched off from time to time. As a
consequence, root bridges vanish or new root bridges get chosen
relatively often, resulting in frequent topology changes to the
STP network. While the new topology has not settled, packets can
get lost, causing noticeable interruptions of network traffic.
Setting the router's bridge on a lower numbered priority (and thus
higher in the selection hierarchy) solves the problem in the vast
majority of the cases by ensuring that the device that is most
likely powered on 24/7 gets chosen as root and prevents topology
changes.
Signed-off-by: Niels Boehm <blubberdiblub@gmail.com>
|
|
that it can be reassigned to a different bridge
|
|
|
|
|
|
|
|
|
|
|
|
|
|
the kernel)
|
|
|
|
adds fast updates for adding/removing bridge members
|
|
|
|
|
|
|
|
|
|
|
|
|
|
an external process adds interfaces
|