rtnetlink.c (b491f90ddff013e0be058297a8f704c59932c1fd) rtnetlink.c (3b23a32a63219f51a5298bc55a65ecee866e79d0)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * INET An implementation of the TCP/IP protocol suite for the LINUX
4 * operating system. INET is implemented using the BSD Socket
5 * interface as the means of communication with the user level.
6 *
7 * Routing netlink socket interface: protocol independent part.
8 *

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

50#include <net/tcp.h>
51#include <net/sock.h>
52#include <net/pkt_sched.h>
53#include <net/fib_rules.h>
54#include <net/rtnetlink.h>
55#include <net/net_namespace.h>
56
57#define RTNL_MAX_TYPE 50
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * INET An implementation of the TCP/IP protocol suite for the LINUX
4 * operating system. INET is implemented using the BSD Socket
5 * interface as the means of communication with the user level.
6 *
7 * Routing netlink socket interface: protocol independent part.
8 *

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

50#include <net/tcp.h>
51#include <net/sock.h>
52#include <net/pkt_sched.h>
53#include <net/fib_rules.h>
54#include <net/rtnetlink.h>
55#include <net/net_namespace.h>
56
57#define RTNL_MAX_TYPE 50
58#define RTNL_SLAVE_MAX_TYPE 36
58#define RTNL_SLAVE_MAX_TYPE 40
59
60struct rtnl_link {
61 rtnl_doit_func doit;
62 rtnl_dumpit_func dumpit;
63 struct module *owner;
64 unsigned int flags;
65 struct rcu_head rcu;
66};

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

2655 sa = kmalloc(len, GFP_KERNEL);
2656 if (!sa) {
2657 err = -ENOMEM;
2658 goto errout;
2659 }
2660 sa->sa_family = dev->type;
2661 memcpy(sa->sa_data, nla_data(tb[IFLA_ADDRESS]),
2662 dev->addr_len);
59
60struct rtnl_link {
61 rtnl_doit_func doit;
62 rtnl_dumpit_func dumpit;
63 struct module *owner;
64 unsigned int flags;
65 struct rcu_head rcu;
66};

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

2655 sa = kmalloc(len, GFP_KERNEL);
2656 if (!sa) {
2657 err = -ENOMEM;
2658 goto errout;
2659 }
2660 sa->sa_family = dev->type;
2661 memcpy(sa->sa_data, nla_data(tb[IFLA_ADDRESS]),
2662 dev->addr_len);
2663 err = dev_set_mac_address(dev, sa, extack);
2663 err = dev_set_mac_address_user(dev, sa, extack);
2664 kfree(sa);
2665 if (err)
2666 goto errout;
2667 status |= DO_SETLINK_MODIFIED;
2668 }
2669
2670 if (tb[IFLA_MTU]) {
2671 err = dev_set_mtu_ext(dev, nla_get_u32(tb[IFLA_MTU]), extack);

--- 3006 unchanged lines hidden ---
2664 kfree(sa);
2665 if (err)
2666 goto errout;
2667 status |= DO_SETLINK_MODIFIED;
2668 }
2669
2670 if (tb[IFLA_MTU]) {
2671 err = dev_set_mtu_ext(dev, nla_get_u32(tb[IFLA_MTU]), extack);

--- 3006 unchanged lines hidden ---