]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/packet/af_packet.c
packet: deliver VLAN TCI to userspace
[linux-2.6-omap-h63xx.git] / net / packet / af_packet.c
index 4f059775d48f3387d9060bbef7d19383c503d994..db792e02a37feec8b65d9c61976cf69f49c3b140 100644 (file)
@@ -702,6 +702,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packe
                        getnstimeofday(&ts);
                h.h2->tp_sec = ts.tv_sec;
                h.h2->tp_nsec = ts.tv_nsec;
+               h.h2->tp_vlan_tci = skb->vlan_tci;
                hdrlen = sizeof(*h.h2);
                break;
        default:
@@ -1172,6 +1173,7 @@ static int packet_recvmsg(struct kiocb *iocb, struct socket *sock,
                aux.tp_snaplen = skb->len;
                aux.tp_mac = 0;
                aux.tp_net = skb_network_offset(skb);
+               aux.tp_vlan_tci = skb->vlan_tci;
 
                put_cmsg(msg, SOL_PACKET, PACKET_AUXDATA, sizeof(aux), &aux);
        }