|
|
@@ -26,6 +26,8 @@ static dp_dhcpv6_stats dp_v6_stats; |
|
|
|
void dp_dhcpv6_check(dp_conf *conf, unsigned char *pkt, int pktlen, int offset, unsigned char **remoteid, int *remoteidlen) { |
|
|
|
uint8_t msgtype = (uint8_t)pkt[offset]; |
|
|
|
|
|
|
|
dp_dhcpv6_cnt((uint16_t)msgtype); |
|
|
|
|
|
|
|
if ( conf->debug ) printf("offset=%i\n",offset); |
|
|
|
|
|
|
|
switch(msgtype) { |
|
|
@@ -48,6 +50,8 @@ void dp_dhcpv6_check(dp_conf *conf, unsigned char *pkt, int pktlen, int offset, |
|
|
|
|
|
|
|
offset+=4; |
|
|
|
|
|
|
|
dp_dhcpv6_cnt(code); |
|
|
|
|
|
|
|
if ( code == 9 ) { // relay message |
|
|
|
if ( conf->debug ) printf("option 9, relay msg\n"); |
|
|
|
offset+=4; |
|
|
@@ -66,7 +70,7 @@ void dp_dhcpv6_check(dp_conf *conf, unsigned char *pkt, int pktlen, int offset, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
dp_dhcpv6_stats *dp_dhcpv6_cnt(uint8_t msgcode) { |
|
|
|
dp_dhcpv6_stats *dp_dhcpv6_cnt(uint16_t msgcode) { |
|
|
|
|
|
|
|
if ( msgcode > 0 && msgcode < DP_DHCPV6_CODE_LEN ) { |
|
|
|
dp_v6_stats.relcnt[msgcode]++; |