Sfoglia il codice sorgente

Bug fixes in packet check code

Ethan Galstad 23 anni fa
parent
commit
15709bcf45
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      src/check_nrpe.c

+ 2 - 2
src/check_nrpe.c

@@ -267,14 +267,14 @@ int main(int argc, char **argv){
                         }
 	
 		/* check packet version */
-		if(ntohs(receive_packet.packet_version!=NRPE_PACKET_VERSION_2)){
+		if(ntohs(receive_packet.packet_version)!=NRPE_PACKET_VERSION_2){
 			printf("CHECK_NRPE: Invalid packet version received from server.\n");
 			close(sd);
 			return STATE_UNKNOWN;
 			}
 
 		/* check packet type */
-		if(ntohs(receive_packet.packet_type!=RESPONSE_PACKET)){
+		if(ntohs(receive_packet.packet_type)!=RESPONSE_PACKET){
 			printf("CHECK_NRPE: Invalid packet type received from server.\n");
 			close(sd);
 			return STATE_UNKNOWN;