mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-25 15:41:26 +00:00
fixed dnsd answer
This commit is contained in:
parent
e24f396039
commit
781545dd02
14
dnsd.c
14
dnsd.c
|
@ -208,14 +208,18 @@ dnsd_respond(int fd, short id, struct sockaddr_in from)
|
||||||
p += host2dns("fluff", p, 5);
|
p += host2dns("fluff", p, 5);
|
||||||
PUTSHORT(T_NULL, p);
|
PUTSHORT(T_NULL, p);
|
||||||
PUTSHORT(C_IN, p);
|
PUTSHORT(C_IN, p);
|
||||||
PUTLONG(htons(3600), p);
|
PUTLONG(htons(0), p);
|
||||||
|
|
||||||
size = host2dns(outbuf, p+2, outbuflen);
|
//size = host2dns(outbuf, p+2, outbuflen);
|
||||||
PUTSHORT(size, p);
|
PUTSHORT(outbuflen, p);
|
||||||
p += size;
|
memcpy(p, outbuf, outbuflen);
|
||||||
|
p += outbuflen;
|
||||||
|
|
||||||
|
int f;
|
||||||
|
|
||||||
|
f = open("moo", O_WRONLY | O_CREAT,
|
||||||
|
|
||||||
len = p - buf;
|
len = p - buf;
|
||||||
printf("%d\n", len);
|
|
||||||
sendto(fd, buf, len, 0, (struct sockaddr*)&from, sizeof(from));
|
sendto(fd, buf, len, 0, (struct sockaddr*)&from, sizeof(from));
|
||||||
|
|
||||||
outbuflen = 0;
|
outbuflen = 0;
|
||||||
|
|
Loading…
Reference in a new issue