X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=vnet%2Fvnet%2Fl2tp%2Fdecap.c;h=68b7fabe76d2e8faf697f1e39982a768a1072827;hb=80ee21386cea217d0e9292d2a8b15ea88bf99d30;hp=544002818901469fd34c6d6cc97c20da2bdc5b8a;hpb=de393bb76d8c221e1145f62070f51a9ca4191f9f;p=vpp.git diff --git a/vnet/vnet/l2tp/decap.c b/vnet/vnet/l2tp/decap.c index 54400281890..68b7fabe76d 100644 --- a/vnet/vnet/l2tp/decap.c +++ b/vnet/vnet/l2tp/decap.c @@ -27,7 +27,8 @@ _(USER_TO_NETWORK, "L2TP user (ip6) to L2 network pkts") \ _(SESSION_ID_MISMATCH, "l2tpv3 local session id mismatches") \ _(COOKIE_MISMATCH, "l2tpv3 local cookie mismatches") \ -_(NO_SESSION, "l2tpv3 session not found") +_(NO_SESSION, "l2tpv3 session not found") \ +_(ADMIN_DOWN, "l2tpv3 tunnel is down") static char * l2t_decap_error_strings[] = { #define _(sym,string) string, @@ -169,6 +170,12 @@ static inline u32 last_stage (vlib_main_t *vm, vlib_node_runtime_t *node, vnet_buffer(b)->sw_if_index[VLIB_RX] = session->sw_if_index; + if (PREDICT_FALSE(!(session->admin_up))) { + b->error = node->errors[L2T_DECAP_ERROR_ADMIN_DOWN]; + next_index = L2T_DECAP_NEXT_DROP; + goto done; + } + /* strip the ip6 and L2TP header */ vlib_buffer_advance (b, sizeof (*ip6) + session->l2tp_hdr_size);