diff options
author | Jeremy Kerr <jk@codeconstruct.com.au> | 2022-02-09 05:05:56 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-02-09 13:00:11 +0100 |
commit | 0de55a7d1133d0ab1acad5d91eea6ccd8cf6d448 (patch) | |
tree | b55293885a7f9ae8293cc93a2408bd46458bda21 /net/mctp/test/route-test.c | |
parent | mctp: Add helper for address match checking (diff) | |
download | linux-0de55a7d1133d0ab1acad5d91eea6ccd8cf6d448.tar.xz linux-0de55a7d1133d0ab1acad5d91eea6ccd8cf6d448.zip |
mctp: Allow keys matching any local address
Currently, we require an exact match on an incoming packet's dest
address, and the key's local_addr field.
In a future change, we may want to set up a key before packets are
routed, meaning we have no local address to match on.
This change allows key lookups to match on local_addr = MCTP_ADDR_ANY.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mctp/test/route-test.c')
-rw-r--r-- | net/mctp/test/route-test.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/mctp/test/route-test.c b/net/mctp/test/route-test.c index dad6bff40153..61205cf40074 100644 --- a/net/mctp/test/route-test.c +++ b/net/mctp/test/route-test.c @@ -645,6 +645,14 @@ static const struct mctp_route_input_sk_keys_test mctp_route_input_sk_keys_tests .hdr = RX_HDR(1, 11, 8, FL_S | FL_E | FL_T(1)), .deliver = true, }, + { + .name = "any local match", + .key_peer_addr = 12, + .key_local_addr = MCTP_ADDR_ANY, + .key_tag = 1, + .hdr = RX_HDR(1, 12, 8, FL_S | FL_E | FL_T(1)), + .deliver = true, + }, }; static void mctp_route_input_sk_keys_to_desc( |