| @@ -193,7 +193,7 @@ int dhcp_check(struct nfq_data *nfa, dp_conf *conf) { | |||
| unsigned char *pkt; | |||
| int pktlen; | |||
| int offset = 0; | |||
| unsigned char *remoteid; | |||
| unsigned char *remoteid = NULL; | |||
| int remoteidlen = 0; | |||
| int found = 0; | |||
| uint8_t ipver = 0; | |||
| @@ -263,8 +263,6 @@ int dhcp_check(struct nfq_data *nfa, dp_conf *conf) { | |||
| offset++; | |||
| // printf("type : %i\n",type); | |||
| // padding of 1 octet | |||
| if ( type == 0 ) { | |||
| continue; | |||
| @@ -281,10 +279,8 @@ int dhcp_check(struct nfq_data *nfa, dp_conf *conf) { | |||
| len = pkt[offset]; | |||
| offset++; | |||
| // printf("len : %i\n", len); | |||
| // can the value be read | |||
| if ( offset+len>=pktlen ) | |||
| if ( offset+len>pktlen ) | |||
| break; | |||
| // option 82 parser | |||
| @@ -348,7 +344,7 @@ int dhcp_check(struct nfq_data *nfa, dp_conf *conf) { | |||
| static int dp_callback(struct nfq_q_handle *qh, struct nfgenmsg *nfmsg, struct nfq_data *nfa, void *data) { | |||
| struct nfqnl_msg_packet_hdr *ph = nfq_get_msg_packet_hdr(nfa); | |||
| dp_conf *conf = (dp_conf*)data; | |||
| int id; | |||
| int id = -1; | |||
| int verdict; | |||
| if ( ph ) { | |||