projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net: RTNETLINK adjusting values of min_ifinfo_dump_size
[firefly-linux-kernel-4.4.55.git]
/
net
/
core
/
rtnetlink.c
diff --git
a/net/core/rtnetlink.c
b/net/core/rtnetlink.c
index dbf2ddafd52d34952161103c2586931c845926cf..65aebd45002786f4c00f6a5b4bc6ac45026f7f86 100644
(file)
--- a/
net/core/rtnetlink.c
+++ b/
net/core/rtnetlink.c
@@
-1509,6
+1509,9
@@
errout:
if (send_addr_notify)
call_netdevice_notifiers(NETDEV_CHANGEADDR, dev);
if (send_addr_notify)
call_netdevice_notifiers(NETDEV_CHANGEADDR, dev);
+ min_ifinfo_dump_size = max_t(u16, if_nlmsg_size(dev),
+ min_ifinfo_dump_size);
+
return err;
}
return err;
}
@@
-1960,7
+1963,7
@@
static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
sz_idx = type>>2;
kind = type&3;
sz_idx = type>>2;
kind = type&3;
- if (kind != 2 &&
security_netlink_recv(skb,
CAP_NET_ADMIN))
+ if (kind != 2 &&
!capable(
CAP_NET_ADMIN))
return -EPERM;
if (kind == 2 && nlh->nlmsg_flags&NLM_F_DUMP) {
return -EPERM;
if (kind == 2 && nlh->nlmsg_flags&NLM_F_DUMP) {