projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d25830e
)
Phonet: do not dump addresses from other namespaces
author
remi.denis-courmont@nokia
<remi.denis-courmont@nokia>
Mon, 1 Dec 2008 02:37:20 +0000
(
02:37
+0000)
committer
David S. Miller
<davem@davemloft.net>
Wed, 3 Dec 2008 23:42:09 +0000
(15:42 -0800)
Signed-off-by: RĂ©mi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/phonet/pn_netlink.c
patch
|
blob
|
history
diff --git
a/net/phonet/pn_netlink.c
b/net/phonet/pn_netlink.c
index b1770d66bc8d68fc3c9ede8fd2408f813994dd93..242fe8f8c322d5fb048d737a46d36b99797f47aa 100644
(file)
--- a/
net/phonet/pn_netlink.c
+++ b/
net/phonet/pn_netlink.c
@@
-123,6
+123,7
@@
nla_put_failure:
static int getaddr_dumpit(struct sk_buff *skb, struct netlink_callback *cb)
{
+ struct net *net = sock_net(skb->sk);
struct phonet_device *pnd;
int dev_idx = 0, dev_start_idx = cb->args[0];
int addr_idx = 0, addr_start_idx = cb->args[1];
@@
-131,6
+132,8
@@
static int getaddr_dumpit(struct sk_buff *skb, struct netlink_callback *cb)
list_for_each_entry(pnd, &pndevs.list, list) {
u8 addr;
+ if (!net_eq(dev_net(pnd->netdev), net))
+ continue;
if (dev_idx > dev_start_idx)
addr_start_idx = 0;
if (dev_idx++ < dev_start_idx)