Intialise the unused fields of the data structure and add support for
ports in UDP packets.
Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
struct serialize_l214421224411111 data;
struct iphdr *iph = ip_hdr(skb);
struct tcphdr *th = tcp_hdr(skb);
+ struct udphdr *uh = udp_hdr(skb);
+
+ memset(&data, 0, sizeof(struct serialize_l214421224411111));
data.f1 = (unsigned long)skb;
data.f2 = skb->protocol;
data.f14 = th->rst;
data.f15 = th->syn;
data.f16 = th->fin;
+ } else if (data.f3 == IPPROTO_UDP) {
+ data.f8 = uh->source;
+ data.f9 = uh->dest;
}
}