]> git.ipfire.org Git - people/ms/rstp.git/log
people/ms/rstp.git
14 years agofixes for 4.3.3 GCC warnings/errors
Denys Fedoryschenko [Wed, 1 Apr 2009 16:06:55 +0000 (09:06 -0700)] 
fixes for 4.3.3 GCC warnings/errors

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>
16 years agoRemove file "bridge" which was incorrectly included.
Srinivas Aji [Thu, 29 Nov 2007 20:45:23 +0000 (02:15 +0530)] 
Remove file "bridge" which was incorrectly included.

   The "bridge" script was incorrectly included into this tree and isn't
   needed here anyway. Remove it.

Signed-off-by: Srinivas Aji <Aji_Srinivas@emc.com>
16 years agoRemove unused RSTPLIB and related files.
Srinivas Aji [Thu, 29 Nov 2007 20:43:45 +0000 (02:13 +0530)] 
Remove unused RSTPLIB and related files.

   Remove all the RSTPLIB files. They aren't used anymore.

Signed-off-by: Srinivas Aji <Aji_Srinivas@emc.com>
16 years agoUse new RSTP library.
Srinivas Aji [Thu, 29 Nov 2007 20:34:32 +0000 (02:04 +0530)] 
Use new RSTP library.

   This is a somewhat big commit which replaces the use of RSTPLIB in the
   RSTP daemon by the new RSTP library. This makes the daemon much more
   compliant with the 802.1D-2004 standard. The control program, rstpctl,
   has been modified so its output closer to the output of brctl showstp.

Signed-off-by: Srinivas Aji <Aji_Srinivas@emc.com>
16 years agoAdd in new RSTP implementation to replace RSTPLIB.
Srinivas Aji [Thu, 29 Nov 2007 19:58:09 +0000 (01:28 +0530)] 
Add in new RSTP implementation to replace RSTPLIB.

   We have a new implementation of RSTP, which is meant to implement the
   Spanning Tree Protocol in IEEE 802.1D-2004. This implementation is
   written as a library consisting of one .c file and one .h file.
   It is written from scratch directly from the 802.1D-2004 document.
   This commit adds the files rstp.h and rstp.c to the directory, in
   preparation for modifying other code to use this instead of rstplib.

Signed-off-by: Srinivas Aji <Aji_Srinivas@emc.com>
16 years agoRemoved portion of brmon.c which received BPDUs through netlink.
Srinivas Aji [Thu, 29 Nov 2007 17:38:12 +0000 (23:08 +0530)] 
Removed portion of brmon.c which received BPDUs through netlink.

   At one time, BPDUs were being received through netlink using a kernel
   patch. We now receive and send BPDUs through PF_PACKET sockets, so this
   code is not needed anymore.

Signed-off-by: Srinivas Aji <Aji_Srinivas@emc.com>
16 years agoPut in Ethernet and LLC headers ourselves while sending BPDUs
Srinivas Aji [Mon, 28 May 2007 18:39:43 +0000 (00:09 +0530)] 
Put in Ethernet and LLC headers ourselves while sending BPDUs

   Take BPDU contents from RSTPLIB but create the Ethernet and LLC
   headers ourselves. The packet send interface has been modified to
   take an iovec array so we can pass the headers and data to it without
   making copies into another flat buffer.
   RSTPLIB then doesn't even need to know the port MAC addresses if we
   add an interface to configure the bridge address.

Signed-off-by: Srinivas Aji <Aji_Srinivas@emc.com>
16 years agoTrack and cache bridge and port MAC addresses.
Srinivas Aji [Mon, 28 May 2007 18:30:40 +0000 (00:00 +0530)] 
Track and cache bridge and port MAC addresses.

   Check for MAC address change when we get notifications.
   If we get a port notification and find that the port MAC address
   changed, we check if the bridge MAC address changed as well.
   This will be useful for modifying RSTPLIB to allow setting bridge
   address instead of trying to replicate the kernel bridge address
   computation.

Signed-off-by: Srinivas Aji <Aji_Srinivas@emc.com>
16 years agoImprove and fix validation of received BPDUs.
Srinivas Aji [Mon, 28 May 2007 18:22:43 +0000 (23:52 +0530)] 
Improve and fix validation of received BPDUs.

   Validate ethernet and LLC headers: Check destination address, length,
   and SAP fields. Also fix length checks for Config and RST BPDUs.

Signed-off-by: Srinivas Aji <Aji_Srinivas@emc.com>
16 years agoChange notification processing to account for kernel changes
Srinivas Aji [Mon, 28 May 2007 18:14:43 +0000 (23:44 +0530)] 
Change notification processing to account for kernel changes

   We now always get NEWLINK and DELLINK notifications for bridge port
   additions and deletions. And DELLINK is only for port deletions.
   So we can always remove a bridge port on a DELLINK notification,
   and not make uncertain checks in fear of missing this.

Signed-off-by: Srinivas Aji <Aji_Srinivas@emc.com>
16 years agoRSTP testing - PATCH: Typo in libnetlink.c origin
Aji, Srinivas [Thu, 10 May 2007 23:38:48 +0000 (16:38 -0700)] 
RSTP testing - PATCH: Typo in libnetlink.c

 Typo in libnetlink.c

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoRSTP testing - PATCH: BPDU length calculation
Aji, Srinivas [Thu, 10 May 2007 23:37:26 +0000 (16:37 -0700)] 
RSTP testing - PATCH: BPDU length calculation

   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>
16 years agoRSTP testing - PATCH: source MAC address of BPDU
Aji, Srinivas [Thu, 10 May 2007 23:35:41 +0000 (16:35 -0700)] 
RSTP testing - PATCH: source MAC address of BPDU

   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>
17 years agorstpd: working version
Stephen Hemminger [Wed, 25 Apr 2007 23:43:28 +0000 (16:43 -0700)] 
rstpd: working version

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>
17 years agoSimple usermode helper script
Stephen Hemminger [Thu, 22 Mar 2007 23:05:52 +0000 (16:05 -0700)] 
Simple usermode helper script

17 years agoInitialize packet socket
Stephen Hemminger [Thu, 22 Mar 2007 23:05:30 +0000 (16:05 -0700)] 
Initialize packet socket

17 years agoBuild brmon again
Stephen Hemminger [Thu, 22 Mar 2007 20:57:58 +0000 (13:57 -0700)] 
Build brmon again

Sorry, that code was needed.

17 years agoRevised packet SOCK_RAW code
Stephen Hemminger [Thu, 22 Mar 2007 20:54:41 +0000 (13:54 -0700)] 
Revised packet SOCK_RAW code

Still not complete.

17 years agoremove ifdef'd code
Stephen Hemminger [Thu, 22 Mar 2007 20:42:37 +0000 (13:42 -0700)] 
remove ifdef'd code

The code is no longer needed.

17 years agonetlink shouldn't kill daemon
Stephen Hemminger [Thu, 22 Mar 2007 20:41:40 +0000 (13:41 -0700)] 
netlink shouldn't kill daemon

A netlink error shouldn't cause silent death of daemon.
It doesn't work well if library calls exit().

17 years agoConvert to using AF_PACKET for send and receive
Stephen Hemminger [Thu, 22 Mar 2007 00:35:50 +0000 (17:35 -0700)] 
Convert to using AF_PACKET for send and receive

Use AF_PACKET to send and receive spanning tree bpdu's
UNTESTED at this point.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agoreindent source
Stephen Hemminger [Wed, 21 Mar 2007 23:31:39 +0000 (16:31 -0700)] 
reindent source

Use kernel indentation style. Existing style was too odd.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agoupdate ignore file
Stephen Hemminger [Wed, 21 Mar 2007 23:26:38 +0000 (16:26 -0700)] 
update ignore file

17 years agofix build
Stephen Hemminger [Wed, 21 Mar 2007 23:25:04 +0000 (16:25 -0700)] 
fix build

17 years agoInitial commit
Stephen Hemminger [Wed, 21 Mar 2007 23:23:46 +0000 (16:23 -0700)] 
Initial commit

sources from  Aji_Srinivas@emc.com