Skip to content

Commit 3d1b560

Browse files
Use csum_ipv6_magic instead of tcp_v6_check
Closes #80.
1 parent 3910c40 commit 3d1b560

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

homa_hijack.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ static inline void homa_hijack_set_hdr(struct sk_buff *skb,
6565
skb->csum_start = skb_transport_header(skb) - skb->head;
6666
skb->csum_offset = offsetof(struct homa_common_hdr, checksum);
6767
if (ipv6)
68-
h->checksum = ~tcp_v6_check(skb->len, &peer->flow.u.ip6.saddr,
69-
&peer->flow.u.ip6.daddr, 0);
68+
h->checksum = ~csum_ipv6_magic(&peer->flow.u.ip6.saddr,
69+
&peer->flow.u.ip6.daddr,
70+
skb->len, IPPROTO_TCP, 0);
7071
else
7172
h->checksum = ~tcp_v4_check(skb->len, peer->flow.u.ip4.saddr,
7273
peer->flow.u.ip4.daddr, 0);

0 commit comments

Comments
 (0)