act_api.c (9ca718743ad8402958637bfc196d7b62371a1b9f) act_api.c (872f690341948b502c93318f806d821c56772c42)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * net/sched/act_api.c Packet action API.
4 *
5 * Author: Jamal Hadi Salim
6 */
7
8#include <linux/types.h>

--- 925 unchanged lines hidden (view full) ---

934 if (err < 0)
935 goto err_out;
936 err = -EINVAL;
937 kind = tb[TCA_ACT_KIND];
938 if (!kind) {
939 NL_SET_ERR_MSG(extack, "TC action kind must be specified");
940 goto err_out;
941 }
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * net/sched/act_api.c Packet action API.
4 *
5 * Author: Jamal Hadi Salim
6 */
7
8#include <linux/types.h>

--- 925 unchanged lines hidden (view full) ---

934 if (err < 0)
935 goto err_out;
936 err = -EINVAL;
937 kind = tb[TCA_ACT_KIND];
938 if (!kind) {
939 NL_SET_ERR_MSG(extack, "TC action kind must be specified");
940 goto err_out;
941 }
942 if (nla_strlcpy(act_name, kind, IFNAMSIZ) < 0) {
942 if (nla_strscpy(act_name, kind, IFNAMSIZ) < 0) {
943 NL_SET_ERR_MSG(extack, "TC action name too long");
944 goto err_out;
945 }
946 if (tb[TCA_ACT_COOKIE]) {
947 cookie = nla_memdup_cookie(tb);
948 if (!cookie) {
949 NL_SET_ERR_MSG(extack, "No memory to generate TC cookie");
950 err = -ENOMEM;

--- 702 unchanged lines hidden ---
943 NL_SET_ERR_MSG(extack, "TC action name too long");
944 goto err_out;
945 }
946 if (tb[TCA_ACT_COOKIE]) {
947 cookie = nla_memdup_cookie(tb);
948 if (!cookie) {
949 NL_SET_ERR_MSG(extack, "No memory to generate TC cookie");
950 err = -ENOMEM;

--- 702 unchanged lines hidden ---