]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Trap packets hitting anycast routes
authorIdo Schimmel <idosch@mellanox.com>
Fri, 1 Sep 2017 08:58:55 +0000 (10:58 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Sep 2017 17:01:36 +0000 (10:01 -0700)
commit60ea02665e5d89a9684015f0861d016a2db5766a
treef84e1c2dd0c703dde5a24693e638c83bb2b043b8
parentaec627686b4b5ef283d3453cdaec0eec3d000027
mlxsw: spectrum_router: Trap packets hitting anycast routes

I relied on the fact that anycast routes use the loopback device as
their nexthop device to trap packets hitting them to the CPU.

After commit 1ad23e7d336a ("net: ipv6: put host and anycast routes on
device with address") this is no longer the case and such routes are
programmed with a forward action (note the 'offload' flag):

anycast cafe:: dev enp3s0np7 proto kernel metric 0 offload pref medium

This will prevent the router from locally receiving packets destined to
the Subnet-Router anycast address.

Fix this by specifically programming anycast routes with action trap,
which results in the following output:

anycast cafe:: dev enp3s0np7 proto kernel metric 0 pref medium

Fixes: 1ad23e7d336a ("net: ipv6: put host and anycast routes on device with address")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c