lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1198247100998-git-send-email-nakam@linux-ipv6.org>
Date:	Fri, 21 Dec 2007 23:25:00 +0900
From:	Masahide NAKAMURA <nakam@...ux-ipv6.org>
To:	davem@...emloft.net, herbert@...dor.apana.org.au
Cc:	netdev@...r.kernel.org, usagi-core@...ux-ipv6.org,
	Masahide NAKAMURA <nakam@...ux-ipv6.org>
Subject: [XFRM]: Fix outbound statistics.

Hello David,

I'm sorry, the previous mail contains wrong code:


> David, I failed to include this statistics codes since I didn't notice
> the conflict with the latest Herbert XFRM fix.
> 
> Please apply this, too.
> 
> Signed-off-by: Masahide NAKAMURA <nakam@...ux-ipv6.org>
> ---
[snip]
>  
>	do {
>	   err = xfrm_state_check_space(x, skb);
> -	        if (err)
> +		if (err) {
>			goto error_nolock;
> +			XFRM_INC_STATS(LINUX_MIB_XFRMOUTERROR);
> +		}


Please apply the below patch instead of the previous.

Signed-off-by: Masahide NAKAMURA <nakam@...ux-ipv6.org>
---
 net/xfrm/xfrm_output.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
index 867484a..f8e5961 100644
--- a/net/xfrm/xfrm_output.c
+++ b/net/xfrm/xfrm_output.c
@@ -43,17 +43,23 @@ static int xfrm_output_one(struct sk_buff *skb, int err)
 
 	do {
 		err = xfrm_state_check_space(x, skb);
-		if (err)
+		if (err) {
+			XFRM_INC_STATS(LINUX_MIB_XFRMOUTERROR);
 			goto error_nolock;
+		}
 
 		err = x->outer_mode->output(x, skb);
-		if (err)
+		if (err) {
+			XFRM_INC_STATS(LINUX_MIB_XFRMOUTSTATEMODEERROR);
 			goto error_nolock;
+		}
 
 		spin_lock_bh(&x->lock);
 		err = xfrm_state_check_expire(x);
-		if (err)
+		if (err) {
+			XFRM_INC_STATS(LINUX_MIB_XFRMOUTSTATEEXPIRED);
 			goto error;
+		}
 
 		if (x->type->flags & XFRM_TYPE_REPLAY_PROT) {
 			XFRM_SKB_CB(skb)->seq = ++x->replay.oseq;
-- 
1.4.4.2

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ