Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
aports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
alpine
aports
Commits
34b5c076
Commit
34b5c076
authored
1 year ago
by
Nash Kaminski
Committed by
alice
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
main/fping: backport fix for ping from unprivileged containers
parent
b6dc9ce2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
main/fping/APKBUILD
+5
-2
5 additions, 2 deletions
main/fping/APKBUILD
main/fping/unprivileged-ping.patch
+28
-0
28 additions, 0 deletions
main/fping/unprivileged-ping.patch
with
33 additions
and
2 deletions
main/fping/APKBUILD
+
5
−
2
View file @
34b5c076
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname
=
fping
pkgname
=
fping
pkgver
=
5.1
pkgver
=
5.1
pkgrel
=
1
pkgrel
=
2
pkgdesc
=
"A utility to ping multiple hosts at once"
pkgdesc
=
"A utility to ping multiple hosts at once"
url
=
"https://fping.org/"
url
=
"https://fping.org/"
arch
=
"all"
arch
=
"all"
license
=
"MIT"
license
=
"MIT"
makedepends
=
"libcap"
makedepends
=
"libcap"
subpackages
=
"
$pkgname
-doc"
subpackages
=
"
$pkgname
-doc"
source
=
"https://fping.org/dist/fping-
$pkgver
.tar.gz"
source
=
"https://fping.org/dist/fping-
$pkgver
.tar.gz
unprivileged-ping.patch
"
options
=
"!check"
# no testsuite
options
=
"!check"
# no testsuite
build
()
{
build
()
{
...
@@ -28,4 +30,5 @@ package() {
...
@@ -28,4 +30,5 @@ package() {
sha512sums
=
"
sha512sums
=
"
1a208da8dcd99093d0512af5d85ba5e7b5743ec97993d24c1fe612bb58d93090ac1ba0952f648aa075f16d390a77c4be65e394ae56dbede2a6914e0e8c68e2bd fping-5.1.tar.gz
1a208da8dcd99093d0512af5d85ba5e7b5743ec97993d24c1fe612bb58d93090ac1ba0952f648aa075f16d390a77c4be65e394ae56dbede2a6914e0e8c68e2bd fping-5.1.tar.gz
57fb8976a382ef21200430a238985cec04ecb72458e67d02ae4eac3af4f14108ad90460d562ee9f46a579d6226335b9391542c641acd2c6e1736fa138176e52f unprivileged-ping.patch
"
"
This diff is collapsed.
Click to expand it.
main/fping/unprivileged-ping.patch
0 → 100644
+
28
−
0
View file @
34b5c076
Patch-Source: https://github.com/schweikert/fping/commit/e975a4339b24716fb57bed234b0a1176f2bf3451
--
Author: David Schweikert <david@schweikert.ch>
Committer: Nash Kaminski <Nash.Kaminski@ny.email.gs.com>
Summary: This patch backports the upstream bugfix from
https://github.com/schweikert/fping/issues/248
for a regression introduced in version 5.1 which
prevents fping from functioning when run in an
unprivileged container.
----
diff --git a/src/fping.c b/src/fping.c
index e26b216c..0bd2b70c 100644
--- a/src/fping.c
+++ b/src/fping.c
@@ -1104,11 +1104,11 @@
int main(int argc, char** argv)
exit(num_noaddress ? 2 : 1);
}
- if (src_addr_set && socket4 >= 0) {
+ if (socket4 >= 0 && (src_addr_set || socktype4 == SOCK_DGRAM)) {
socket_set_src_addr_ipv4(socket4, &src_addr, (socktype4 == SOCK_DGRAM) ? &ident4 : NULL);
}
#ifdef IPV6
- if (src_addr6_set && socket6 >= 0) {
+ if (socket6 >= 0 && (src_addr6_set || socktype4 == SOCK_DGRAM)) {
socket_set_src_addr_ipv6(socket6, &src_addr6, (socktype6 == SOCK_DGRAM) ? &ident6 : NULL);
}
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment