projects
/
project
/
unetd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b5b4c4b
)
pex: use pubkey directly instead of accessing local_host in pex_msg_init()
author
Felix Fietkau
<
[email protected]
>
Wed, 3 Aug 2022 20:27:01 +0000
(22:27 +0200)
committer
Felix Fietkau
<
[email protected]
>
Tue, 23 Aug 2022 11:48:18 +0000
(13:48 +0200)
Signed-off-by: Felix Fietkau <
[email protected]
>
pex.c
patch
|
blob
|
history
diff --git
a/pex.c
b/pex.c
index 23ee57c4bb0d5901ab1c187666b6ff4a1c930d30..5b27921c94954320877938bcdcaded80e9833bb3 100644
(file)
--- a/
pex.c
+++ b/
pex.c
@@
-76,13
+76,12
@@
pex_msg_peer(struct network *net, const uint8_t *id)
static struct pex_hdr *pex_msg_init(struct network *net, uint8_t opcode)
{
- struct network_peer *local = &net->net_config.local_host->peer;
struct pex_hdr *hdr = (struct pex_hdr *)tx_buf;
hdr->version = 0;
hdr->opcode = opcode;
hdr->len = 0;
- memcpy(hdr->id,
local->
key, sizeof(hdr->id));
+ memcpy(hdr->id,
net->config.pub
key, sizeof(hdr->id));
return hdr;
}