]> git.baikalelectronics.ru Git - kernel.git/commit
mctp: replace mctp_address_ok with more fine-grained helpers
authorJeremy Kerr <jk@codeconstruct.com.au>
Fri, 18 Feb 2022 04:25:53 +0000 (12:25 +0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 19 Feb 2022 05:24:28 +0000 (21:24 -0800)
commit6c7f536b32cac548faca01687320b0fca8b21eb7
treeb76857f6b1d1ffd35029a685aab647a3d9dc415e
parent7f72bd7c4fe0f9942330fa2e0cf7fedcd74a7c82
mctp: replace mctp_address_ok with more fine-grained helpers

Currently, we have mctp_address_ok(), which checks if an EID is in the
"valid" range of 8-254 inclusive. However, 0 and 255 may also be valid
addresses, depending on context. 0 is the NULL EID, which may be set
when physical addressing is used. 255 is valid as a destination address
for broadcasts.

This change renames mctp_address_ok to mctp_address_unicast, and adds
similar helpers for broadcast and null EIDs, which will be used in an
upcoming commit.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/mctp.h
net/mctp/device.c
net/mctp/neigh.c
net/mctp/route.c