@@ -76,14 +76,14 @@ # define PBL_ERRSTR "" #define DEBUG(x, y) if (conf.debug >= x) { printf(y "\n"); } struct packet_info { - int b1; - int b2; - int b3; - int b4; + unsigned short int b1; + unsigned short int b2; + unsigned short int b3; + unsigned short int b4; int s_port; int d_port; int flags; @@ -1306,11 +1306,11 @@ while (1) { char lookupbuf[BUFFERSIZE]; - snprintf(lookupbuf, sizeof(lookupbuf), "%d.%d.%d.%d.%s", ip->b4, ip->b3, ip->b2, ip->b1, + snprintf(lookupbuf, sizeof(lookupbuf), "%hhu.%hhu.%hhu.%hhu.%s", ip->b4, ip->b3, ip->b2, ip->b1, wltmp->string); #ifndef HAVE_FIREDNS host = gethostbyname(lookupbuf); #else @@ -1388,11 +1388,11 @@ p = ip_proc; p &= wltmp->cidr.processed; if (p == wltmp->cidr.ip) { - snprintf(msgbuf, sizeof(msgbuf), "%d.%d.%d.%d %x/%d", + snprintf(msgbuf, sizeof(msgbuf), "%hhu.%hhu.%hhu.%hhu %x/%d", ip->b1, ip->b2, ip->b3, ip->b4, wltmp->cidr.ip, wltmp->cidr.network); return 1; } @@ -1429,11 +1429,11 @@ if (ip == NULL) { sprintf(msgbuf, "-"); return; } - snprintf(msgbuf, sizeof(msgbuf), "%d.%d.%d.%d:%d.%d", ip->b1, + snprintf(msgbuf, sizeof(msgbuf), "%hhu.%hhu.%hhu.%hhu:%d.%d", ip->b1, ip->b2, ip->b3, ip->b4, ip->s_port,ip->d_port); return; }