git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stp: Fix bpdu tx problem in listening state
[sliver-openvswitch.git]
/
lib
/
stp.c
diff --git
a/lib/stp.c
b/lib/stp.c
index
afe77d0
..
c5aec57
100644
(file)
--- a/
lib/stp.c
+++ b/
lib/stp.c
@@
-684,6
+684,15
@@
stp_learn_in_state(enum stp_state state)
return (state & (STP_DISABLED | STP_LEARNING | STP_FORWARDING)) != 0;
}
return (state & (STP_DISABLED | STP_LEARNING | STP_FORWARDING)) != 0;
}
+/* Returns true if 'state' is one in which rx&tx bpdu should be done on
+ * on a port, false otherwise. */
+bool
+stp_listen_in_state(enum stp_state state)
+{
+ return (state &
+ (STP_LISTENING | STP_LEARNING | STP_FORWARDING)) != 0;
+}
+
/* Returns the name for the given 'role' (for use in debugging and log
* messages). */
const char *
/* Returns the name for the given 'role' (for use in debugging and log
* messages). */
const char *