summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/iptables
diff options
context:
space:
mode:
authorNayana Bidari <nybidari@google.com>2020-03-06 09:25:32 -0800
committerNayana Bidari <nybidari@google.com>2020-03-06 09:25:32 -0800
commit1e8c0bcedb265d3149e5d2ab1181628d013539c4 (patch)
tree39dcc9fa47cee600231d00588cc4a540f513ece8 /pkg/tcpip/iptables
parentaf6fab651406c411ef848c360b017713de385880 (diff)
Add nat table support for iptables.
Diffstat (limited to 'pkg/tcpip/iptables')
-rw-r--r--pkg/tcpip/iptables/targets.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/tcpip/iptables/targets.go b/pkg/tcpip/iptables/targets.go
index ae5af7c53..e457f2349 100644
--- a/pkg/tcpip/iptables/targets.go
+++ b/pkg/tcpip/iptables/targets.go
@@ -69,7 +69,7 @@ func (ReturnTarget) Action(tcpip.PacketBuffer) (RuleVerdict, int) {
// Min and Max values for IP and Ports in the struct indicate the range of
// values which can be used to redirect.
type RedirectTarget struct {
- // TODO(gvisor.dev/issue/170): Other flags need to be aded after
+ // TODO(gvisor.dev/issue/170): Other flags need to be added after
// we support them.
// RangeProtoSpecified flag indicates single port is specified to
// redirect.
@@ -98,7 +98,7 @@ func (rt RedirectTarget) Action(pkt tcpip.PacketBuffer) (RuleVerdict, int) {
// Set network header.
headerView := newPkt.Data.First()
netHeader := header.IPv4(headerView)
- newPkt.NetworkHeader = headerView[:netHeader.HeaderLength()]
+ newPkt.NetworkHeader = headerView[:header.IPv4MinimumSize]
hlen := int(netHeader.HeaderLength())
tlen := int(netHeader.TotalLength())