Fix test_bgp_route_exchange: correct IP byte order constants and platform_compat.h endian include
This commit is contained in:
1 parent
05323ded60
commit
389124d327
2 files changed
+3
-4
No files matched your search
@@ -19,7 +19,7 @@
|
||||
#include <stdlib.h>
|
||||
#define htobe64(x) _byteswap_uint64(x)
|
||||
#define be64toh(x) _byteswap_uint64(x)
|
||||
#elif defined(__linux__)
|
||||
#else
|
||||
#include <endian.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -244,15 +244,14 @@ static int verify_bgp_exchange(void) {
|
||||
// Check server learned client's routes (192.168.20.0/24, 192.168.21.0/24)
|
||||
DEBUG_INFO(DEBUG_CATEGORY_ROUTING, "Checking server learned client's routes...");
|
||||
|
||||
// Note: Routes are stored in host byte order, not network byte order
|
||||
if (!check_learned_route(server_instance,0x0014a8c0,24,0x2222222222222222ULL)) {
|
||||
if (!check_learned_route(server_instance,0xc0a81400,24,0x2222222222222222ULL)) {
|
||||
DEBUG_ERROR(DEBUG_CATEGORY_ROUTING,"FAIL: Server missing learned route 192.168.20.0/24");
|
||||
success = 0;
|
||||
} else {
|
||||
DEBUG_INFO(DEBUG_CATEGORY_ROUTING,"PASS: Server has learned route 192.168.20.0/24");
|
||||
}
|
||||
|
||||
if (!check_learned_route(server_instance,0x0015a8c0,24,0x2222222222222222ULL)) {
|
||||
if (!check_learned_route(server_instance,0xc0a81500,24,0x2222222222222222ULL)) {
|
||||
DEBUG_ERROR(DEBUG_CATEGORY_ROUTING,"FAIL: Server missing learned route 192.168.21.0/24");
|
||||
success = 0;
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user