public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* pasta does not correctly handle bind errors with port ranges
@ 2024-02-09 16:57 Paul Holzinger
  2024-02-09 21:09 ` Stefano Brivio
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Holzinger @ 2024-02-09 16:57 UTC (permalink / raw)
  To: passt-dev

Hi all,
I found some issues with the pasta port binding logic, it does not 
correctly handle errors when trying to bind a port range.
Let's first bind a port so we can force an error condition it:
$ nc -l -p 8080 &
$ pasta -t 8080  true
Failed to bind any port for '-t 8080', exiting <-- fails as expected
$ pasta -t 8081 -t 8080  true
Failed to bind any port for '-t 8080', exiting <-- here it also fails 
correctly
$ pasta -t 8080-8081  true
<-- no error even though pasta could not bind 8080

Also besides this I find the error message less than ideal. It missing 
the errno from the bind syscall so important context gets lost (i.e. 
Address already in use vs Permission denied).


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-02-14 10:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-09 16:57 pasta does not correctly handle bind errors with port ranges Paul Holzinger
2024-02-09 21:09 ` Stefano Brivio
2024-02-12 11:45   ` Paul Holzinger
2024-02-12 14:13     ` Stefano Brivio
2024-02-12 14:43       ` Paul Holzinger
2024-02-12 16:56         ` Stefano Brivio
2024-02-14  9:15           ` Stefano Brivio
2024-02-14 10:24             ` Paul Holzinger

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).