diff options
author | Kevin Krakauer <krakauer@google.com> | 2020-01-21 14:47:17 -0800 |
---|---|---|
committer | Kevin Krakauer <krakauer@google.com> | 2020-01-21 14:47:17 -0800 |
commit | 9143fcd7fd38243dd40f927dafaeb75f6ef8ef49 (patch) | |
tree | db8e6b1a6ef8916d9e0010805ce148c7a7ae09c7 /pkg/tcpip/iptables/iptables.go | |
parent | 9f736ac6a7747917f690596ac9b072c108b5670c (diff) |
Add UDP matchers.
Diffstat (limited to 'pkg/tcpip/iptables/iptables.go')
-rw-r--r-- | pkg/tcpip/iptables/iptables.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/tcpip/iptables/iptables.go b/pkg/tcpip/iptables/iptables.go index fc06b5b87..accedba1e 100644 --- a/pkg/tcpip/iptables/iptables.go +++ b/pkg/tcpip/iptables/iptables.go @@ -138,6 +138,8 @@ func EmptyFilterTable() Table { // Check runs pkt through the rules for hook. It returns true when the packet // should continue traversing the network stack and false when it should be // dropped. +// +// Precondition: pkt.NetworkHeader is set. func (it *IPTables) Check(hook Hook, pkt tcpip.PacketBuffer) bool { // TODO(gvisor.dev/issue/170): A lot of this is uncomplicated because // we're missing features. Jumps, the call stack, etc. aren't checked @@ -163,6 +165,7 @@ func (it *IPTables) Check(hook Hook, pkt tcpip.PacketBuffer) bool { return true } +// Precondition: pkt.NetworkHeader is set. func (it *IPTables) checkTable(hook Hook, pkt tcpip.PacketBuffer, tablename string) Verdict { // Start from ruleIdx and walk the list of rules until a rule gives us // a verdict. |