]> 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)
commit72b241e9c5c38d13f4af8b633727401ee07fa4a4
treef84e1c2dd0c703dde5a24693e638c83bb2b043b8
parentb1923d867aec63dfc55a485f532cc96a56671d57
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 3b13acaf36dc ("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: 3b13acaf36dc ("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