xfrm: Introduce LINUX_MIB_XFRMFWDHDRERROR
authorjamal <hadi@cyberus.ca>
Thu, 18 Feb 2010 03:35:07 +0000 (03:35 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Feb 2010 23:43:09 +0000 (15:43 -0800)
XFRMINHDRERROR counter is ambigous when validating forwarding
path. It makes it tricky to debug when you have both in and fwd
validation.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/snmp.h
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_proc.c

index 0f953fe40413f2a43e09d00091a82dcbc423301f..e28f5a0182e85fcba41a420c305e0f78bfaa318e 100644 (file)
@@ -257,6 +257,7 @@ enum
        LINUX_MIB_XFRMOUTPOLBLOCK,              /* XfrmOutPolBlock */
        LINUX_MIB_XFRMOUTPOLDEAD,               /* XfrmOutPolDead */
        LINUX_MIB_XFRMOUTPOLERROR,              /* XfrmOutPolError */
+       LINUX_MIB_XFRMFWDHDRERROR,              /* XfrmFwdHdrError*/
        __LINUX_MIB_XFRMMAX
 };
 
index 2c5d93181f132e42b97d9fb15301850d13d5deeb..4368e7b88469ee35b2cd2adeeb0d155e8c1548da 100644 (file)
@@ -2045,8 +2045,7 @@ int __xfrm_route_forward(struct sk_buff *skb, unsigned short family)
        int res;
 
        if (xfrm_decode_session(skb, &fl, family) < 0) {
-               /* XXX: we should have something like FWDHDRERROR here. */
-               XFRM_INC_STATS(net, LINUX_MIB_XFRMINHDRERROR);
+               XFRM_INC_STATS(net, LINUX_MIB_XFRMFWDHDRERROR);
                return 0;
        }
 
index 003f2c437ac3d6c0356de1b8494f4d7ee97b0196..58d9ae005597a9b963b24ed620aa2e915c93e3bc 100644 (file)
@@ -41,6 +41,7 @@ static const struct snmp_mib xfrm_mib_list[] = {
        SNMP_MIB_ITEM("XfrmOutPolBlock", LINUX_MIB_XFRMOUTPOLBLOCK),
        SNMP_MIB_ITEM("XfrmOutPolDead", LINUX_MIB_XFRMOUTPOLDEAD),
        SNMP_MIB_ITEM("XfrmOutPolError", LINUX_MIB_XFRMOUTPOLERROR),
+       SNMP_MIB_ITEM("XfrmFwdHdrError", LINUX_MIB_XFRMFWDHDRERROR),
        SNMP_MIB_SENTINEL
 };