projects
/
oweals
/
tinc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb3d7f3
)
Don't take the address of a variable whose scope is about to disappear.
author
Guus Sliepen
<guus@tinc-vpn.org>
Tue, 13 Nov 2012 14:01:43 +0000
(15:01 +0100)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Tue, 13 Nov 2012 14:01:43 +0000
(15:01 +0100)
src/net_packet.c
patch
|
blob
|
history
diff --git
a/src/net_packet.c
b/src/net_packet.c
index dc31fd7acd1c17e8bfb5a38f4eb6e357b3f19200..5290fd6bf4610cc8a5bcf04b93df486cebcdd78b 100644
(file)
--- a/
src/net_packet.c
+++ b/
src/net_packet.c
@@
-536,11
+536,11
@@
static void send_udppacket(node_t *n, vpn_packet_t *origpkt) {
sockaddr_t *sa;
int sock;
+ sockaddr_t broadcast;
/* Overloaded use of priority field: -1 means local broadcast */
if(origpriority == -1 && n->prevedge) {
- sockaddr_t broadcast;
broadcast.in.sin_family = AF_INET;
broadcast.in.sin_addr.s_addr = -1;
broadcast.in.sin_port = n->prevedge->address.in.sin_port;