Skip to content

Commit e07aedb

Browse files
committed
f
1 parent b6175bc commit e07aedb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tcpip/udpnat/service.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,19 @@ func (s *Service) HandlePacket(source netip.AddrPort, destination netip.AddrPort
7171
}
7272
}
7373

74-
func (s *Service) HandlePacketControl(source netip.AddrPort, destination netip.AddrPort, packet *buffer.PacketBuffer, controlMessage []byte, constructor func(natConn *NATConn) (context.Context, N.PacketWriter)) {
74+
func (s *Service) HandlePacketControl(source netip.AddrPort, packet *buffer.PacketBuffer, controlMessage []byte, constructor func(natConn *NATConn) (context.Context, N.PacketWriter)) {
7575
conn, loaded := s.table.LoadOrStore(source, createNatConn)
7676
if !loaded {
7777
conn.ctx, conn.writer = constructor(conn)
7878
conn.ctx, conn.cancel = common.ContextWithCancelCause(conn.ctx)
7979
*conn = NATConn{
8080
source: source,
81-
destination: destination,
81+
destination: packet.Destination,
8282
recvChan: make(chan *buffer.PacketBuffer, s.capacity),
8383
}
8484
} else if common.Done(conn.ctx) {
8585
s.table.Delete(source)
86-
s.HandlePacketControl(source, destination, packet, controlMessage, constructor)
86+
s.HandlePacketControl(source, packet, controlMessage, constructor)
8787
return
8888
}
8989
if udpcontrol.SocketControlMessageBufferSize > 0 {

0 commit comments

Comments
 (0)