Skip to content

Commit

Permalink
fix byte counting with xt_coova due to endian differences
Browse files Browse the repository at this point in the history
  • Loading branch information
nzamps committed Oct 11, 2019
1 parent dcc37db commit 9bb83f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/linux/xt_coova.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ coova_mt(const struct sk_buff *skb, struct xt_action_param *par)
else
addr.ip = iph->saddr;

p_bytes = iph->tot_len;
p_bytes = ntohs(iph->tot_len);
} else {
const struct ipv6hdr *iph = ipv6_hdr(skb);

Expand All @@ -239,7 +239,7 @@ coova_mt(const struct sk_buff *skb, struct xt_action_param *par)
else
memcpy(&addr.in6, &iph->saddr, sizeof(addr.in6));

p_bytes = iph->payload_len;
p_bytes = ntohs(iph->payload_len);
}

if (info->side != XT_COOVA_DEST) {
Expand Down

1 comment on commit 9bb83f1

@nzamps
Copy link
Contributor Author

@nzamps nzamps commented on 9bb83f1 Oct 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a fix for #495 #493

Please sign in to comment.