diff options
author | aleksej <aleksej.paschenko@gmail.com> | 2019-10-27 15:14:35 +0300 |
---|---|---|
committer | aleksej <aleksej.paschenko@gmail.com> | 2019-10-27 15:28:15 +0300 |
commit | 352ae1022ce19de28fc72e034cc469872ad79d06 (patch) | |
tree | daab172474c8a917a589a2142fc66ae9cba272c3 /pkg/sentry/inet/inet.go | |
parent | 1c480abc39b9957606ff8bf125a5c253ad8a76cb (diff) |
Add /proc/sys/net/ipv4/ip_forward
Diffstat (limited to 'pkg/sentry/inet/inet.go')
-rw-r--r-- | pkg/sentry/inet/inet.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/sentry/inet/inet.go b/pkg/sentry/inet/inet.go index bc6cb1095..6217100b2 100644 --- a/pkg/sentry/inet/inet.go +++ b/pkg/sentry/inet/inet.go @@ -15,6 +15,8 @@ // Package inet defines semantics for IP stacks. package inet +import "gvisor.dev/gvisor/pkg/tcpip" + // Stack represents a TCP/IP stack. type Stack interface { // Interfaces returns all network interfaces as a mapping from interface @@ -58,6 +60,12 @@ type Stack interface { // Resume restarts the network stack after restore. Resume() + + // Forwarding returns if packet forwarding between NICs is enabled. + Forwarding(protocol tcpip.NetworkProtocolNumber) bool + + // SetForwarding enables or disables packet forwarding between NICs. + SetForwarding(protocol tcpip.NetworkProtocolNumber, enable bool) error } // Interface contains information about a network interface. |