[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(usagi-users 03545) fix compile fail(IP6_INC_STATS macro in netfilter.c)
- To: usagi-users@xxxxxxxxxxxxxx
- Subject: (usagi-users 03545) fix compile fail(IP6_INC_STATS macro in netfilter.c)
- From: Masanao Igarashi <masayuko@xxxxxxxxxxxxxxx>
- Date: Mon, 07 Nov 2005 16:55:11 +0900
- Reply-to: usagi-users@xxxxxxxxxxxxxx
- User-agent: T-gnus/6.16.2 (based on Gnus v5.10.2) (revision 02) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 Emacs/21.1 (i386-msvc-nt5.1.2600) MULE/5.0 (SAKAKI) Meadow/2.00 Beta2-dev (WOMINAHESHI)
Dear all,
I try to compile linux-2.6.14 applied recent usagi(cvs).
kernel config is follow:
Networking --->
Networking options --->
<M>The IPv6 Protocol
...
[*] IPv6: per-interface statistics for SNMP
but, compile is failed.
It seems a usage of IP6_INC_STATS macro in netfilter.c is wrong.
Is this patch correct?
Thank you,
Masanao
--- linux26/net/ipv6/netfilter.c 2005-10-13 16:30:50.000000000 +0900
+++ linux26-fix/net/ipv6/netfilter.c 2005-11-07 15:47:05.000000000 +0900
@@ -15,6 +15,9 @@
{
struct ipv6hdr *iph = skb->nh.ipv6h;
struct dst_entry *dst;
+#ifdef CONFIG_IPV6_STATISTICS
+ struct inet6_dev *idev;
+#endif
struct flowi fl = {
.oif = skb->sk ? skb->sk->sk_bound_dev_if : 0,
.nl_u =
@@ -27,7 +30,12 @@
dst = ip6_route_output(skb->sk, &fl);
if (dst->error) {
+#ifdef CONFIG_IPV6_STATISTICS
+ idev = ((struct rt6_info *)dst)->rt6i_idev;
+ IP6_INC_STATS(idev, IPSTATS_MIB_OUTNOROUTES);
+#else
IP6_INC_STATS(IPSTATS_MIB_OUTNOROUTES);
+#endif
LIMIT_NETDEBUG(KERN_DEBUG "ip6_route_me_harder: No more route.\n");
dst_release(dst);
return -EINVAL;
--