pkt_cls.h (9ca718743ad8402958637bfc196d7b62371a1b9f) | pkt_cls.h (872f690341948b502c93318f806d821c56772c42) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef __NET_PKT_CLS_H 3#define __NET_PKT_CLS_H 4 5#include <linux/pkt_cls.h> 6#include <linux/workqueue.h> 7#include <net/sch_generic.h> 8#include <net/act_api.h> --- 498 unchanged lines hidden (view full) --- 507 508static inline int 509tcf_change_indev(struct net *net, struct nlattr *indev_tlv, 510 struct netlink_ext_ack *extack) 511{ 512 char indev[IFNAMSIZ]; 513 struct net_device *dev; 514 | 1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef __NET_PKT_CLS_H 3#define __NET_PKT_CLS_H 4 5#include <linux/pkt_cls.h> 6#include <linux/workqueue.h> 7#include <net/sch_generic.h> 8#include <net/act_api.h> --- 498 unchanged lines hidden (view full) --- 507 508static inline int 509tcf_change_indev(struct net *net, struct nlattr *indev_tlv, 510 struct netlink_ext_ack *extack) 511{ 512 char indev[IFNAMSIZ]; 513 struct net_device *dev; 514 |
515 if (nla_strlcpy(indev, indev_tlv, IFNAMSIZ) < 0) { | 515 if (nla_strscpy(indev, indev_tlv, IFNAMSIZ) < 0) { |
516 NL_SET_ERR_MSG_ATTR(extack, indev_tlv, 517 "Interface name too long"); 518 return -EINVAL; 519 } 520 dev = __dev_get_by_name(net, indev); 521 if (!dev) { 522 NL_SET_ERR_MSG_ATTR(extack, indev_tlv, 523 "Network device not found"); --- 448 unchanged lines hidden --- | 516 NL_SET_ERR_MSG_ATTR(extack, indev_tlv, 517 "Interface name too long"); 518 return -EINVAL; 519 } 520 dev = __dev_get_by_name(net, indev); 521 if (!dev) { 522 NL_SET_ERR_MSG_ATTR(extack, indev_tlv, 523 "Network device not found"); --- 448 unchanged lines hidden --- |