summaryrefslogtreecommitdiff
path: root/proto_udp.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2014-06-04 10:52:53 +0200
committerTobias Klauser <tklauser@distanz.ch>2014-06-04 10:52:53 +0200
commitedca6174b09d14c75a7bbc25af122a37ff16ecea (patch)
treea378bbdf9792b774a8d61885569c1df273088204 /proto_udp.c
parent96cbba90a5ccf29c2124b8d4d46ed534861ccf44 (diff)
dissector: Restore paket type if capturing from nlmon device
The kernel sets the skb pkttype to PACKET_OUTGOING for all packets being sent through dev_queue_xmit_nit(). However, if capturing packets from an nlmon device, this causes the information on whether the netlink packet was sent to kernel- or userspace (PACKET_KERNEL/PACKET_USER) to be overwritten. A previous attempt by Daniel Borkmann to fix this in kernel space [1] by not overwriting the packet type for netlink packets was not regarded as the proper solution. [1] http://patchwork.ozlabs.org/patch/338612/ Thus, attempt to fix this in userspace by looking at the pid field of the netlink packet, which is always 0 for messages to kernel space [2]. [2] http://www.carisma.slowglass.com/~tgr/libnl/doc/core.html#core_netlink_fundamentals Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'proto_udp.c')
0 files changed, 0 insertions, 0 deletions