vcl: ldp support SO_ORIGINAL_DST
[vpp.git] / src / vnet / session / application.c
index ad4d447..5998921 100644 (file)
@@ -189,6 +189,7 @@ app_listener_alloc_and_init (application_t * app,
        {
          ls = session_get_from_handle (lh);
          session_free (ls);
+         app_listener_free (app, app_listener);
          return rv;
        }
 
@@ -223,6 +224,7 @@ app_listener_alloc_and_init (application_t * app,
        {
          ls = listen_session_get_from_handle (lh);
          session_free (ls);
+         app_listener_free (app, app_listener);
          return rv;
        }
       ls = listen_session_get_from_handle (lh);
@@ -1527,6 +1529,12 @@ application_has_global_scope (application_t * app)
   return app->flags & APP_OPTIONS_FLAGS_USE_GLOBAL_SCOPE;
 }
 
+int
+application_original_dst_is_enabled (application_t *app)
+{
+  return app->flags & APP_OPTIONS_FLAGS_GET_ORIGINAL_DST;
+}
+
 static clib_error_t *
 application_start_stop_proxy_fib_proto (application_t * app, u8 fib_proto,
                                        u8 transport_proto, u8 is_start)