diff options
author | Huawei LI <lihuawei_zzu@163.com> | 2022-10-29 21:20:07 +0800 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2022-11-07 07:58:55 +0000 |
commit | 9ff833d8f4ccccc475f9a302b8f70eed49963472 (patch) | |
tree | 549bd4356c271427f60857f08dbdffa7bc3d4c7f /src/plugins/memif/CMakeLists.txt | |
parent | ce1ff6a9b1ab2c4ab74165b26c92c2d551f53cf8 (diff) |
nat: fix byte order error.
fix byte order error about the struct snat_address_t's member net.
for example configurations:
set interface ip table loop1 1
set interface ip addr loop1 10.10.10.2/24
nat44 add address 10.10.10.2 tenant-vrf 1
the snat address's net should be "as_u8 = {0xa, 0xa, 0xa, 0x0}",
but now it's "as_u8 = {0x0, 0xa, 0xa, 0x2}" because of missing
transition of byte order about the member net of snat_address_t.
(gdb) p/x *snat_main->addresses
$3 = {addr = {data = {0xa, 0xa, 0xa, 0x2}, data_u32 = 0x20a0a0a,
as_u8 = {0xa, 0xa, 0xa, 0x2}, as_u16 = {0xa0a, 0x20a},
as_u32 = 0x20a0a0a}, net = {data = {0x0, 0xa, 0xa, 0x2},
data_u32 = 0x20a0a00, as_u8 = {0x0, 0xa, 0xa, 0x2},
as_u16 = {0xa00, 0x20a}, as_u32 = 0x20a0a00},
sw_if_index = 0x3, fib_index = 0x1,addr_len = 0x18}
(gdb)
Type: fix
Signed-off-by: Huawei LI <lihuawei_zzu@163.com>
Change-Id: I4f25f0639ae90a7f2e8715b44f825571283d994d
Diffstat (limited to 'src/plugins/memif/CMakeLists.txt')
0 files changed, 0 insertions, 0 deletions