summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport/tcp/segment.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-11-06 18:47:55 +0000
committergVisor bot <gvisor-bot@google.com>2019-11-06 18:47:55 +0000
commit4ec194e875df4394464a9049633f24d773f87fa4 (patch)
tree3acd15eb33782f300f9dc19609bd0fbb28683b66 /pkg/tcpip/transport/tcp/segment.go
parent9c1f9459ba42f9ead08666aa45a648f0434c94bb (diff)
parentd0d89ceeddd21f1f22e818d78dc3b07d3669dbb5 (diff)
Merge release-20190806.1-374-gd0d89ce (automated)
Diffstat (limited to 'pkg/tcpip/transport/tcp/segment.go')
-rw-r--r--pkg/tcpip/transport/tcp/segment.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/pkg/tcpip/transport/tcp/segment.go b/pkg/tcpip/transport/tcp/segment.go
index ea725d513..c4a89525e 100644
--- a/pkg/tcpip/transport/tcp/segment.go
+++ b/pkg/tcpip/transport/tcp/segment.go
@@ -99,8 +99,14 @@ func (s *segment) clone() *segment {
return t
}
-func (s *segment) flagIsSet(flag uint8) bool {
- return (s.flags & flag) != 0
+// flagIsSet checks if at least one flag in flags is set in s.flags.
+func (s *segment) flagIsSet(flags uint8) bool {
+ return s.flags&flags != 0
+}
+
+// flagsAreSet checks if all flags in flags are set in s.flags.
+func (s *segment) flagsAreSet(flags uint8) bool {
+ return s.flags&flags == flags
}
func (s *segment) decRef() {