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

Commit b7b45f47 authored by Harvey Harrison's avatar Harvey Harrison Committed by David S. Miller
Browse files

netfilter: payload_len is be16, add size of struct rather than size of pointer



payload_len is a be16 value, not cpu_endian, also the size of a ponter
to a struct ipv6hdr was being added, not the size of the struct itself.

Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 87b30a65
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -713,7 +713,8 @@ ip_vs_tunnel_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp,
	iph			=	ipv6_hdr(skb);
	iph			=	ipv6_hdr(skb);
	iph->version		=	6;
	iph->version		=	6;
	iph->nexthdr		=	IPPROTO_IPV6;
	iph->nexthdr		=	IPPROTO_IPV6;
	iph->payload_len	=	old_iph->payload_len + sizeof(old_iph);
	iph->payload_len	=	old_iph->payload_len;
	be16_add_cpu(&iph->payload_len, sizeof(*old_iph));
	iph->priority		=	old_iph->priority;
	iph->priority		=	old_iph->priority;
	memset(&iph->flow_lbl, 0, sizeof(iph->flow_lbl));
	memset(&iph->flow_lbl, 0, sizeof(iph->flow_lbl));
	iph->daddr		=	rt->rt6i_dst.addr;
	iph->daddr		=	rt->rt6i_dst.addr;