diff options
Diffstat (limited to 'net/packet')
-rw-r--r-- | net/packet/Kconfig | 26 | ||||
-rw-r--r-- | net/packet/af_packet.c | 6 |
2 files changed, 32 insertions, 0 deletions
diff --git a/net/packet/Kconfig b/net/packet/Kconfig new file mode 100644 index 000000000000..34ff93ff894d --- /dev/null +++ b/net/packet/Kconfig @@ -0,0 +1,26 @@ +# +# Packet configuration +# + +config PACKET + tristate "Packet socket" + ---help--- + The Packet protocol is used by applications which communicate + directly with network devices without an intermediate network + protocol implemented in the kernel, e.g. tcpdump. If you want them + to work, choose Y. + + To compile this driver as a module, choose M here: the module will + be called af_packet. + + If unsure, say Y. + +config PACKET_MMAP + bool "Packet socket: mmapped IO" + depends on PACKET + help + If you say Y here, the Packet protocol driver will use an IO + mechanism that results in faster communication. + + If unsure, say N. + diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 0269616e75a1..c9d5980aa4de 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -274,6 +274,9 @@ static int packet_rcv_spkt(struct sk_buff *skb, struct net_device *dev, struct dst_release(skb->dst); skb->dst = NULL; + /* drop conntrack reference */ + nf_reset(skb); + spkt = (struct sockaddr_pkt*)skb->cb; skb_push(skb, skb->data-skb->mac.raw); @@ -517,6 +520,9 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev, struct packe dst_release(skb->dst); skb->dst = NULL; + /* drop conntrack reference */ + nf_reset(skb); + spin_lock(&sk->sk_receive_queue.lock); po->stats.tp_packets++; __skb_queue_tail(&sk->sk_receive_queue, skb); |