Logan oos Even
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
4 additions and
1 deletions
-
include/n2n_typedefs.h
-
src/edge_utils.c
-
src/wire.c
|
|
@ -421,6 +421,7 @@ typedef struct n2n_PEER_INFO { |
|
|
|
|
|
|
|
|
|
|
|
typedef struct n2n_QUERY_PEER { |
|
|
|
uint16_t aflags; |
|
|
|
n2n_mac_t srcMac; |
|
|
|
n2n_sock_t sock; |
|
|
|
n2n_mac_t targetMac; |
|
|
|
|
|
@ -1148,7 +1148,7 @@ void send_query_peer (n2n_edge_t * eee, |
|
|
|
uint8_t pktbuf[N2N_PKT_BUF_SIZE]; |
|
|
|
size_t idx; |
|
|
|
n2n_common_t cmn = {0}; |
|
|
|
n2n_QUERY_PEER_t query = {{0}}; |
|
|
|
n2n_QUERY_PEER_t query = {0}; |
|
|
|
struct peer_info *peer, *tmp; |
|
|
|
int n_o_pings = 0; |
|
|
|
int n_o_top_sn = 0; |
|
|
|
|
|
@ -705,6 +705,7 @@ int encode_QUERY_PEER (uint8_t * base, |
|
|
|
retval += encode_common(base, idx, common); |
|
|
|
retval += encode_mac(base, idx, pkt->srcMac); |
|
|
|
retval += encode_mac(base, idx, pkt->targetMac); |
|
|
|
retval += encode_uint16(base, idx, pkt->aflags); |
|
|
|
|
|
|
|
return retval; |
|
|
|
} |
|
|
@ -720,6 +721,7 @@ int decode_QUERY_PEER (n2n_QUERY_PEER_t * pkt, |
|
|
|
|
|
|
|
retval += decode_mac(pkt->srcMac, base, rem, idx); |
|
|
|
retval += decode_mac(pkt->targetMac, base, rem, idx); |
|
|
|
retval += decode_uint16(&(pkt->aflags), base, rem, idx); |
|
|
|
|
|
|
|
return retval; |
|
|
|
} |
|
|
|