summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/sample
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/tcpip/sample')
-rw-r--r--pkg/tcpip/sample/tun_tcp_connect/main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/tcpip/sample/tun_tcp_connect/main.go b/pkg/tcpip/sample/tun_tcp_connect/main.go
index f44237295..19276aca7 100644
--- a/pkg/tcpip/sample/tun_tcp_connect/main.go
+++ b/pkg/tcpip/sample/tun_tcp_connect/main.go
@@ -233,7 +233,7 @@ func main() {
// Create TCP endpoint.
var rawWq waiter.Queue
- rawEp, tcperr := raw.NewEndpoint(s, ipv4.ProtocolNumber, 47, &rawWq)
+ rawEp, tcperr := raw.NewEndpoint(s, ipv4.ProtocolNumber, header.GREProtocolNumber, &rawWq)
if tcperr != nil {
log.Fatal(tcperr)
}
@@ -260,7 +260,7 @@ func main() {
Raddr: fraddr,
}
greFwd := gre.NewForwarder(s, greInfo.greHandler)
- s.SetTransportProtocolHandler(47, greFwd.HandlePacket)
+ s.SetTransportProtocolHandler(header.GREProtocolNumber, greFwd.HandlePacket)
go greInfo.greRead(chEP)
//greEP.Bind(s, greIP)