diff options
Diffstat (limited to 'net/tipc/netlink_compat.c')
-rw-r--r-- | net/tipc/netlink_compat.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c index 415909054ec0..cb9086d259df 100644 --- a/net/tipc/netlink_compat.c +++ b/net/tipc/netlink_compat.c | |||
@@ -888,6 +888,18 @@ static int tipc_nl_compat_net_dump(struct tipc_nl_compat_msg *msg, | |||
888 | return tipc_add_tlv(msg->rep, TIPC_TLV_UNSIGNED, &id, sizeof(id)); | 888 | return tipc_add_tlv(msg->rep, TIPC_TLV_UNSIGNED, &id, sizeof(id)); |
889 | } | 889 | } |
890 | 890 | ||
891 | static int tipc_cmd_show_stats_compat(struct tipc_nl_compat_msg *msg) | ||
892 | { | ||
893 | msg->rep = tipc_tlv_alloc(ULTRA_STRING_MAX_LEN); | ||
894 | if (!msg->rep) | ||
895 | return -ENOMEM; | ||
896 | |||
897 | tipc_tlv_init(msg->rep, TIPC_TLV_ULTRA_STRING); | ||
898 | tipc_tlv_sprintf(msg->rep, "TIPC version " TIPC_MOD_VER "\n"); | ||
899 | |||
900 | return 0; | ||
901 | } | ||
902 | |||
891 | static int tipc_nl_compat_handle(struct tipc_nl_compat_msg *msg) | 903 | static int tipc_nl_compat_handle(struct tipc_nl_compat_msg *msg) |
892 | { | 904 | { |
893 | struct tipc_nl_compat_cmd_dump dump; | 905 | struct tipc_nl_compat_cmd_dump dump; |
@@ -976,6 +988,8 @@ static int tipc_nl_compat_handle(struct tipc_nl_compat_msg *msg) | |||
976 | dump.dumpit = tipc_nl_net_dump; | 988 | dump.dumpit = tipc_nl_net_dump; |
977 | dump.format = tipc_nl_compat_net_dump; | 989 | dump.format = tipc_nl_compat_net_dump; |
978 | return tipc_nl_compat_dumpit(&dump, msg); | 990 | return tipc_nl_compat_dumpit(&dump, msg); |
991 | case TIPC_CMD_SHOW_STATS: | ||
992 | return tipc_cmd_show_stats_compat(msg); | ||
979 | } | 993 | } |
980 | 994 | ||
981 | return -EOPNOTSUPP; | 995 | return -EOPNOTSUPP; |
@@ -1088,6 +1102,7 @@ static int tipc_nl_compat_tmp_wrap(struct sk_buff *skb, struct genl_info *info) | |||
1088 | case TIPC_CMD_SET_NODE_ADDR: | 1102 | case TIPC_CMD_SET_NODE_ADDR: |
1089 | case TIPC_CMD_SET_NETID: | 1103 | case TIPC_CMD_SET_NETID: |
1090 | case TIPC_CMD_GET_NETID: | 1104 | case TIPC_CMD_GET_NETID: |
1105 | case TIPC_CMD_SHOW_STATS: | ||
1091 | return tipc_nl_compat_recv(skb, info); | 1106 | return tipc_nl_compat_recv(skb, info); |
1092 | } | 1107 | } |
1093 | 1108 | ||