diff options
-rw-r--r-- | net/core/pktgen.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 156d57b616ac..8bc4ddd375a9 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -389,6 +389,7 @@ struct pktgen_dev { #ifdef CONFIG_XFRM __u8 ipsmode; /* IPSEC mode (config) */ __u8 ipsproto; /* IPSEC type (config) */ + __u32 spi; #endif char result[512]; }; @@ -1477,6 +1478,17 @@ static ssize_t pktgen_if_write(struct file *file, return count; } + if (!strcmp(name, "spi")) { + len = num_arg(&user_buffer[i], 10, &value); + if (len < 0) + return len; + + i += len; + pkt_dev->spi = value; + sprintf(pg_result, "OK: spi=%u", pkt_dev->spi); + return count; + } + if (!strcmp(name, "flowlen")) { len = num_arg(&user_buffer[i], 10, &value); if (len < 0) |