fix: Destination ports used in network traffic
This commit is contained in:
@@ -110,8 +110,8 @@ pub async fn connect(config: PathBuf, ip: SocketAddr) -> anyhow::Result<()> {
|
||||
Ok(packet) => {
|
||||
let (count, addr) = packet?;
|
||||
|
||||
if addr != ip {
|
||||
bail!("received response from wrong source");
|
||||
if addr.ip() != ip.ip() {
|
||||
bail!("received response from wrong source (expected {ip:?}; got {addr:?})");
|
||||
}
|
||||
|
||||
let data = &buf[..count];
|
||||
|
||||
Reference in New Issue
Block a user