mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-26 10:09:19 +02:00
packet name collided with global packet
This commit is contained in:
parent
5ebc9ee668
commit
dc5138bc55
|
@ -36,6 +36,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "packet.h"
|
||||||
#include "encoding.h"
|
#include "encoding.h"
|
||||||
#include "base32.h"
|
#include "base32.h"
|
||||||
#include "dns.h"
|
#include "dns.h"
|
||||||
|
@ -85,16 +86,16 @@ sighandler(int sig)
|
||||||
static void
|
static void
|
||||||
send_query(int fd, char *hostname)
|
send_query(int fd, char *hostname)
|
||||||
{
|
{
|
||||||
char packet[4096];
|
char pkt[4096];
|
||||||
struct query q;
|
struct query q;
|
||||||
size_t len;
|
size_t len;
|
||||||
|
|
||||||
q.id = ++chunkid;
|
q.id = ++chunkid;
|
||||||
q.type = T_NULL;
|
q.type = T_NULL;
|
||||||
|
|
||||||
len = dns_encode(packet, sizeof(packet), &q, QR_QUERY, hostname, strlen(hostname));
|
len = dns_encode(pkt, sizeof(pkt), &q, QR_QUERY, hostname, strlen(hostname));
|
||||||
|
|
||||||
sendto(fd, packet, len, 0, (struct sockaddr*)&nameserv, sizeof(nameserv));
|
sendto(fd, pkt, len, 0, (struct sockaddr*)&nameserv, sizeof(nameserv));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue