]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "ipv4: Allow configuring subnets as local addresses"
authorDavid S. Miller <davem@davemloft.net>
Thu, 23 Dec 2010 20:03:57 +0000 (12:03 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Dec 2010 20:03:57 +0000 (12:03 -0800)
commite882b16c0e3bb8f694a5706262629aea715b6d7f
tree1c949b22d8ed6ac0c1419f2bf2c372d8833b41d4
parent878a1970e35f3f86772ff52468a5e6bc059ccdbe
Revert "ipv4: Allow configuring subnets as local addresses"

This reverts commit 598eafc17ebe183b7dca8d3e35896a37b5a90b23.

Conflicts:

net/ipv4/fib_frontend.c

As reported by Ben Greear, this causes regressions:

> Change 598eafc17ebe183b7dca8d3e35896a37b5a90b23 caused rules
> to stop matching the input device properly because the
> FLOWI_FLAG_MATCH_ANY_IIF is always defined in ip_dev_find().
>
> This breaks rules such as:
>
> ip rule add pref 512 lookup local
> ip rule del pref 0 lookup local
> ip link set eth2 up
> ip -4 addr add 172.16.0.102/24 broadcast 172.16.0.255 dev eth2
> ip rule add to 172.16.0.102 iif eth2 lookup local pref 10
> ip rule add iif eth2 lookup 10001 pref 20
> ip route add 172.16.0.0/24 dev eth2 table 10001
> ip route add unreachable 0/0 table 10001
>
> If you had a second interface 'eth0' that was on a different
> subnet, pinging a system on that interface would fail:
>
>   [root@ct503-60 ~]# ping 192.168.100.1
>   connect: Invalid argument

Reported-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/flow.h
net/core/fib_rules.c
net/ipv4/fib_frontend.c