mirror of
https://github.com/ChronosX88/netsukuku.git
synced 2024-11-22 18:22:18 +00:00
We are having a LOT of weird issues now, I need to do a lot of debugging, Please help.
This commit is contained in:
parent
b28ac22fb3
commit
9918b99634
@ -77,6 +77,7 @@ void *dns_exec_pkt(void *passed_argv)
|
||||
/* Send the DNS reply */
|
||||
bytes_sent=inet_sendto(argv.sk, answer_buffer, answer_length, 0,
|
||||
&argv.from, argv.from_len);
|
||||
error("bytes_sent is: %d argv.sk is: %d answer_buffer is: %s answer_length is: %d argv.from is: %p agrv.from_len is: %p", bytes_sent,argv.sk, answer_buffer, answer_length, argv.from, argv.from_len);
|
||||
if(bytes_sent != answer_length)
|
||||
debug(DBG_SOFT, ERROR_MSG "inet_sendto error: %s", ERROR_POS,
|
||||
strerror(errno));
|
||||
|
@ -1053,17 +1053,21 @@ ssize_t inet_sendto(int s, const void *msg, size_t len, int flags,
|
||||
ssize_t err;
|
||||
fd_set fdset;
|
||||
int ret;
|
||||
int errno_int;
|
||||
|
||||
if((err=sendto(s, msg, len, flags, to, tolen))==-1) {
|
||||
errno_int = errno;
|
||||
error("sendto errno: %d err is: %d", errno, err);
|
||||
switch(errno)
|
||||
switch(errno_int)
|
||||
{
|
||||
case EMSGSIZE:
|
||||
error("Packet artificially fragmented: %d", stderr);
|
||||
inet_sendto(s, msg, len/2, flags, to, tolen);
|
||||
err=inet_sendto(s, ((const char *)msg+(len/2)),
|
||||
len-(len/2), flags, to, tolen);
|
||||
break;
|
||||
|
||||
case EFAULT:
|
||||
error("The value of to is: %d", to);
|
||||
default:
|
||||
error("inet_sendto: Cannot send(): %s", strerror(errno));
|
||||
return err;
|
||||
|
@ -325,6 +325,7 @@ int store_rules()
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
error("This is store_rules, And the value of t is: %p", t);
|
||||
commit_rules(&t);
|
||||
error("In store_rules: %s.",iptc_strerror(errno));
|
||||
err_ret(ERR_NETSTO,-1);
|
||||
|
Loading…
Reference in New Issue
Block a user