mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
Revert "net: rtnetlink: add msg kind names"
This reverts commit a8b1eeb931 which is
commit 12dc5c2cb7b269c5a1c6d02844f40bfce942a7a6 upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: I780457e01724f9a48db68aefe4cd71a6628174e0
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
3f77162543
commit
85c7d734c7
2 changed files with 3 additions and 10 deletions
|
|
@ -13,13 +13,6 @@ enum rtnl_link_flags {
|
|||
RTNL_FLAG_DOIT_UNLOCKED = 1,
|
||||
};
|
||||
|
||||
enum rtnl_kinds {
|
||||
RTNL_KIND_NEW,
|
||||
RTNL_KIND_DEL,
|
||||
RTNL_KIND_GET,
|
||||
RTNL_KIND_SET
|
||||
};
|
||||
|
||||
void rtnl_register(int protocol, int msgtype,
|
||||
rtnl_doit_func, rtnl_dumpit_func, unsigned int flags);
|
||||
int rtnl_register_module(struct module *owner, int protocol, int msgtype,
|
||||
|
|
|
|||
|
|
@ -5193,11 +5193,11 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh,
|
|||
{
|
||||
struct net *net = sock_net(skb->sk);
|
||||
struct rtnl_link *link;
|
||||
enum rtnl_kinds kind;
|
||||
struct module *owner;
|
||||
int err = -EOPNOTSUPP;
|
||||
rtnl_doit_func doit;
|
||||
unsigned int flags;
|
||||
int kind;
|
||||
int family;
|
||||
int type;
|
||||
|
||||
|
|
@ -5214,11 +5214,11 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh,
|
|||
family = ((struct rtgenmsg *)nlmsg_data(nlh))->rtgen_family;
|
||||
kind = type&3;
|
||||
|
||||
if (kind != RTNL_KIND_GET && !netlink_net_capable(skb, CAP_NET_ADMIN))
|
||||
if (kind != 2 && !netlink_net_capable(skb, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
rcu_read_lock();
|
||||
if (kind == RTNL_KIND_GET && (nlh->nlmsg_flags & NLM_F_DUMP)) {
|
||||
if (kind == 2 && nlh->nlmsg_flags&NLM_F_DUMP) {
|
||||
struct sock *rtnl;
|
||||
rtnl_dumpit_func dumpit;
|
||||
u16 min_dump_alloc = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue