Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
tapv2: add option to set host-side default gw
[vpp.git]
/
src
/
vnet
/
devices
/
tap
/
tapv2_api.c
diff --git
a/src/vnet/devices/tap/tapv2_api.c
b/src/vnet/devices/tap/tapv2_api.c
index
9f46884
..
34472c0
100644
(file)
--- a/
src/vnet/devices/tap/tapv2_api.c
+++ b/
src/vnet/devices/tap/tapv2_api.c
@@
-96,6
+96,18
@@
vl_api_tap_create_v2_t_handler (vl_api_tap_create_v2_t * mp)
ap->host_ip6_prefix_len = mp->host_ip6_prefix_len;
}
ap->host_ip6_prefix_len = mp->host_ip6_prefix_len;
}
+ if (mp->host_ip4_gw_set)
+ {
+ clib_memcpy (&ap->host_ip4_gw, mp->host_ip4_gw, 4);
+ ap->host_ip4_gw_set = 1;
+ }
+
+ if (mp->host_ip6_gw_set)
+ {
+ clib_memcpy (&ap->host_ip6_gw, mp->host_ip6_gw, 16);
+ ap->host_ip6_gw_set = 1;
+ }
+
tap_create_if (vm, ap);
reg = vl_api_client_index_to_registration (mp->client_index);
tap_create_if (vm, ap);
reg = vl_api_client_index_to_registration (mp->client_index);