Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 261abc8c authored by Changli Gao's avatar Changli Gao Committed by Patrick McHardy
Browse files

netfilter: ip6tables: use skb->len for accounting



ipv6_hdr(skb)->payload_len is ZERO and can't be used for accounting, if
the payload is a Jumbo Payload specified in RFC2675.

Signed-off-by: default avatarChangli Gao <xiaosuo@gmail.com>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent 49daf6a2
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -387,9 +387,7 @@ ip6t_do_table(struct sk_buff *skb,
				goto no_match;
				goto no_match;
		}
		}


		ADD_COUNTER(e->counters,
		ADD_COUNTER(e->counters, skb->len, 1);
			    ntohs(ipv6_hdr(skb)->payload_len) +
			    sizeof(struct ipv6hdr), 1);


		t = ip6t_get_target_c(e);
		t = ip6t_get_target_c(e);
		IP_NF_ASSERT(t->u.kernel.target);
		IP_NF_ASSERT(t->u.kernel.target);