Skip to content

Commit

Permalink
[#5] network-server: Cast UDP modules to proper interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukkai authored and PiotrZierhoffer committed Jun 21, 2021
1 parent cfa3a83 commit 1d6b8a5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Renode/Network/NetworkServer/NetworkServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,9 @@ private void HandleUdp(UdpPacket packet)
return;
}

var src = new IPEndPoint(((IPv4Packet)packet.ParentPacket).SourceAddress, packet.SourcePort);
module.HandleUdp(src, packet, (s, r) => HandleUdpResponse(s, r));
var src = new IPEndPoint(((IPv4Packet)packet.ParentPacket).SourceAddress, packet.SourcePort);
((IUdpServerModule)module).HandleUdp(src, packet,
(s, r) => HandleUdpResponse(s, r));
}

private void HandleUdpResponse(IPEndPoint source, UdpPacket response)
Expand Down

0 comments on commit 1d6b8a5

Please sign in to comment.