We are having a LOT of weird issues now, I need to do a lot of debugging, Please help.

This commit is contained in:
MissValeska 2014-03-18 18:29:15 -07:00
parent b28ac22fb3
commit 9918b99634
3 changed files with 20 additions and 14 deletions

View File

@ -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));

View File

@ -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;

View File

@ -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);