removing accidental referal to data in udp module

This commit is contained in:
Zakir Durumeric 2013-09-02 15:58:53 -04:00
parent 3406f10271
commit 51da87c605
2 changed files with 4 additions and 4 deletions

View File

@ -137,8 +137,8 @@ void icmp_echo_process_packet(const u_char *packet,
{ {
struct iphdr *ip_hdr = (struct iphdr *)&packet[sizeof(struct ethhdr)]; struct iphdr *ip_hdr = (struct iphdr *)&packet[sizeof(struct ethhdr)];
struct icmphdr *icmp_hdr = (struct icmphdr*)((char *)ip_hdr + 4 *ip_hdr->ihl); struct icmphdr *icmp_hdr = (struct icmphdr*)((char *)ip_hdr + 4 *ip_hdr->ihl);
fs_add_uint64(fs, "type", ntohs(icmp_hdr->type)); fs_add_uint64(fs, "type", icmp_hdr->type);
fs_add_uint64(fs, "code", ntohs(icmp_hdr->code)); fs_add_uint64(fs, "code", icmp_hdr->code);
fs_add_uint64(fs, "icmp-id", ntohs(icmp_hdr->un.echo.id)); fs_add_uint64(fs, "icmp-id", ntohs(icmp_hdr->un.echo.id));
fs_add_uint64(fs, "seq", ntohs(icmp_hdr->un.echo.sequence)); fs_add_uint64(fs, "seq", ntohs(icmp_hdr->un.echo.sequence));
switch (icmp_hdr->type) { switch (icmp_hdr->type) {

View File

@ -278,8 +278,8 @@ static fielddef_t fields[] = {
{.name = "sport", .type = "int", .desc = "UDP source port"}, {.name = "sport", .type = "int", .desc = "UDP source port"},
{.name = "dport", .type = "int", .desc = "UDP destination port"}, {.name = "dport", .type = "int", .desc = "UDP destination port"},
{.name = "icmp_type", .type = "int", .desc = "icmp message type"}, {.name = "icmp_type", .type = "int", .desc = "icmp message type"},
{.name = "icmp_code", .type = "int", .desc = "icmp message sub type code"}, {.name = "icmp_code", .type = "int", .desc = "icmp message sub type code"}//,
{.name = "data", .type="binary", .desc = "UDP payload"} //{.name = "data", .type="binary", .desc = "UDP payload"}
}; };
probe_module_t module_udp = { probe_module_t module_udp = {