aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/xfrm6_input.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2008-11-25 20:59:52 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-25 20:59:52 -0500
commit59c9940ed0ef026673cac52f2eaed77af7d486da (patch)
treed7d4e38e693178f16000eaa5ae03f415f3197f7a /net/ipv6/xfrm6_input.c
parent4fb236bac9fc7d51e2267866de6d4c30e549d2f8 (diff)
netns xfrm: per-netns MIBs
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/xfrm6_input.c')
-rw-r--r--net/ipv6/xfrm6_input.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/ipv6/xfrm6_input.c b/net/ipv6/xfrm6_input.c
index b69766a77743..9084582d236b 100644
--- a/net/ipv6/xfrm6_input.c
+++ b/net/ipv6/xfrm6_input.c
@@ -58,6 +58,7 @@ EXPORT_SYMBOL(xfrm6_rcv);
58int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr, 58int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr,
59 xfrm_address_t *saddr, u8 proto) 59 xfrm_address_t *saddr, u8 proto)
60{ 60{
61 struct net *net = dev_net(skb->dev);
61 struct xfrm_state *x = NULL; 62 struct xfrm_state *x = NULL;
62 int i = 0; 63 int i = 0;
63 64
@@ -67,7 +68,7 @@ int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr,
67 68
68 sp = secpath_dup(skb->sp); 69 sp = secpath_dup(skb->sp);
69 if (!sp) { 70 if (!sp) {
70 XFRM_INC_STATS(LINUX_MIB_XFRMINERROR); 71 XFRM_INC_STATS(net, LINUX_MIB_XFRMINERROR);
71 goto drop; 72 goto drop;
72 } 73 }
73 if (skb->sp) 74 if (skb->sp)
@@ -76,7 +77,7 @@ int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr,
76 } 77 }
77 78
78 if (1 + skb->sp->len == XFRM_MAX_DEPTH) { 79 if (1 + skb->sp->len == XFRM_MAX_DEPTH) {
79 XFRM_INC_STATS(LINUX_MIB_XFRMINBUFFERERROR); 80 XFRM_INC_STATS(net, LINUX_MIB_XFRMINBUFFERERROR);
80 goto drop; 81 goto drop;
81 } 82 }
82 83
@@ -100,7 +101,7 @@ int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr,
100 break; 101 break;
101 } 102 }
102 103
103 x = xfrm_state_lookup_byaddr(&init_net, dst, src, proto, AF_INET6); 104 x = xfrm_state_lookup_byaddr(net, dst, src, proto, AF_INET6);
104 if (!x) 105 if (!x)
105 continue; 106 continue;
106 107
@@ -122,7 +123,7 @@ int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr,
122 } 123 }
123 124
124 if (!x) { 125 if (!x) {
125 XFRM_INC_STATS(LINUX_MIB_XFRMINNOSTATES); 126 XFRM_INC_STATS(net, LINUX_MIB_XFRMINNOSTATES);
126 xfrm_audit_state_notfound_simple(skb, AF_INET6); 127 xfrm_audit_state_notfound_simple(skb, AF_INET6);
127 goto drop; 128 goto drop;
128 } 129 }