Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103616
b: refs/heads/master
c: 9b4661b
h: refs/heads/master
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Jul 18, 2008
1 parent a45f101 commit 1c93687
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 852566f53ccdc9d1c149ffa28daa9778e13fa3da
refs/heads/master: 9b4661bd6e5437508e0920608f3213c23212cd1b
20 changes: 20 additions & 0 deletions trunk/net/ipv4/af_inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
#include <net/ipip.h>
#include <net/inet_common.h>
#include <net/xfrm.h>
#include <net/net_namespace.h>
#ifdef CONFIG_IP_MROUTE
#include <linux/mroute.h>
#endif
Expand Down Expand Up @@ -1339,6 +1340,20 @@ static struct net_protocol icmp_protocol = {
.netns_ok = 1,
};

static __net_init int ipv4_mib_init_net(struct net *net)
{
return 0;
}

static __net_exit void ipv4_mib_exit_net(struct net *net)
{
}

static __net_initdata struct pernet_operations ipv4_mib_ops = {
.init = ipv4_mib_init_net,
.exit = ipv4_mib_exit_net,
};

static int __init init_ipv4_mibs(void)
{
if (snmp_mib_init((void **)net_statistics,
Expand All @@ -1365,8 +1380,13 @@ static int __init init_ipv4_mibs(void)

tcp_mib_init(&init_net);

if (register_pernet_subsys(&ipv4_mib_ops))
goto err_net;

return 0;

err_net:
snmp_mib_free((void **)udplite_statistics);
err_udplite_mib:
snmp_mib_free((void **)udp_statistics);
err_udp_mib:
Expand Down

0 comments on commit 1c93687

Please sign in to comment.