Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document and incorporate the perl ping module patch #801

Open
sarcasticadmin opened this issue Nov 25, 2024 · 1 comment
Open

document and incorporate the perl ping module patch #801

sarcasticadmin opened this issue Nov 25, 2024 · 1 comment

Comments

@sarcasticadmin
Copy link
Member

Description

per @owendelong message in signal there is a patch that should be incorporated into the ping perl module. Lets document this for others and we can also incorporate this into the patch within our nix shell.

Patch:

% diff dist_[Ping.pm](http://ping.pm/) od_[Ping.pm](http://ping.pm/) 
230c230
<     croak("icmp ping requires root privilege") if !_isroot();
---
>     croak("icmp ping requires root privilege") if !_isroot() && ($^O ne "linux");
235,236c235,244
<     socket($self->{fh}, PF_INET, SOCK_RAW, $self->{proto_num}) ||
<       croak("icmp socket error - $!");
---
>     if ($^O eq "linux")
>     {
> 	    socket($self->{fh}, PF_INET, SOCK_DGRAM, $self->{proto_num}) ||
> 	      croak("icmp socket error - $!");
>     }
>     else
>     {
> 	    socket($self->{fh}, PF_INET, SOCK_RAW, $self->{proto_num}) ||
> 	      croak("icmp socket error - $!");
>     }
253,254c261,270
<     socket($self->{fh}, $AF_INET6, SOCK_RAW, $self->{proto_num}) ||
<       croak("icmp socket error - $!");
---
>     if ($^O eq "linux")
>     {
> 	    socket($self->{fh}, $AF_INET6, SOCK_DGRAM, $self->{proto_num}) ||
> 	      croak("icmp socket error - $!");
>     }
>     else
>     {
> 	    socket($self->{fh}, $AF_INET6, SOCK_RAW, $self->{proto_num}) ||
> 	      croak("icmp socket error - $!");
>     }

Acceptance Criteria

  • patch is more widely know and documented for the teams
  • patch incorporated into default nix shell
@djacu
Copy link
Contributor

djacu commented Nov 26, 2024

This should be trivial to add to the overlays once #800 is merged.

Need more info from @owendelong about which package needs patching. I'm not able to infer it from the patch above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants