Age | Commit message (Collapse) | Author | Files | Lines |
|
The IFLA_PROTINFO is a u8 not u32, and sending a bigger value
to kernel means extra bytes are ignored, leaving state as always 0.
|
|
/sbin/bridge-stp is needed as helper to use userspace (R)STP
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
|
|
The carrier of bridge device reflects underlying devices in later
kernels. Therefor RSTP daemon should ignore carrier (IFF_RUNNING)
and only look at IFF_UP on bridge device.
|
|
|
|
|
|
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
|
|
Ignore OPERSTATE since bridge doesn't report this correctly.
Ignore messages about our own state changes
Remove dead code.
|
|
The code does things like ntohs(*(unsigned short*) b->message_age)
which break strict alias checking in gcc.
|
|
EMC implemented a mechanism of passing BPDU via netlink
that was never accepted in upstream kernel.
|
|
|
|
Check that the interface on which bpdu was received is actually
a bridge port. It's possible to receive an STP packet on
a bridge interface itself if the bridge has STP disabled
and forwards STP traffic.
Signed-off-by: Alexander Yurchenko <a.yurchenko@scalaxy.ru>
|
|
Add missing ``rstp'' command to the rstpctl arguments.
Signed-off-by: Alexander Yurchenko <a.yurchenko@scalaxy.ru>
|
|
After fetching current git code and compiling with gcc 4.3.3 got errors
related to Werror (2 functions was ignoring return value), and ulimits.h was
not declared, but INT_MAX used
Here is fix, so rstp compile fine with gcc 4.3.3
Signed-off-by: Denys Fedoryschenko <denys@visp.net.lb>
|
|
|
|
Typo in libnetlink.c
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
|
|
The bpdu_len sent to STP_OUT_tx_bpdu() excludes the ethernet and
and LLC headers, though the bpdu pointer points to the start of the
ethernet header. Given the types in rstplib/stp_bpdu.h, we need to
be sending a packet with (base, len) given by
(bpdu, bpdu_len + sizeof(MAC_HEADER_T) + sizeof(ETH_HEADER_T))
MAC_HEADER_T is dest and source ethernet addresses and ETH_HEADER_T
is the 802.2 part.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
|
|
BPDU's were being sent out with an all zero source ethernet
address. These packets don't make it far in the receive path on
another bridge since bridge_handle_frame() checks for valid source
ethernet address and drops them if that isn't the case.
I needed to undo a change I made in rstplib/transmit.c, where I was
not setting source MAC address because the LLC layer was doing it.
TODO: We get notified when a port MAC address changes, so we should
cache it. Right now it uses SIOCGIFHWADDR each time (for each BPDU
sent) using a cached name, which is not good.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
|
|
This is the first version that works with modifications to bridge
that are going into 2.6.22
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
|
|
|
|
|
|
Sorry, that code was needed.
|
|
Still not complete.
|
|
The code is no longer needed.
|
|
A netlink error shouldn't cause silent death of daemon.
It doesn't work well if library calls exit().
|
|
Use AF_PACKET to send and receive spanning tree bpdu's
UNTESTED at this point.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
|
|
Use kernel indentation style. Existing style was too odd.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
|
|
|
|
|
|
sources from Aji_Srinivas@emc.com
|