aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAmit Cohen <amitc@mellanox.com>2020-01-19 15:00:48 +0200
committerDavid S. Miller <davem@davemloft.net>2020-01-19 16:23:52 +0100
commit95f0ead8f04bec18e474594ef585f3734bd85b4c (patch)
treec05e3f18456473a7a7234ceeb16448eadbebfb0a /net
parentselftests: devlink_trap_l3_drops: Add test cases of irif and erif disabled (diff)
downloadlinux-dev-95f0ead8f04bec18e474594ef585f3734bd85b4c.tar.xz
linux-dev-95f0ead8f04bec18e474594ef585f3734bd85b4c.zip
devlink: Add non-routable packet trap
Add packet trap that can report packets that reached the router, but are non-routable. For example, IGMP queries can be flooded by the device in layer 2 and reach the router. Such packets should not be routed and instead dropped. Signed-off-by: Amit Cohen <amitc@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/devlink.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/devlink.c b/net/core/devlink.c
index d30aa47052aa..c10e38d724bc 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -7706,6 +7706,7 @@ static const struct devlink_trap devlink_trap_generic[] = {
DEVLINK_TRAP(REJECT_ROUTE, EXCEPTION),
DEVLINK_TRAP(IPV4_LPM_UNICAST_MISS, EXCEPTION),
DEVLINK_TRAP(IPV6_LPM_UNICAST_MISS, EXCEPTION),
+ DEVLINK_TRAP(NON_ROUTABLE, DROP),
};
#define DEVLINK_TRAP_GROUP(_id) \