From: Stephen Hemminger <stephen@networkplumber.org>
To: netdev@vger.kernel.org
Subject: Fw: [Bug 201773] New: IP_FREEBIND doesn’t counteract global
Date: Fri, 23 Nov 2018 09:23:27 -0800 [thread overview]
Message-ID: <20181123092327.2ec1ac5e@xeon-e3> (raw)
Could be a bug, or just how it works?
Begin forwarded message:
Date: Thu, 22 Nov 2018 22:51:12 +0000
From: bugzilla-daemon@bugzilla.kernel.org
To: stephen@networkplumber.org
Subject: [Bug 201773] New: IP_FREEBIND doesn’t counteract global
https://bugzilla.kernel.org/show_bug.cgi?id=201773
Bug ID: 201773
Summary: IP_FREEBIND doesn’t counteract global
Product: Networking
Version: 2.5
Kernel Version: 3.10.0-862.11.6.el7.x86_64
Hardware: All
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: IPV4
Assignee: stephen@networkplumber.org
Reporter: felipe@felipegasper.com
Regression: No
The following should fail, regardless of /proc/sys/net/ipv4/ip_nonlocal_bind:
-----
> strace -e socket,setsockopt,bind perl -MSocket -Mautodie -e'socket my $s,
> PF_INET, SOCK_STREAM, 0; setsockopt( $s, IPPROTO_IP, 15, 0 ); bind( $s,
> pack_sockaddr_in( 0, inet_aton("1.2.3.4") ) );'
socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = 3
setsockopt(3, SOL_IP, IP_FREEBIND, [0], 4) = 0
bind(3, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("1.2.3.4")},
16) = 0
+++ exited with 0 +++
-----
… however, it appears that setsockopt() doesn’t disable IP_FREEBIND if
ip_nonlocal_bind is set via /proc.
--
You are receiving this mail because:
You are the assignee for the bug.
reply other threads:[~2018-11-24 4:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181123092327.2ec1ac5e@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox