summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/tap/cli.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-01-18 13:35:11 +0100
committerNeale Ranns <nranns@cisco.com>2018-01-18 15:59:06 +0000
commit7866c4595b65f54f491ffc4e92b1f8cf94d6f142 (patch)
tree404c981a49256a66e4a95718f426d2040619fe71 /src/vnet/devices/tap/cli.c
parent929fb9d75071ef4141b1cac3997f86d9ded0a9ab (diff)
tapv2: add option to set host-side default gw
Change-Id: I76fd655ecd9445299b94b3b5af10e7b1588584e4 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/devices/tap/cli.c')
-rw-r--r--src/vnet/devices/tap/cli.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vnet/devices/tap/cli.c b/src/vnet/devices/tap/cli.c
index 7dd525b169d..c17599afdad 100644
--- a/src/vnet/devices/tap/cli.c
+++ b/src/vnet/devices/tap/cli.c
@@ -61,10 +61,16 @@ tap_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
unformat_ip4_address, &args.host_ip4_addr,
&args.host_ip4_prefix_len))
ip_addr_set = 1;
+ else if (unformat (line_input, "host-ip4-gw %U",
+ unformat_ip4_address, &args.host_ip4_gw))
+ args.host_ip4_gw_set = 1;
else if (unformat (line_input, "host-ip6-addr %U/%d",
unformat_ip6_address, &args.host_ip6_addr,
&args.host_ip6_prefix_len))
ip_addr_set = 1;
+ else if (unformat (line_input, "host-ip6-gw %U",
+ unformat_ip6_address, &args.host_ip6_gw))
+ args.host_ip6_gw_set = 1;
else if (unformat (line_input, "rx-ring-size %d", &args.rx_ring_sz))
;
else if (unformat (line_input, "tx-ring-size %d", &args.tx_ring_sz))
@@ -102,7 +108,8 @@ VLIB_CLI_COMMAND (tap_create_command, static) = {
.short_help = "create tap {id <if-id>} [hw-addr <mac-address>] "
"[rx-ring-size <size>] [tx-ring-size <size>] [host-ns <netns>] "
"[host-bridge <bridge-name>] [host-ip4-addr <ip4addr/mask>] "
- "[host-ip6-addr <ip6-addr] [host-if-name <name>]",
+ "[host-ip6-addr <ip6-addr>] [host-ip4-gw <ip4-addr>] "
+ "[host-ip6-gw <ip6-addr>] [host-if-name <name>]",
.function = tap_create_command_fn,
};
/* *INDENT-ON* */