Whamcloud - gitweb
LU-11894 lnet: check for asymmetrical route messages 57/34457/2
authorSebastien Buisson <sbuisson@ddn.com>
Mon, 28 Jan 2019 15:16:42 +0000 (00:16 +0900)
committerOleg Drokin <green@whamcloud.com>
Mon, 1 Apr 2019 06:18:58 +0000 (06:18 +0000)
commitf95ab9a42241a2a7319f6fa77e570f5526771afa
treecf42a6709b6820bfdd84478ccb8750b27b5bbf65
parent3921cf2544d8fadd98995ae63ec69837ef4d4b20
LU-11894 lnet: check for asymmetrical route messages

Asymmetrical routes can be an issue when debugging network,
and allowing them also opens the door to attacks where hostile
clients inject data to the servers.

In order to prevent asymmetrical routes, add a new lnet kernel
module option named 'lnet_drop_asym_route'. When set to non-zero,
lnet_parse() will check if the message received from a remote peer
is coming through a router that would normally be used by this node
to reach the remote peer. If it is not the case, then it means we
are dealing with an asymmetrical route message, and the message will
be dropped.

The check for asymmetrical route can also be switched on/off with
the command 'lnetctl set drop_asym_route 0|1'. And this parameter is
exported/imported in Yaml.

Lustre-change: https://review.whamcloud.com/34119
Lustre-commit: 4932febc121349d855ac9934c538ce688c140afa

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I06fb23d9e46984d79c14fa9b53b2fa04ce3c50c5
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34457
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/include/lnet/lib-lnet.h
lnet/lnet/api-ni.c
lnet/lnet/lib-move.c
lnet/utils/lnetconfig/liblnetconfig.c
lnet/utils/lnetconfig/liblnetconfig.h
lnet/utils/lnetctl.c
lustre/doc/lnetctl.8