summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot/network.go
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2018-07-03 11:38:08 -0700
committerShentubot <shentubot@google.com>2018-07-03 11:39:17 -0700
commit0ef606616732e1daf9d424658c31e5fed8f1ee4a (patch)
treedeb3d6808e14e8f37b61a50a8bec1ebbecc6b2c6 /runsc/boot/network.go
parentc1b4c1ffee850aea2880f5f91a1e48e840933c71 (diff)
Resend packets back to netstack if destined to itself
Add option to redirect packet back to netstack if it's destined to itself. This fixes the problem where connecting to the local NIC address would not work, e.g.: echo bar | nc -l -p 8080 & echo foo | nc 192.168.0.2 8080 PiperOrigin-RevId: 203157739 Change-Id: I31c9f7c501e3f55007f25e1852c27893a16ac6c4
Diffstat (limited to 'runsc/boot/network.go')
-rw-r--r--runsc/boot/network.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/runsc/boot/network.go b/runsc/boot/network.go
index d2b52c823..df45218b9 100644
--- a/runsc/boot/network.go
+++ b/runsc/boot/network.go
@@ -134,11 +134,10 @@ func (n *Network) CreateLinksAndRoutes(args *CreateLinksAndRoutesArgs, _ *struct
}
linkEP := fdbased.New(&fdbased.Options{
- FD: newFD,
- MTU: uint32(link.MTU),
- ChecksumOffload: false,
- EthernetHeader: true,
- Address: tcpip.LinkAddress(generateRndMac()),
+ FD: newFD,
+ MTU: uint32(link.MTU),
+ EthernetHeader: true,
+ Address: tcpip.LinkAddress(generateRndMac()),
})
log.Infof("Enabling interface %q with id %d on addresses %+v", link.Name, nicID, link.Addresses)