packet: pdiag_put_ring() should return TX_RING info for TPACKET_V3
authorSowmini Varadhan <sowmini.varadhan@oracle.com>
Tue, 10 Jan 2017 15:47:15 +0000 (07:47 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Jan 2017 02:02:42 +0000 (21:02 -0500)
Commit 7f953ab2ba46 ("af_packet: TX_RING support for TPACKET_V3")
now makes it possible to use TX_RING with TPACKET_V3, so make the
the relevant information available via 'ss -e -a --packet'

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/packet/diag.c

index 0ed68f0238bf9416f1cc92928b61a385a1055886..7ef1c881ae7417e500630df398a900dddd598092 100644 (file)
@@ -73,8 +73,7 @@ static int pdiag_put_ring(struct packet_ring_buffer *ring, int ver, int nl_type,
 {
        struct packet_diag_ring pdr;
 
-       if (!ring->pg_vec || ((ver > TPACKET_V2) &&
-                               (nl_type == PACKET_DIAG_TX_RING)))
+       if (!ring->pg_vec)
                return 0;
 
        pdr.pdr_block_size = ring->pg_vec_pages << PAGE_SHIFT;