Skip to content

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien Valat committed Jan 5, 2018
1 parent b4e97ee commit a908677
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/knockd.c
Expand Up @@ -1559,7 +1559,8 @@ void sniff(u_char* arg, const struct pcap_pkthdr* hdr, const u_char* packet)
char proto[8];
/* TCP/IP data */
struct in_addr inaddr;
unsigned short sport, dport;
unsigned short sport = 0;
unsigned short dport = 0;
char srcIP[64], dstIP[64];
/* timestamp */
time_t pkt_secs = hdr->ts.tv_sec;
Expand All @@ -1569,8 +1570,8 @@ void sniff(u_char* arg, const struct pcap_pkthdr* hdr, const u_char* packet)
PMList *lp;
knocker_t *attempt = NULL;
PMList *found_attempts = NULL;
int ipProto;
int fromIpV6;
int ipProto = 0;
int fromIpV6 = 0;

if(lltype == DLT_EN10MB) {
eth = (struct ether_header*)packet;
Expand Down

0 comments on commit a908677

Please sign in to comment.