]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
commitd3b6d3774fc2b636b12f8ef6367ed294861469ed
treef84e1c2dd0c703dde5a24693e638c83bb2b043b8
parent843bd2b38d7f3929e0fa4dd7e8061ba9da7a3961
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 4832c30d5458 ("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: 4832c30d5458 ("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