diff options
author | remi.denis-courmont@nokia <remi.denis-courmont@nokia> | 2008-12-01 02:37:20 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-03 15:42:09 -0800 |
commit | bd7df219202f44e71e2e975a0fb5f76f946c1aef (patch) | |
tree | 6892264cc93ed3a77195cd94d9a3f7f9c6b66dd5 /net/phonet | |
parent | d25830e5507f6bc815f5dd7e2eb65f172e878a2b (diff) | |
download | kernel_samsung_crespo-bd7df219202f44e71e2e975a0fb5f76f946c1aef.zip kernel_samsung_crespo-bd7df219202f44e71e2e975a0fb5f76f946c1aef.tar.gz kernel_samsung_crespo-bd7df219202f44e71e2e975a0fb5f76f946c1aef.tar.bz2 |
Phonet: do not dump addresses from other namespaces
Signed-off-by: RĂ©mi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/phonet')
-rw-r--r-- | net/phonet/pn_netlink.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/phonet/pn_netlink.c b/net/phonet/pn_netlink.c index b1770d6..242fe8f 100644 --- 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) |