summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/socket
diff options
context:
space:
mode:
authorKevin Krakauer <krakauer@google.com>2020-01-08 17:30:08 -0800
committerKevin Krakauer <krakauer@google.com>2020-01-08 17:30:08 -0800
commitae060a63d9ad1bfb65b84a2ccbaf2893c5a50b76 (patch)
treed197b3be9e002a71ef7b1493c1a6804460a3e0ec /pkg/sentry/socket
parentf26a576984052a235b63ec79081a8c4a8c8ffc00 (diff)
More GH comments.
Diffstat (limited to 'pkg/sentry/socket')
-rw-r--r--pkg/sentry/socket/netfilter/netfilter.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/sentry/socket/netfilter/netfilter.go b/pkg/sentry/socket/netfilter/netfilter.go
index 799865b03..60bb30a9f 100644
--- a/pkg/sentry/socket/netfilter/netfilter.go
+++ b/pkg/sentry/socket/netfilter/netfilter.go
@@ -210,8 +210,8 @@ func marshalTarget(target iptables.Target) []byte {
return marshalStandardTarget(iptables.Accept)
case iptables.UnconditionalDropTarget:
return marshalStandardTarget(iptables.Drop)
- case iptables.PanicTarget:
- return marshalPanicTarget()
+ case iptables.ErrorTarget:
+ return marshalErrorTarget()
default:
panic(fmt.Errorf("unknown target of type %T", target))
}
@@ -230,7 +230,7 @@ func marshalStandardTarget(verdict iptables.Verdict) []byte {
return binary.Marshal(ret, usermem.ByteOrder, target)
}
-func marshalPanicTarget() []byte {
+func marshalErrorTarget() []byte {
// This is an error target named error
target := linux.XTErrorTarget{
Target: linux.XTEntryTarget{
@@ -438,7 +438,7 @@ func parseTarget(optVal []byte) (iptables.Target, uint32, *syserr.Error) {
// rules have an error with the name of the chain.
switch errorTarget.Name.String() {
case errorTargetName:
- return iptables.PanicTarget{}, linux.SizeOfXTErrorTarget, nil
+ return iptables.ErrorTarget{}, linux.SizeOfXTErrorTarget, nil
default:
log.Infof("Unknown error target %q doesn't exist or isn't supported yet.", errorTarget.Name.String())
return nil, 0, syserr.ErrInvalidArgument