From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Fw: [Bug 201773] New: IP_FREEBIND =?UTF-8?B?ZG9lc27igJl0?= counteract global Date: Fri, 23 Nov 2018 09:23:27 -0800 Message-ID: <20181123092327.2ec1ac5e@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable To: netdev@vger.kernel.org Return-path: Received: from mail-pl1-f176.google.com ([209.85.214.176]:46824 "EHLO mail-pl1-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391344AbeKXEIm (ORCPT ); Fri, 23 Nov 2018 23:08:42 -0500 Received: by mail-pl1-f176.google.com with SMTP id t13so10888544ply.13 for ; Fri, 23 Nov 2018 09:23:34 -0800 (PST) Received: from xeon-e3 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id q199sm64584194pfc.97.2018.11.23.09.23.33 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 23 Nov 2018 09:23:33 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: 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=E2=80=99t counteract global https://bugzilla.kernel.org/show_bug.cgi?id=3D201773 Bug ID: 201773 Summary: IP_FREEBIND doesn=E2=80=99t 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_bin= d: ----- > 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") ) );' =20 socket(AF_INET, SOCK_STREAM, IPPROTO_IP) =3D 3 setsockopt(3, SOL_IP, IP_FREEBIND, [0], 4) =3D 0 bind(3, {sa_family=3DAF_INET, sin_port=3Dhtons(0), sin_addr=3Dinet_addr("1.= 2.3.4")}, 16) =3D 0 +++ exited with 0 +++ ----- =E2=80=A6 however, it appears that setsockopt() doesn=E2=80=99t disable IP_= FREEBIND if ip_nonlocal_bind is set via /proc. --=20 You are receiving this mail because: You are the assignee for the bug.