OSDN Git Service

mctp: Specify route types, require rtm_type in RTM_*ROUTE messages
authorJeremy Kerr <jk@codeconstruct.com.au>
Tue, 10 Aug 2021 02:38:34 +0000 (10:38 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 11 Aug 2021 23:01:17 +0000 (16:01 -0700)
commit83f0a0b7285b299e006b0698a0ddc1ffacff3e43
tree299487a6b4deeabc386740e3ae3778a6758dc660
parentddccc5e368a33daeb6862192d4dca8e59af9234a
mctp: Specify route types, require rtm_type in RTM_*ROUTE messages

This change adds a 'type' attribute to routes, which can be parsed from
a RTM_NEWROUTE message. This will help to distinguish local vs. peer
routes in a future change.

This means userspace will need to set a correct rtm_type in RTM_NEWROUTE
and RTM_DELROUTE messages; we currently only accept RTN_UNICAST.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Link: https://lore.kernel.org/r/20210810023834.2231088-1-jk@codeconstruct.com.au
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/mctp.h
net/mctp/route.c