summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2011-10-11fix bridge port state in netlink messageHEADmasterStephen Hemminger1-1/+1
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.
2011-07-20Makefile: also install bridge-stpAlexander Stein1-0/+1
/sbin/bridge-stp is needed as helper to use userspace (R)STP Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
2011-07-04Ignore carrier state on bridge deviceStephen Hemminger3-17/+22
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.
2011-07-04Make local functions staticStephen Hemminger1-4/+7
2011-07-04Remove variable set and never usedStephen Hemminger1-2/+1
2011-06-28bridge-stp: Fix variable name used to generate pid_fileAlexander Stein1-1/+1
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
2011-05-18Fix monitoring codeStephen Hemminger1-89/+34
Ignore OPERSTATE since bridge doesn't report this correctly. Ignore messages about our own state changes Remove dead code.
2011-05-18Turn off compiler strict aliasingStephen Hemminger1-1/+2
The code does things like ntohs(*(unsigned short*) b->message_age) which break strict alias checking in gcc.
2011-05-18Remove code for passing STP BPDU via netlinkStephen Hemminger1-8/+0
EMC implemented a mechanism of passing BPDU via netlink that was never accepted in upstream kernel.
2011-05-18remove dead codeStephen Hemminger1-8/+0
2010-03-28Fix null pointer dereference in bridge_bpdu_rcvAlexander Yurchenko1-1/+1
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>
2010-02-19Fix rstpctl usageAlexander Yurchenko1-2/+2
Add missing ``rstp'' command to the rstpctl arguments. Signed-off-by: Alexander Yurchenko <a.yurchenko@scalaxy.ru>
2009-04-01fixes for 4.3.3 GCC warnings/errorsDenys Fedoryschenko4-3/+14
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>
2009-04-01Update headers to 2.6.29Stephen Hemminger2-370/+66
2007-05-10RSTP testing - PATCH: Typo in libnetlink.cAji, Srinivas1-1/+1
Typo in libnetlink.c Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
2007-05-10RSTP testing - PATCH: BPDU length calculationAji, Srinivas1-2/+1
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>
2007-05-10RSTP testing - PATCH: source MAC address of BPDUAji, Srinivas1-4/+0
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>
2007-04-25rstpd: working versionStephen Hemminger6-47/+118
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>
2007-03-22Simple usermode helper scriptStephen Hemminger1-0/+27
2007-03-22Initialize packet socketStephen Hemminger2-1/+3
2007-03-22Build brmon againStephen Hemminger1-2/+2
Sorry, that code was needed.
2007-03-22Revised packet SOCK_RAW codeStephen Hemminger7-206/+171
Still not complete.
2007-03-22remove ifdef'd codeStephen Hemminger1-62/+0
The code is no longer needed.
2007-03-22netlink shouldn't kill daemonStephen Hemminger1-7/+7
A netlink error shouldn't cause silent death of daemon. It doesn't work well if library calls exit().
2007-03-21Convert to using AF_PACKET for send and receiveStephen Hemminger6-169/+195
Use AF_PACKET to send and receive spanning tree bpdu's UNTESTED at this point. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
2007-03-21reindent sourceStephen Hemminger19-1999/+2131
Use kernel indentation style. Existing style was too odd. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
2007-03-21update ignore fileStephen Hemminger1-0/+13
2007-03-21fix buildStephen Hemminger1-3/+3
2007-03-21Initial commitStephen Hemminger97-0/+17213
sources from Aji_Srinivas@emc.com