Browse Source

mlxsw: spectrum_router: Don't abort on l3mdev rules

Now that port netdevs can be enslaved to a VRF master we need to make
sure the device's routing tables won't be flushed upon the insertion of
a l3mdev rule.

Note that we assume the notified l3mdev rule is a simple rule as used by
the VRF master. We don't check for the presence of other selectors such
as 'iif' and 'oif'.

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>
Ido Schimmel 8 years ago
parent
commit
c7f6e6658b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c

+ 1 - 1
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c

@@ -2554,7 +2554,7 @@ static void mlxsw_sp_router_fib_event_work(struct work_struct *work)
 	case FIB_EVENT_RULE_ADD: /* fall through */
 	case FIB_EVENT_RULE_ADD: /* fall through */
 	case FIB_EVENT_RULE_DEL:
 	case FIB_EVENT_RULE_DEL:
 		rule = fib_work->fr_info.rule;
 		rule = fib_work->fr_info.rule;
-		if (!fib4_rule_default(rule))
+		if (!fib4_rule_default(rule) && !rule->l3mdev)
 			mlxsw_sp_router_fib4_abort(mlxsw_sp);
 			mlxsw_sp_router_fib4_abort(mlxsw_sp);
 		fib_rule_put(rule);
 		fib_rule_put(rule);
 		break;
 		break;