netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fw: [Bug 201773] New: IP_FREEBIND doesn’t counteract global
@ 2018-11-23 17:23 Stephen Hemminger
  0 siblings, 0 replies; only message in thread
From: Stephen Hemminger @ 2018-11-23 17:23 UTC (permalink / raw)
  To: netdev

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-11-24  4:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-23 17:23 Fw: [Bug 201773] New: IP_FREEBIND doesn’t counteract global Stephen Hemminger

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 NNTP newsgroup(s).