OpenBSD CVS

CVS log for src/sys/net/bridgestp.c


[BACK] Up to [local] / src / sys / net

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.77 / (download) - annotate - [select for diffs], Wed Mar 10 10:21:47 2021 UTC (3 years, 3 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, HEAD
Changes since 1.76: +2 -2 lines
Diff to previous 1.76 (colored)

spelling

ok gnezdo@ semarie@ mpi@

Revision 1.76 / (download) - annotate - [select for diffs], Mon Jan 25 19:47:16 2021 UTC (3 years, 4 months ago) by mvs
Branch: MAIN
Changes since 1.75: +3 -11 lines
Diff to previous 1.75 (colored)

We have this sequence in bridge(4) ioctl(2) path:

	ifs = ifunit(req->ifbr_ifsname);
		if (ifs == NULL) {
			error = ENOENT;
			break;
		}
	if (ifs->if_bridgeidx != ifp->if_index) {
		error = ESRCH;
		break;
	}
	bif = bridge_getbif(ifs);

This sequence repeats 8 times. Also we don't check value returned by
bridge_getbig() before use. Newly introduced bridge_getbig() function
replaces this sequence. This not only reduces duplicated code but also
makes `bif' dereference safe.

ok bluhm@

Revision 1.75 / (download) - annotate - [select for diffs], Thu Jul 30 11:32:06 2020 UTC (3 years, 10 months ago) by mvs
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.74: +34 -6 lines
Diff to previous 1.74 (colored)

`struct bstp_state' stores pointer to parent `ifnet' as `bs_ifp'.
Replace this pointer by interface index. This allow us to avoid some use
after free issues caused by ifioctl() races.

ok sashan@

Revision 1.74 / (download) - annotate - [select for diffs], Wed Jul 22 20:37:34 2020 UTC (3 years, 10 months ago) by mvs
Branch: MAIN
Changes since 1.73: +96 -73 lines
Diff to previous 1.73 (colored)

Use interface index instead of pointer to `ifnet' in `struct bstp_port'.

ok yasuoka@

Revision 1.73 / (download) - annotate - [select for diffs], Thu Nov 7 07:36:31 2019 UTC (4 years, 7 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.72: +4 -6 lines
Diff to previous 1.72 (colored)

turn the linkstate hooks into a task list, like the detach hooks.

this is largely mechanical, except for carp. this moves the addition
of the carp link state hook after we're committed to using the new
interface as a carpdev. because the add can't fail, we avoid a
complicated unwind dance. also, this tweaks the carp linkstate hook
so it only updates the relevant carp interface, not all of the
carpdevs on the parent.

hrvoje popovski has tested an early version of this diff and it's
generally ok, but there's some splasserts that this diff fires that
i'll fix in an upcoming diff.

ok claudio@

Revision 1.72 / (download) - annotate - [select for diffs], Mon May 13 18:20:13 2019 UTC (5 years ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.71: +2 -3 lines
Diff to previous 1.71 (colored)

Do not check for IFF_RUNNING inside bstp_initialization().

This allows to set such flag after completing the initialization of a
bridge and still have bstp_tick() be scheduled from the begining.

Fix a regression reported by and ok markus@

Revision 1.71 / (download) - annotate - [select for diffs], Fri May 3 18:39:08 2019 UTC (5 years, 1 month ago) by mpi
Branch: MAIN
Changes since 1.70: +2 -1 lines
Diff to previous 1.70 (colored)

Add missing bridge_getbif(), reported by jsg@.

Revision 1.70 / (download) - annotate - [select for diffs], Thu May 2 16:24:32 2019 UTC (5 years, 1 month ago) by mpi
Branch: MAIN
Changes since 1.69: +13 -5 lines
Diff to previous 1.69 (colored)

Reset root port after last STP interface is removed.

Prevent use-after-free reported by Hrvoje Popovski.

Revision 1.69 / (download) - annotate - [select for diffs], Sun Apr 28 22:15:57 2019 UTC (5 years, 1 month ago) by mpi
Branch: MAIN
Changes since 1.68: +3 -4 lines
Diff to previous 1.68 (colored)

Removes the KERNEL_LOCK() from bridge(4)'s output fast-path.

This redefines the ifp <-> bridge relationship.  No lock can be
currently used across the multiples contexts where the bridge has
tentacles to protect a pointer, use an interface index.

Tested by various, ok dlg@, visa@

Revision 1.68 / (download) - annotate - [select for diffs], Sun Mar 31 13:56:25 2019 UTC (5 years, 2 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.67: +2 -2 lines
Diff to previous 1.67 (colored)

The KERNEL_LOCK() is still what serializes access to bridge(4) data structures.

Fix a warning reported by Hrvoje Popovski, ok visa@

Revision 1.67 / (download) - annotate - [select for diffs], Fri Dec 7 16:17:51 2018 UTC (5 years, 6 months ago) by mpi
Branch: MAIN
Changes since 1.66: +1 -5 lines
Diff to previous 1.66 (colored)

Remove useless spl protection.

ok visa@

Revision 1.66 / (download) - annotate - [select for diffs], Mon Oct 22 13:18:23 2018 UTC (5 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.65: +10 -10 lines
Diff to previous 1.65 (colored)

Rename 'bridge_iflist' variables for coherency, missed in previous.

Revision 1.65 / (download) - annotate - [select for diffs], Tue May 16 12:24:01 2017 UTC (7 years ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.64: +2 -2 lines
Diff to previous 1.64 (colored)

Replace remaining splsoftassert(IPL_SOFTNET) by NET_ASSERT_LOCKED().

ok visa@

Revision 1.64 / (download) - annotate - [select for diffs], Tue Jan 24 10:08:30 2017 UTC (7 years, 4 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.63: +2 -2 lines
Diff to previous 1.63 (colored)

A space here, a space there. Soon we're talking real whitespace
rectification.

Revision 1.63 / (download) - annotate - [select for diffs], Tue Sep 20 12:14:49 2016 UTC (7 years, 8 months ago) by bluhm
Branch: MAIN
Changes since 1.62: +2 -2 lines
Diff to previous 1.62 (colored)

Use splsoftassert() together with IPL_SOFTNET.  On alpha and m88k
it is defined differently than splassert(IPL_SOFTNET).  No binary
change on amd64.
OK mpi@

Revision 1.62 / (download) - annotate - [select for diffs], Sat Nov 7 12:37:18 2015 UTC (8 years, 7 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.61: +1 -6 lines
Diff to previous 1.61 (colored)

Don't try to be clever testing if a queue is full before calling
if_enqueue().  As pointed by dlg@, IF_QFULL on works in the priq
case.

Prompted by a diff from uebayasi@ to export ifi_oqdrops, ok dlg@

Revision 1.61 / (download) - annotate - [select for diffs], Mon Nov 2 14:35:12 2015 UTC (8 years, 7 months ago) by reyk
Branch: MAIN
Changes since 1.60: +2 -2 lines
Diff to previous 1.60 (colored)

Some of the bridge code is running in splsoftnet now, change the
splassert() in bstp_notify_rtage() from IPL_NET to IPL_SOFTNET
accordingly.

OK mpi@

Revision 1.60 / (download) - annotate - [select for diffs], Tue Sep 29 10:11:40 2015 UTC (8 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.59: +3 -5 lines
Diff to previous 1.59 (colored)

add sizes to some of the simpler free calls
ok mpi

Revision 1.59 / (download) - annotate - [select for diffs], Fri Jul 17 18:15:41 2015 UTC (8 years, 10 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.58: +5 -6 lines
Diff to previous 1.58 (colored)

Pass the correct argument to bstp_notify_rtage().

Problem found and fix provided by Ryota Ozaki, thanks!

ok deraadt@, yasuoka@

Revision 1.58 / (download) - annotate - [select for diffs], Wed Jul 15 22:16:41 2015 UTC (8 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.57: +2 -3 lines
Diff to previous 1.57 (colored)

m_freem() can handle NULL, do not check for this condition beforehands.
ok stsp mpi

Revision 1.57 / (download) - annotate - [select for diffs], Tue Jun 30 13:54:42 2015 UTC (8 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.56: +3 -3 lines
Diff to previous 1.56 (colored)

Rename if_output() into if_enqueue() to avoid confusion with comments
talking about (*ifp->if_output)().

ok claudio@, dlg@

Revision 1.56 / (download) - annotate - [select for diffs], Tue Jun 16 11:09:39 2015 UTC (8 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.55: +3 -3 lines
Diff to previous 1.55 (colored)

Store a unique ID, an interface index, rather than a pointer to the
receiving interface in the packet header of every mbuf.

The interface pointer should now be retrieved when necessary with
if_get().  If a NULL pointer is returned by if_get(), the interface
has probably been destroy/removed and the mbuf should be freed.

Such mechanism will simplify garbage collection of mbufs and limit
problems with dangling ifp pointers.

Tested by jmatthew@ and krw@, discussed with many.

ok mikeb@, bluhm@, dlg@

Revision 1.55 / (download) - annotate - [select for diffs], Fri May 15 10:15:13 2015 UTC (9 years ago) by mpi
Branch: MAIN
Changes since 1.54: +4 -19 lines
Diff to previous 1.54 (colored)

Introduce if_output(), a function do to the last steps before enqueuing
a packet on the sending queue of an interface.

Tested by many, thanks a lot!

ok dlg@, claudio@

Revision 1.54 / (download) - annotate - [select for diffs], Tue May 12 12:35:10 2015 UTC (9 years, 1 month ago) by mpi
Branch: MAIN
Changes since 1.53: +1 -6 lines
Diff to previous 1.53 (colored)

This file is only compiled when "pseudo-device bridge" is included in
your kernel configuration, no need for a #if NBRIDGE > 0 dance.

Revision 1.53 / (download) - annotate - [select for diffs], Mon May 4 10:24:08 2015 UTC (9 years, 1 month ago) by mpi
Branch: MAIN
Changes since 1.52: +4 -1 lines
Diff to previous 1.52 (colored)

Use ether_input() as default input packet handler and do the necessary
m_adj(9) to keep bridge(4) working while other pseudo-drivers are
converted to if_input().

Tested by mxb <mxb AT alumni DOT chalmers DOT se>, thanks!

ok henning@

Revision 1.52 / (download) - annotate - [select for diffs], Sat Mar 14 03:38:51 2015 UTC (9 years, 3 months ago) by jsg
Branch: MAIN
Changes since 1.51: +1 -2 lines
Diff to previous 1.51 (colored)

Remove some includes include-what-you-use claims don't
have any direct symbols used.  Tested for indirect use by compiling
amd64/i386/sparc64 kernels.

ok tedu@ deraadt@

Revision 1.51 / (download) - annotate - [select for diffs], Fri Dec 19 17:14:39 2014 UTC (9 years, 5 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.50: +1 -3 lines
Diff to previous 1.50 (colored)

unifdef INET in net code as a precursor to removing the pretend option.
long live the one true internet.
ok henning mikeb

Revision 1.50 / (download) - annotate - [select for diffs], Mon Sep 8 06:24:13 2014 UTC (9 years, 9 months ago) by jsg
Branch: MAIN
Changes since 1.49: +1 -2 lines
Diff to previous 1.49 (colored)

remove uneeded route.h includes
ok miod@ mpi@

Revision 1.49 / (download) - annotate - [select for diffs], Tue Jul 22 11:06:09 2014 UTC (9 years, 10 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.48: +1 -2 lines
Diff to previous 1.48 (colored)

Fewer <netinet/in_systm.h> !

Revision 1.48 / (download) - annotate - [select for diffs], Sat Jul 12 18:44:22 2014 UTC (9 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.47: +3 -3 lines
Diff to previous 1.47 (colored)

add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.

Revision 1.47 / (download) - annotate - [select for diffs], Sat Apr 19 15:54:39 2014 UTC (10 years, 1 month ago) by henning
Branch: MAIN
Changes since 1.46: +4 -5 lines
Diff to previous 1.46 (colored)

minus altq tentacles, plus missing IF_DROP here as well

Revision 1.46 / (download) - annotate - [select for diffs], Sun Oct 20 08:48:39 2013 UTC (10 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.45: +1 -5 lines
Diff to previous 1.45 (colored)

remove irrelevant comment

Revision 1.45 / (download) - annotate - [select for diffs], Thu Oct 17 16:27:40 2013 UTC (10 years, 7 months ago) by bluhm
Branch: MAIN
Changes since 1.44: +1 -2 lines
Diff to previous 1.44 (colored)

The header file netinet/in_var.h included netinet6/in6_var.h.  This
created a bunch of useless dependencies.  Remove this implicit
inclusion and do an explicit #include <netinet6/in6_var.h> when it
is needed.
OK mpi@ henning@

Revision 1.44 / (download) - annotate - [select for diffs], Thu Jun 20 12:03:40 2013 UTC (10 years, 11 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.43: +6 -5 lines
Diff to previous 1.43 (colored)

Revert previous and unbreak asr, the new include should be protected.

Reported by naddy@

Revision 1.43 / (download) - annotate - [select for diffs], Thu Jun 20 09:38:24 2013 UTC (10 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.42: +5 -6 lines
Diff to previous 1.42 (colored)

Allocate the various hook head descriptors as part of the ifnet
structure rather than doing various M_WAITOK allocations during
the *attach() functions, we always rely on them anyway.

ok mikeb@, uebayasi@

Revision 1.42 / (download) - annotate - [select for diffs], Fri Oct 5 17:17:04 2012 UTC (11 years, 8 months ago) by camield
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.41: +7 -20 lines
Diff to previous 1.41 (colored)

Point an interface directly to its bridgeport configuration, instead
of to the bridge itself.  This is ok, since an interface can only be part
of one bridge, and the parent bridge is easy to find from the bridgeport.

This way we can get rid of a lot of list walks, improving performance
and shortening the code.

ok henning stsp sthen reyk

Revision 1.41 / (download) - annotate - [select for diffs], Thu Sep 20 14:10:18 2012 UTC (11 years, 8 months ago) by mpf
Branch: MAIN
Changes since 1.40: +4 -3 lines
Diff to previous 1.40 (colored)

Don't filter spanning tree BPDUs. Either process, or forward them.
Even though this violates IEEE 802.1D, we'd rather avoid bridging loops
by not getting in the way of STP.
OK henning, camield, reyk

Revision 1.40 / (download) - annotate - [select for diffs], Sat Jul 9 04:53:33 2011 UTC (12 years, 11 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.39: +5 -1 lines
Diff to previous 1.39 (colored)

sned BPDUs at prio 6, just like lacp and carp, ryan zinke mpf

Revision 1.39 / (download) - annotate - [select for diffs], Sat Nov 20 14:23:09 2010 UTC (13 years, 6 months ago) by fgsch
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.38: +1 -6 lines
Diff to previous 1.38 (colored)

remove bs_list occurrences. fixes panic on destroy.
ok from the m guild: mikeb@ miod@ mpf@

Revision 1.38 / (download) - annotate - [select for diffs], Sun Oct 31 15:14:30 2010 UTC (13 years, 7 months ago) by mpf
Branch: MAIN
Changes since 1.37: +1 -8 lines
Diff to previous 1.37 (colored)

Remove unused bstp_list and bstp_attach.
OK blambert, claudio.

Revision 1.37 / (download) - annotate - [select for diffs], Thu Oct 28 13:49:54 2010 UTC (13 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.36: +2 -3 lines
Diff to previous 1.36 (colored)

A function that only returns NULL should return void.
bstp_input() always consumes the packet so remove the mbuf handling
dance around it.

Revision 1.36 / (download) - annotate - [select for diffs], Wed Sep 10 14:01:23 2008 UTC (15 years, 9 months ago) by blambert
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.35: +3 -3 lines
Diff to previous 1.35 (colored)

Convert timeout_add() calls using multiples of hz to timeout_add_sec()

Really just the low-hanging fruit of (hopefully) forthcoming timeout
conversions.

ok art@, krw@

Revision 1.35 / (download) - annotate - [select for diffs], Thu Aug 7 18:09:22 2008 UTC (15 years, 10 months ago) by damien
Branch: MAIN
Changes since 1.34: +13 -5 lines
Diff to previous 1.34 (colored)

account spanning tree frames in if_obytes and if_omcasts.

ok henning@

Revision 1.34 / (download) - annotate - [select for diffs], Sat Jun 14 19:13:42 2008 UTC (16 years ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.33: +1 -5 lines
Diff to previous 1.33 (colored)

Remove NBPFILTER conditional since we do not include "bpfilter.h" and the
<net/bpf.h> header is not required here.

ok henning@

Revision 1.33 / (download) - annotate - [select for diffs], Fri Jun 13 19:08:19 2008 UTC (16 years ago) by henning
Branch: MAIN
Changes since 1.32: +10 -12 lines
Diff to previous 1.32 (colored)

we used to use the lowest (so it is deterministic) mac address in the
system for the bridge ID for stp. That worksfine unless you have
two bridges in the system that talkto the same neighboring systems
(switches), because the two bridges on the openbsd system would have the
same ID.
fix by only looking at interfaces part of the bridge and using the lowest
mac address of these. works fine because stpcan only be enabled on
IFT_ETHER interfaces so there is always at least one and we re-evaluate
every time an interface is added or deleted from the bridge.
diff was rotting in my tree for at least a year, I have no idea what
triggered it really.
ok reyk mk djm

Revision 1.32 / (download) - annotate - [select for diffs], Wed May 21 21:10:50 2008 UTC (16 years ago) by mk
Branch: MAIN
Changes since 1.31: +2 -3 lines
Diff to previous 1.31 (colored)

Just clear the timeout since timeout_del() can cope with
unscheduled/already triggered timeouts.

ok brad claudio

Revision 1.31 / (download) - annotate - [select for diffs], Wed May 7 13:45:35 2008 UTC (16 years, 1 month ago) by dlg
Branch: MAIN
Changes since 1.30: +4 -4 lines
Diff to previous 1.30 (colored)

enable tx mitigation when putting packets on the wire by switching from
calls to ifp->if_start to if_start(). these are the obviously right cases
where we can do that, the less obvious ones may follow as theyre figured
out.

deraadt@ said to go for it

Revision 1.30 / (download) - annotate - [select for diffs], Mon Nov 26 09:28:33 2007 UTC (16 years, 6 months ago) by martynas
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.29: +10 -10 lines
Diff to previous 1.29 (colored)

typos;  ok jmc@
sys/netinet/in_pcb.c and sys/net/bridgestp.c ok henning@
sys/dev/pci/bktr/* ok jakemsr@

Revision 1.29 / (download) - annotate - [select for diffs], Tue Oct 30 09:04:47 2007 UTC (16 years, 7 months ago) by henning
Branch: MAIN
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)

fix a typo, LIST_FOREACH(bp2, ... and then using bp instead of bp2
inside that loop doesn't yield the expected results.
from freebsd r1.37 Andrew Thompson <thompsa@freebsd.org>

Revision 1.28 / (download) - annotate - [select for diffs], Sun Oct 14 12:27:35 2007 UTC (16 years, 8 months ago) by krw
Branch: MAIN
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)

'syncronize' -> 'synchronize'. From Diego Casati.

Revision 1.27 / (download) - annotate - [select for diffs], Sat Sep 15 16:43:51 2007 UTC (16 years, 8 months ago) by henning
Branch: MAIN
Changes since 1.26: +3 -5 lines
Diff to previous 1.26 (colored)

malloc sweep:
-remove useless casts
-MALLOC/FREE -> malloc/free
-use M_ZERO where appropriate instead of seperate bzero
feedback & ok krw, hshoexer

Revision 1.26 / (download) - annotate - [select for diffs], Thu Feb 15 12:43:26 2007 UTC (17 years, 3 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored)

Set topology change propagation on all ports _except_ the caller.

From FreeBSD

Revision 1.25 / (download) - annotate - [select for diffs], Wed Feb 14 00:53:48 2007 UTC (17 years, 4 months ago) by jsg
Branch: MAIN
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

Consistently spell FALLTHROUGH to appease lint.
ok kettenis@ cloder@ tom@ henning@

Revision 1.24 / (download) - annotate - [select for diffs], Mon Dec 11 22:11:48 2006 UTC (17 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.23: +14 -14 lines
Diff to previous 1.23 (colored)

refer to the RSTP point to point option as "PTP" instead of "P2P".
P2P is commonly used in relation to peer to peer networks, PTP is used
in various protocols for layer 2 point to point links (ie., full
duplex ethernet links).

note that the newly added brconfig commands [-]p2p and [-]autop2p will
change to [-]ptp and [-]autoptp.

suggested by Andrew Thompson (thompsa@freebsd.org)

Revision 1.23 / (download) - annotate - [select for diffs], Sun Dec 3 13:41:19 2006 UTC (17 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.22: +1871 -813 lines
Diff to previous 1.22 (colored)

Add Rapid Spanning Tree Protocol support (802.1d-2004) based on work
by Andrew Thompson (thompsa@freebsd.org). The local changes include
adoption to our bridge code, reduced stack usage and many other bits.
If stp is enabled, RSTP will now be used by default.

Thanks for help from Andrew.

This code has been in snaps for while now, commit encouraged by deraadt@

Revision 1.22 / (download) - annotate - [select for diffs], Fri Nov 24 11:50:32 2006 UTC (17 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.21: +6 -29 lines
Diff to previous 1.21 (colored)

never call an ioctl without process context! this diffs checks the
ifp->if_link_state instead of calling the ifmedia ioctl. this is safe
in timeouts without process context and allows to use bridge stp with
usb ethernet devices now.

figured out and tested by Stuart Henderson, closes pr 5304.

Revision 1.18.2.1 / (download) - annotate - [select for diffs], Wed May 10 20:15:30 2006 UTC (18 years, 1 month ago) by brad
Branch: OPENBSD_3_8
Changes since 1.18: +8 -8 lines
Diff to previous 1.18 (colored) next main 1.19 (colored)

MFC:
Fix by brad@

use the cu_bridge_id rather than the cu_rootid for the bridge address.

From: Onno Molenkamp via Andrew Thompson <thompsa at freebsd dot org>

Revision 1.19.2.1 / (download) - annotate - [select for diffs], Wed May 10 19:59:51 2006 UTC (18 years, 1 month ago) by brad
Branch: OPENBSD_3_9
Changes since 1.19: +8 -8 lines
Diff to previous 1.19 (colored) next main 1.20 (colored)

MFC:
Fix by brad@

use the cu_bridge_id rather than the cu_rootid for the bridge address.

From: Onno Molenkamp via Andrew Thompson <thompsa at freebsd dot org>

Revision 1.21 / (download) - annotate - [select for diffs], Tue Mar 7 18:21:10 2006 UTC (18 years, 3 months ago) by brad
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.20: +8 -8 lines
Diff to previous 1.20 (colored)

use the cu_bridge_id rather than the cu_rootid for the bridge address.

From: Onno Molenkamp via Andrew Thompson <thompsa at freebsd dot org>

ok jason@

Revision 1.20 / (download) - annotate - [select for diffs], Sat Mar 4 22:40:15 2006 UTC (18 years, 3 months ago) by brad
Branch: MAIN
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

With the exception of two other small uncommited diffs this moves
the remainder of the network stack from splimp to splnet.

ok miod@

Revision 1.19 / (download) - annotate - [select for diffs], Wed Oct 12 15:17:18 2005 UTC (18 years, 8 months ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE
Branch point for: OPENBSD_3_9
Changes since 1.18: +1 -4 lines
Diff to previous 1.18 (colored)

no need to call mfree() since m is always NULL; from Andrey Matveev

Revision 1.18 / (download) - annotate - [select for diffs], Tue Jun 7 17:53:44 2005 UTC (19 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE
Branch point for: OPENBSD_3_8
Changes since 1.17: +4 -4 lines
Diff to previous 1.17 (colored)

oops

Revision 1.17 / (download) - annotate - [select for diffs], Tue Jun 7 17:42:58 2005 UTC (19 years ago) by deraadt
Branch: MAIN
Changes since 1.16: +5 -3 lines
Diff to previous 1.16 (colored)

avoid retarded C unsigned char -> signed integer promotion rules.
mac->ac_enaddr[2] << 24 resulted in sign extension smashing other stuff
djast@cs.toronto.edu, ok mickey

Revision 1.5.4.6 / (download) - annotate - [select for diffs], Thu Feb 19 10:57:20 2004 UTC (20 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.5.4.5: +3 -3 lines
Diff to previous 1.5.4.5 (colored) to branchpoint 1.5 (colored) next main 1.6 (colored)

Merge of current from two weeks agointo the SMP branch

Revision 1.16 / (download) - annotate - [select for diffs], Sun Nov 16 20:30:07 2003 UTC (20 years, 6 months ago) by avsm
Branch: MAIN
CVS Tags: SMP_SYNC_B, SMP_SYNC_A, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)

convert __attribute__((__packed__)) to __packed so that parsers unaware
of gcc extensions have more of a chance.
ok mcbride@, no objections from millert@, deraadt@

Revision 1.5.4.5 / (download) - annotate - [select for diffs], Sat Jun 7 11:06:06 2003 UTC (21 years ago) by ho
Branch: SMP
Changes since 1.5.4.4: +1 -6 lines
Diff to previous 1.5.4.4 (colored) to branchpoint 1.5 (colored)

Sync SMP branch to -current

Revision 1.15 / (download) - annotate - [select for diffs], Mon Jun 2 18:42:56 2003 UTC (21 years ago) by jason
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.14: +1 -6 lines
Diff to previous 1.14 (colored)

nuke clause 3 & 4

Revision 1.7.4.3 / (download) - annotate - [select for diffs], Mon May 19 22:29:06 2003 UTC (21 years ago) by tedu
Branch: UBC
Changes since 1.7.4.2: +32 -20 lines
Diff to previous 1.7.4.2 (colored) to branchpoint 1.7 (colored) next main 1.8 (colored)

sync

Revision 1.5.4.4 / (download) - annotate - [select for diffs], Fri Mar 28 00:41:28 2003 UTC (21 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.5.4.3: +33 -21 lines
Diff to previous 1.5.4.3 (colored) to branchpoint 1.5 (colored)

Sync the SMP branch with 3.3

Revision 1.14 / (download) - annotate - [select for diffs], Tue Dec 10 13:22:55 2002 UTC (21 years, 6 months ago) by markus
Branch: MAIN
CVS Tags: UBC_SYNC_A, OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.13: +4 -4 lines
Diff to previous 1.13 (colored)

check IFF_RUNNING early in bstp_transmit_tcn; from netbsd; ok jason@

Revision 1.13 / (download) - annotate - [select for diffs], Mon Dec 9 18:56:14 2002 UTC (21 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.12: +25 -16 lines
Diff to previous 1.12 (colored)

knf

Revision 1.12 / (download) - annotate - [select for diffs], Mon Dec 9 10:11:52 2002 UTC (21 years, 6 months ago) by markus
Branch: MAIN
Changes since 1.11: +2 -1 lines
Diff to previous 1.11 (colored)

allow setting of ifcost with brconfig.  enables selection of preferred
port/path to root bridge among several LANs.   unlike ifpriority, which
allows you to select designated port if serveral interfaces belong
to the same LAN;  ok jason@

Revision 1.11 / (download) - annotate - [select for diffs], Wed Dec 4 15:44:21 2002 UTC (21 years, 6 months ago) by markus
Branch: MAIN
Changes since 1.10: +3 -1 lines
Diff to previous 1.10 (colored)

spanning tree: flush dynamic mac cache if interface goes to the
blocking or disabled state.  send packets only if interface is the
forwarding state; comment from netbsd; with and ok jason@

Revision 1.10 / (download) - annotate - [select for diffs], Tue Nov 26 17:34:43 2002 UTC (21 years, 6 months ago) by jason
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

Call the enable function, don't set the variable directly.

Revision 1.7.4.2 / (download) - annotate - [select for diffs], Tue Oct 29 00:36:45 2002 UTC (21 years, 7 months ago) by art
Branch: UBC
Changes since 1.7.4.1: +3 -3 lines
Diff to previous 1.7.4.1 (colored) to branchpoint 1.7 (colored)

sync to -current

Revision 1.9 / (download) - annotate - [select for diffs], Tue Sep 24 19:52:20 2002 UTC (21 years, 8 months ago) by jason
Branch: MAIN
CVS Tags: UBC_SYNC_B, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

sizeof(structure) not sizeof(structure *); pointed out by dvamsi@yahoo.com.

Revision 1.7.4.1 / (download) - annotate - [select for diffs], Tue Jun 11 03:30:45 2002 UTC (22 years ago) by art
Branch: UBC
Changes since 1.7: +49 -49 lines
Diff to previous 1.7 (colored)

Sync UBC branch to -current

Revision 1.5.4.3 / (download) - annotate - [select for diffs], Thu Mar 28 14:57:36 2002 UTC (22 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.5.4.2: +49 -49 lines
Diff to previous 1.5.4.2 (colored) to branchpoint 1.5 (colored)

Merge in -current from roughly a week ago

Revision 1.8 / (download) - annotate - [select for diffs], Thu Mar 14 01:27:09 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.7: +49 -49 lines
Diff to previous 1.7 (colored)

First round of __P removal in sys

Revision 1.5.4.2 / (download) - annotate - [select for diffs], Wed Jul 4 10:53:52 2001 UTC (22 years, 11 months ago) by niklas
Branch: SMP
Changes since 1.5.4.1: +10 -14 lines
Diff to previous 1.5.4.1 (colored) to branchpoint 1.5 (colored)

Merge in -current from two days ago in the SMP branch.
As usual with merges, they do not indicate progress, so do not hold
your breath for working SMP, and do not mail me and ask about the
state of it.  It has not changed.  There is work ongoing, but very, very
slowly.  The commit is done in parts as to not lock up the tree in too
big chunks at a time.

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jun 27 06:07:37 2001 UTC (22 years, 11 months ago) by kjc
Branch: MAIN
CVS Tags: UBC_BASE, OPENBSD_3_0_BASE, OPENBSD_3_0
Branch point for: UBC
Changes since 1.6: +10 -9 lines
Diff to previous 1.6 (colored)

introduce the ALTQ queue macros into sys/net files.
the new model removes direct references to the fields in ifp->if_snd,
and defines the following macros to manipulate ifp->if_snd.
  IFQ_ENQUEUE(ifq, m, pktattr, err)
  IFQ_DEQUEUE(ifq, m)
  IFQ_POLL(ifq, m)
  IFQ_PURGE(ifq)
  IFQ_IS_EMPTY(ifq)

the new model also enforces some rules regarding how to use these macros.
details are descrined in
http://www.csl.sony.co.jp/~kjc/software/altq-new-design.txt

Revision 1.6 / (download) - annotate - [select for diffs], Wed May 30 02:12:23 2001 UTC (23 years ago) by deraadt
Branch: MAIN
Changes since 1.5: +1 -6 lines
Diff to previous 1.5 (colored)

Remove ipf.  Darren Reed has interpreted his (old, new, whichever)
licence in a way that makes ipf not free according to the rules we
established over 5 years ago, at www.openbsd.org/goals.html (and those
same basic rules govern the other *BSD projects too).  Specifically,
Darren says that modified versions are not permitted.  But software
which OpenBSD uses and redistributes must be free to all (be they
people or companies), for any purpose they wish to use it, including
modification, use, peeing on, or even integration into baby mulching
machines or atomic bombs to be dropped on Australia.  Furthermore, we
know of a number of companies using ipf with modification like us, who
are now in the same situation, and we hope that some of them will work
with us to fill this gap that now exists in OpenBSD (temporarily, we
hope).

Revision 1.5.4.1 / (download) - annotate - [select for diffs], Mon May 14 22:39:59 2001 UTC (23 years, 1 month ago) by niklas
Branch: SMP
Changes since 1.5: +1 -1 lines
Diff to previous 1.5 (colored)

merge in approximately 2.9 into SMP branch

Revision 1.5 / (download) - annotate - [select for diffs], Thu Mar 22 03:48:29 2001 UTC (23 years, 2 months ago) by jason
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Branch point for: SMP
Changes since 1.4: +23 -42 lines
Diff to previous 1.4 (colored)

let bstp_transmit_tcn() handle all of the work for sending TCN messages
and remove unnecessary structure element

Revision 1.4 / (download) - annotate - [select for diffs], Tue Jan 30 04:22:23 2001 UTC (23 years, 4 months ago) by kjell
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

change ip_compat.h to ip_fil_compat.h for clarity. Impending ipf merge

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jan 17 04:47:18 2001 UTC (23 years, 4 months ago) by fgsch
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

IPF 3.4.15. (IPv6 not working yet).

Note: before building the userland part you need to do make includes.

Revision 1.2 / (download) - annotate - [select for diffs], Mon Dec 18 03:38:56 2000 UTC (23 years, 5 months ago) by mickey
Branch: MAIN
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored)

include timeout.h to make it compile w/o ipfilter

Revision 1.1 / (download) - annotate - [select for diffs], Tue Dec 12 03:41:22 2000 UTC (23 years, 6 months ago) by jason
Branch: MAIN

Add support for 802.1D spanning tree protocol.
NOTE: this requires recompiling brconfig with updated include files.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.