diff options
author | Jeremy Kerr <jk@codeconstruct.com.au> | 2021-07-29 10:20:45 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-07-29 15:06:50 +0100 |
commit | 889b7da23abf92faf34491df95733bda63639e32 (patch) | |
tree | ca6e3dce6902dc73d174966db46e735a0d214687 /net/mctp/af_mctp.c | |
parent | 583be982d93479ea3d85091b0fd0b01201ede87d (diff) |
mctp: Add initial routing framework
Add a simple routing table, and a couple of route output handlers, and
the mctp packet_type & handler.
Includes changes from Matt Johnston <matt@codeconstruct.com.au>.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mctp/af_mctp.c')
-rw-r--r-- | net/mctp/af_mctp.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/mctp/af_mctp.c b/net/mctp/af_mctp.c index 401b4fa141a5..8085f5912101 100644 --- a/net/mctp/af_mctp.c +++ b/net/mctp/af_mctp.c @@ -157,10 +157,16 @@ static __init int mctp_init(void) if (rc) goto err_unreg_sock; + rc = mctp_routes_init(); + if (rc) + goto err_unreg_proto; + mctp_device_init(); return 0; +err_unreg_proto: + proto_unregister(&mctp_proto); err_unreg_sock: sock_unregister(PF_MCTP); @@ -170,6 +176,7 @@ err_unreg_sock: static __exit void mctp_exit(void) { mctp_device_exit(); + mctp_routes_exit(); proto_unregister(&mctp_proto); sock_unregister(PF_MCTP); } |