Skip to content

phillip/781: elevate debug log if can't get a socket on bsd to fatal#783

Merged
zakird merged 3 commits intomainfrom
phillip/781
Feb 16, 2024
Merged

phillip/781: elevate debug log if can't get a socket on bsd to fatal#783
zakird merged 3 commits intomainfrom
phillip/781

Conversation

@phillip-stephens
Copy link
Contributor

Noticed in testing this PR that if the user forgets sudo, there were a bunch of errors printed on Mac. @droe had the exact same setup but wasn't seeing this behavior, which is odd. Either way, I think this fix makes sense. If you can't get a socket, you can't send packets, so this should be a fatal error, IMO.

@phillip-stephens phillip-stephens marked this pull request as ready for review February 15, 2024 06:20
@phillip-stephens phillip-stephens added this to the ZMap 4.1 milestone Feb 15, 2024
@droe
Copy link
Contributor

droe commented Feb 15, 2024

Concur failure to create socket should lead to a fatal error, two comments:

  • CAP_NET_RAW mentioned in the error string is a Linux thing and not applicable to macOS or any of the BSDs.
  • There are four more failure paths like this one, so I'm thinking a more thorough fix would cover those too.

@phillip-stephens
Copy link
Contributor Author

@droe appreciate your help with this and lending your knowledge of Linux + BSD networking.

  1. Thanks, fixed this!
  2. Fair, I've addressed. LMK if it looks good to you!

@droe
Copy link
Contributor

droe commented Feb 15, 2024

lgtm, thanks — and thanks for bearing with my PRs!

@zakird
Copy link
Member

zakird commented Feb 15, 2024

looks good, thank you both!!

@zakird zakird merged commit 1eb14bc into main Feb 16, 2024
@zakird zakird deleted the phillip/781 branch February 16, 2024 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MacOS w/ --iplayer option floods std. out with errors when not run with sudo

3 participants