diff options
Diffstat (limited to 'src/vnet/ipip')
-rw-r--r-- | src/vnet/ipip/ipip.c | 18 | ||||
-rw-r--r-- | src/vnet/ipip/ipip_api.c | 4 |
2 files changed, 21 insertions, 1 deletions
diff --git a/src/vnet/ipip/ipip.c b/src/vnet/ipip/ipip.c index 5d407084205..66c945e346e 100644 --- a/src/vnet/ipip/ipip.c +++ b/src/vnet/ipip/ipip.c @@ -297,6 +297,23 @@ ipip_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags) return /* no error */ 0; } +static int +ipip_tunnel_desc (u32 sw_if_index, + ip46_address_t * src, ip46_address_t * dst, u8 * is_l2) +{ + ipip_tunnel_t *t; + + t = ipip_tunnel_db_find_by_sw_if_index (sw_if_index); + if (!t) + return -1; + + *src = t->tunnel_src; + *dst = t->tunnel_dst; + *is_l2 = 0; + + return (0); +} + /* *INDENT-OFF* */ VNET_DEVICE_CLASS(ipip_device_class) = { .name = "IPIP tunnel device", @@ -304,6 +321,7 @@ VNET_DEVICE_CLASS(ipip_device_class) = { .format_device = format_ipip_device, .format_tx_trace = format_ipip_tx_trace, .admin_up_down_function = ipip_interface_admin_up_down, + .ip_tun_desc = ipip_tunnel_desc, #ifdef SOON .clear counter = 0; #endif diff --git a/src/vnet/ipip/ipip_api.c b/src/vnet/ipip/ipip_api.c index 35b846e5c8b..62a99659eee 100644 --- a/src/vnet/ipip/ipip_api.c +++ b/src/vnet/ipip/ipip_api.c @@ -150,7 +150,9 @@ vl_api_ipip_tunnel_dump_t_handler (vl_api_ipip_tunnel_dump_t * mp) { /* *INDENT-OFF* */ pool_foreach(t, gm->tunnels, - ({ send_ipip_tunnel_details(t, reg, mp->context); })); + ({ + send_ipip_tunnel_details(t, reg, mp->context); + })); /* *INDENT-ON* */ } else |