{pktgen, xfrm} Show spi value properly when ipsec turned on
authorFan Du <fan.du@windriver.com>
Fri, 3 Jan 2014 03:18:33 +0000 (11:18 +0800)
committerSteffen Klassert <steffen.klassert@secunet.com>
Fri, 3 Jan 2014 06:29:12 +0000 (07:29 +0100)
If user run pktgen plus ipsec by using spi, show spi value
properly when cat /proc/net/pktgen/ethX

Signed-off-by: Fan Du <fan.du@windriver.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/core/pktgen.c

index b553c36ea0caefab51633d989dad673651a4509f..45ba476a7e17221e0a56d08e1914143e6b4fd79a 100644 (file)
@@ -657,8 +657,11 @@ static int pktgen_if_show(struct seq_file *seq, void *v)
        }
 
 #ifdef CONFIG_XFRM
-       if (pkt_dev->flags & F_IPSEC_ON)
+       if (pkt_dev->flags & F_IPSEC_ON) {
                seq_printf(seq,  "IPSEC  ");
+               if (pkt_dev->spi)
+                       seq_printf(seq, "spi:%u", pkt_dev->spi);
+       }
 #endif
 
        if (pkt_dev->flags & F_MACSRC_RND)