Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327397
b: refs/heads/master
c: aa79e66
h: refs/heads/master
i:
  327395: 99aa985
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Aug 9, 2012
1 parent 6108409 commit f53c295
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e6f8f1a739b652c56e6f959d6714d92e05621e21
refs/heads/master: aa79e66eee5d525e2fcbd2a5fcb87ae3dd4aa9e9
1 change: 1 addition & 0 deletions trunk/include/net/net_namespace.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ struct net {
struct hlist_head *dev_name_head;
struct hlist_head *dev_index_head;
unsigned int dev_base_seq; /* protected by rtnl_mutex */
int ifindex;

/* core fib_rules */
struct list_head rules_ops;
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -5221,12 +5221,12 @@ int dev_ioctl(struct net *net, unsigned int cmd, void __user *arg)
*/
static int dev_new_index(struct net *net)
{
static int ifindex;
int ifindex = net->ifindex;
for (;;) {
if (++ifindex <= 0)
ifindex = 1;
if (!__dev_get_by_index(net, ifindex))
return ifindex;
return net->ifindex = ifindex;
}
}

Expand Down

0 comments on commit f53c295

Please sign in to comment.