{pktgen, xfrm} Show spi value properly when ipsec turned on

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>
This commit is contained in:
Fan Du 2014-01-03 11:18:33 +08:00 committed by Steffen Klassert
parent c454997e68
commit 8101328b79
1 changed files with 4 additions and 1 deletions

View 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)