Skip to content
Commit 84e3fb3a authored by KH Shi's avatar KH Shi
Browse files

Fix endian error when pass upstream prefixes to bpf

TetherUpstream6Key#src64 should be stored in network order. Use
a big-endian ByteBuffer to retrieve a value stored in network order
is actually converts it into native order, which is little-endian in
Android.

In this CL, we changed it to use byte[] instead of long to store the
top 64-bits of the source prefix.

Test: atest TetheringTests
      manual test with IPv6-only tethering upstream, check BPF stats.
Bug: 312072637
Change-Id: I79f9282d5eda28328aa6a764ea92b086d6285133
parent f2c61a27
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment