Skip to contentSkip to conversation

New: Deleting IP address from interface doesn't prevent sending a data.

Bugme-new Andrew Morton 2 participants 3 messages Apr 28, 2010 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]/

#1 lore raw

(switched to email. Please respond via emailed reply-to-all, not via the bugzilla web interface).

Quoted 39 lines · On Wed, 28 Apr 2010 08:11:02 GMT [email protected] wrote:

https://bugzilla.kernel.org/show_bug.cgi?id=15868

Summary: Deleting IP address from interface doesn't prevent
sending a data.
Product: Networking
Version: 2.5
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: IPV4
AssignedTo: [email protected]
ReportedBy: [email protected]
Regression: No

Starting from 2.6.26, Linux kernel has strange behavior for the interface with two IPv4 addresses.

Let A and B are hosts with directly connected interfaces ethA (on host A) and
ethB (on host B). Let 10.10.0.1/24 and 10.10.0.3/24 addresses are assigned to ethA and 10.10.0.2/24 address is assigned to ethB. Let there is established TCP connection between host A and host B with sockets sock_A and sock_B that are bound to 10.10.0.3 and 10.10.0.2 addresses respectively. Then if someone deletes 10.10.0.3 address from ethA interface and after that send some data from sock_A socket then the data will be delivered to sock_B socket and someone can read it from this socket.

There is the same picture for UDP sockets. With previous definitions if there
are UDP sockets sock_A on host A and sock_B on host B and they are bound to 10.10.0.3 and 10.10.0.2 addresses respectively and they are connected to 10.10.0.2 and 10.10.0.3 addresses respectively then if someone deletes 10.10.0.3 address from ethA interface and after that send some data using send() function from sock_A then the data will be delivered to sock_B.

The data will not be sent in both cases if there are no addresses assigned to the interface after address removing.

maintainer
#2 lore raw

From: Andrew Morton <[email protected]>
Date: Wed, 28 Apr 2010 07:42:44 -0400

Quoted 4 lines

(switched to email. Please respond via emailed reply-to-all, not via the bugzilla web interface).

This is expected behavior.

#3 lore raw
Quoted 9 lines · On Wed, 28 Apr 2010 10:00:19 -0700 (PDT) David Miller <[email protected]>…

From: Andrew Morton <[email protected]>
Date: Wed, 28 Apr 2010 07:42:44 -0400

Quoted 4 lines

(switched to email. Please respond via emailed reply-to-all, not via the bugzilla web interface).

This is expected behavior.

Yurij says the behavior chnaged. Was 2.6.25 behaving incorrectly?