Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 1 | /* |
| 2 | * decap.c : L2TPv3 tunnel decapsulation |
| 3 | * |
| 4 | * Copyright (c) 2013 Cisco and/or its affiliates. |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at: |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | */ |
| 17 | |
| 18 | #include <vppinfra/error.h> |
| 19 | #include <vppinfra/hash.h> |
| 20 | #include <vnet/vnet.h> |
| 21 | #include <vnet/ip/ip.h> |
| 22 | #include <vnet/ethernet/ethernet.h> |
| 23 | #include <vnet/l2tp/l2tp.h> |
| 24 | |
| 25 | /* Statistics (not really errors) */ |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 26 | #define foreach_l2t_decap_error \ |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 27 | _(USER_TO_NETWORK, "L2TP user (ip6) to L2 network pkts") \ |
| 28 | _(SESSION_ID_MISMATCH, "l2tpv3 local session id mismatches") \ |
Pierre Pfister | a026eb1 | 2016-06-20 14:52:22 +0100 | [diff] [blame] | 29 | _(COOKIE_MISMATCH, "l2tpv3 local cookie mismatches") \ |
Pierre Pfister | 80ee213 | 2016-06-22 12:54:48 +0100 | [diff] [blame] | 30 | _(NO_SESSION, "l2tpv3 session not found") \ |
| 31 | _(ADMIN_DOWN, "l2tpv3 tunnel is down") |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 32 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 33 | static char *l2t_decap_error_strings[] = { |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 34 | #define _(sym,string) string, |
| 35 | foreach_l2t_decap_error |
| 36 | #undef _ |
| 37 | }; |
| 38 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 39 | typedef enum |
| 40 | { |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 41 | #define _(sym,str) L2T_DECAP_ERROR_##sym, |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 42 | foreach_l2t_decap_error |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 43 | #undef _ |
| 44 | L2T_DECAP_N_ERROR, |
| 45 | } l2t_DECAP_error_t; |
| 46 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 47 | typedef enum |
| 48 | { |
| 49 | L2T_DECAP_NEXT_DROP, |
| 50 | L2T_DECAP_NEXT_L2_INPUT, |
| 51 | L2T_DECAP_N_NEXT, |
| 52 | /* Pseudo next index */ |
| 53 | L2T_DECAP_NEXT_NO_INTERCEPT = L2T_DECAP_N_NEXT, |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 54 | } l2t_decap_next_t; |
| 55 | |
| 56 | #define NSTAGES 3 |
| 57 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 58 | static inline void |
Dave Barach | 66446b9 | 2018-07-23 12:20:09 -0400 | [diff] [blame] | 59 | stage0 (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_buffer_t * b) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 60 | { |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 61 | vlib_prefetch_buffer_header (b, STORE); |
| 62 | /* l2tpv3 header is a long way away, need 2 cache lines */ |
| 63 | CLIB_PREFETCH (b->data, 2 * CLIB_CACHE_LINE_BYTES, STORE); |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 64 | } |
| 65 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 66 | static inline void |
Dave Barach | 66446b9 | 2018-07-23 12:20:09 -0400 | [diff] [blame] | 67 | stage1 (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_buffer_t * b) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 68 | { |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 69 | l2t_main_t *lm = &l2t_main; |
| 70 | ip6_header_t *ip6 = vlib_buffer_get_current (b); |
| 71 | u32 session_index; |
| 72 | uword *p = 0; |
| 73 | l2tpv3_header_t *l2t; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 74 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 75 | /* Not L2tpv3 (0x73, 0t115)? Use the normal path. */ |
| 76 | if (PREDICT_FALSE (ip6->protocol != IP_PROTOCOL_L2TP)) |
| 77 | { |
| 78 | vnet_buffer (b)->l2t.next_index = L2T_DECAP_NEXT_NO_INTERCEPT; |
| 79 | return; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 80 | } |
| 81 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 82 | /* Make up your minds, people... */ |
| 83 | switch (lm->lookup_type) |
| 84 | { |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 85 | case L2T_LOOKUP_SRC_ADDRESS: |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 86 | p = hash_get_mem (lm->session_by_src_address, &ip6->src_address); |
| 87 | break; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 88 | case L2T_LOOKUP_DST_ADDRESS: |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 89 | p = hash_get_mem (lm->session_by_dst_address, &ip6->dst_address); |
| 90 | break; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 91 | case L2T_LOOKUP_SESSION_ID: |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 92 | l2t = (l2tpv3_header_t *) (ip6 + 1); |
| 93 | p = hash_get (lm->session_by_session_id, l2t->session_id); |
| 94 | break; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 95 | default: |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 96 | ASSERT (0); |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 97 | } |
| 98 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 99 | if (PREDICT_FALSE (p == 0)) |
| 100 | { |
| 101 | vnet_buffer (b)->l2t.next_index = L2T_DECAP_NEXT_NO_INTERCEPT; |
| 102 | return; |
| 103 | } |
| 104 | else |
| 105 | { |
| 106 | session_index = p[0]; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 107 | } |
| 108 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 109 | /* Remember mapping index, prefetch the mini counter */ |
| 110 | vnet_buffer (b)->l2t.next_index = L2T_DECAP_NEXT_L2_INPUT; |
| 111 | vnet_buffer (b)->l2t.session_index = session_index; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 112 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 113 | /* $$$$$ prefetch counter */ |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 114 | } |
| 115 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 116 | static inline u32 |
Dave Barach | 66446b9 | 2018-07-23 12:20:09 -0400 | [diff] [blame] | 117 | last_stage (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_buffer_t * b) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 118 | { |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 119 | l2t_main_t *lm = &l2t_main; |
| 120 | ip6_header_t *ip6 = vlib_buffer_get_current (b); |
| 121 | vlib_node_t *n = vlib_get_node (vm, node->node_index); |
| 122 | u32 node_counter_base_index = n->error_heap_index; |
| 123 | vlib_error_main_t *em = &vm->error_main; |
| 124 | l2tpv3_header_t *l2tp; |
| 125 | u32 counter_index; |
Dave Barach | 75665d3 | 2016-11-17 11:36:59 -0500 | [diff] [blame] | 126 | l2t_session_t *session = 0; |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 127 | u32 session_index; |
| 128 | u32 next_index; |
| 129 | u8 l2tp_decap_local = (l2t_decap_local_node.index == n->index); |
| 130 | |
| 131 | /* Other-than-output pkt? We're done... */ |
| 132 | if (vnet_buffer (b)->l2t.next_index != L2T_DECAP_NEXT_L2_INPUT) |
| 133 | { |
| 134 | next_index = vnet_buffer (b)->l2t.next_index; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 135 | goto done; |
| 136 | } |
| 137 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 138 | em->counters[node_counter_base_index + L2T_DECAP_ERROR_USER_TO_NETWORK] += |
| 139 | 1; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 140 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 141 | session_index = vnet_buffer (b)->l2t.session_index; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 142 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 143 | counter_index = |
| 144 | session_index_to_counter_index (session_index, |
| 145 | SESSION_COUNTER_USER_TO_NETWORK); |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 146 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 147 | /* per-mapping byte stats include the ethernet header */ |
| 148 | vlib_increment_combined_counter (&lm->counter_main, |
Damjan Marion | 586afd7 | 2017-04-05 19:18:20 +0200 | [diff] [blame] | 149 | vlib_get_thread_index (), |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 150 | counter_index, 1 /* packet_increment */ , |
| 151 | vlib_buffer_length_in_chain (vm, b) + |
| 152 | sizeof (ethernet_header_t)); |
| 153 | |
| 154 | session = pool_elt_at_index (lm->sessions, session_index); |
| 155 | |
| 156 | l2tp = vlib_buffer_get_current (b) + sizeof (*ip6); |
| 157 | |
| 158 | if (PREDICT_FALSE (l2tp->session_id != session->local_session_id)) |
| 159 | { |
| 160 | /* Key matched but session id does not. Assume packet is not for us. */ |
| 161 | em->counters[node_counter_base_index + |
| 162 | L2T_DECAP_ERROR_SESSION_ID_MISMATCH] += 1; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 163 | next_index = L2T_DECAP_NEXT_NO_INTERCEPT; |
| 164 | goto done; |
| 165 | } |
| 166 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 167 | if (PREDICT_FALSE (l2tp->cookie != session->local_cookie[0])) |
| 168 | { |
| 169 | if (l2tp->cookie != session->local_cookie[1]) |
| 170 | { |
| 171 | /* Key and session ID matched, but cookie doesn't. Drop this packet. */ |
| 172 | b->error = node->errors[L2T_DECAP_ERROR_COOKIE_MISMATCH]; |
| 173 | next_index = L2T_DECAP_NEXT_DROP; |
| 174 | goto done; |
| 175 | } |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 176 | } |
| 177 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 178 | vnet_buffer (b)->sw_if_index[VLIB_RX] = session->sw_if_index; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 179 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 180 | if (PREDICT_FALSE (!(session->admin_up))) |
| 181 | { |
| 182 | b->error = node->errors[L2T_DECAP_ERROR_ADMIN_DOWN]; |
| 183 | next_index = L2T_DECAP_NEXT_DROP; |
| 184 | goto done; |
Pierre Pfister | 80ee213 | 2016-06-22 12:54:48 +0100 | [diff] [blame] | 185 | } |
| 186 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 187 | /* strip the ip6 and L2TP header */ |
| 188 | vlib_buffer_advance (b, sizeof (*ip6) + session->l2tp_hdr_size); |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 189 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 190 | /* Required to make the l2 tag push / pop code work on l2 subifs */ |
| 191 | vnet_update_l2_len (b); |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 192 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 193 | if (PREDICT_FALSE (b->flags & VLIB_BUFFER_IS_TRACED)) |
| 194 | { |
| 195 | l2t_trace_t *t = vlib_add_trace (vm, node, b, sizeof (*t)); |
| 196 | t->is_user_to_network = 1; |
| 197 | t->our_address.as_u64[0] = ip6->dst_address.as_u64[0]; |
| 198 | t->our_address.as_u64[1] = ip6->dst_address.as_u64[1]; |
| 199 | t->client_address.as_u64[0] = ip6->src_address.as_u64[0]; |
| 200 | t->client_address.as_u64[1] = ip6->src_address.as_u64[1]; |
| 201 | t->session_index = session_index; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 202 | } |
| 203 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 204 | return L2T_DECAP_NEXT_L2_INPUT; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 205 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 206 | done: |
| 207 | if (next_index == L2T_DECAP_NEXT_NO_INTERCEPT) |
| 208 | { |
| 209 | /* Small behavioral change between l2tp-decap and l2tp-decap-local */ |
| 210 | if (l2tp_decap_local) |
| 211 | { |
| 212 | b->error = node->errors[L2T_DECAP_ERROR_NO_SESSION]; |
| 213 | next_index = L2T_DECAP_NEXT_DROP; |
| 214 | } |
| 215 | else |
| 216 | { |
| 217 | /* Go to next node on the ip6 configuration chain */ |
Dave Barach | 7afe9e3 | 2016-11-22 15:23:41 -0500 | [diff] [blame] | 218 | if (PREDICT_TRUE (session != 0)) |
Damjan Marion | 7d98a12 | 2018-07-19 20:42:08 +0200 | [diff] [blame] | 219 | vnet_feature_next (&next_index, b); |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 220 | } |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 221 | } |
| 222 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 223 | if (PREDICT_FALSE (b->flags & VLIB_BUFFER_IS_TRACED)) |
| 224 | { |
| 225 | l2t_trace_t *t = vlib_add_trace (vm, node, b, sizeof (*t)); |
| 226 | t->is_user_to_network = 1; |
| 227 | t->our_address.as_u64[0] = ip6->dst_address.as_u64[0]; |
| 228 | t->our_address.as_u64[1] = ip6->dst_address.as_u64[1]; |
| 229 | t->client_address.as_u64[0] = ip6->src_address.as_u64[0]; |
| 230 | t->client_address.as_u64[1] = ip6->src_address.as_u64[1]; |
| 231 | t->session_index = ~0; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 232 | } |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 233 | return next_index; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 234 | } |
| 235 | |
| 236 | #include <vnet/pipeline.h> |
| 237 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 238 | static uword |
| 239 | l2t_decap_node_fn (vlib_main_t * vm, |
| 240 | vlib_node_runtime_t * node, vlib_frame_t * frame) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 241 | { |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 242 | return dispatch_pipeline (vm, node, frame); |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 243 | } |
| 244 | |
Pierre Pfister | a026eb1 | 2016-06-20 14:52:22 +0100 | [diff] [blame] | 245 | /* |
| 246 | * l2tp-decap and l2tp-decap-local have very slightly different behavior. |
| 247 | * When a packet has no associated session l2tp-decap let it go to ip6 forward, |
| 248 | * while l2tp-decap-local drops it. |
| 249 | */ |
| 250 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 251 | /* *INDENT-OFF* */ |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 252 | VLIB_REGISTER_NODE (l2t_decap_node) = { |
| 253 | .function = l2t_decap_node_fn, |
| 254 | .name = "l2tp-decap", |
| 255 | .vector_size = sizeof (u32), |
| 256 | .format_trace = format_l2t_trace, |
| 257 | .type = VLIB_NODE_TYPE_INTERNAL, |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 258 | |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 259 | .n_errors = ARRAY_LEN(l2t_decap_error_strings), |
| 260 | .error_strings = l2t_decap_error_strings, |
| 261 | |
| 262 | .n_next_nodes = L2T_DECAP_N_NEXT, |
| 263 | |
| 264 | /* edit / add dispositions here */ |
| 265 | .next_nodes = { |
| 266 | [L2T_DECAP_NEXT_L2_INPUT] = "l2-input", |
| 267 | [L2T_DECAP_NEXT_DROP] = "error-drop", |
| 268 | }, |
| 269 | }; |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 270 | /* *INDENT-ON* */ |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 271 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 272 | VLIB_NODE_FUNCTION_MULTIARCH (l2t_decap_node, l2t_decap_node_fn); |
| 273 | /* *INDENT-OFF* */ |
Pierre Pfister | a026eb1 | 2016-06-20 14:52:22 +0100 | [diff] [blame] | 274 | VLIB_REGISTER_NODE (l2t_decap_local_node) = { |
| 275 | .function = l2t_decap_node_fn, |
| 276 | .name = "l2tp-decap-local", |
| 277 | .vector_size = sizeof (u32), |
| 278 | .format_trace = format_l2t_trace, |
| 279 | .type = VLIB_NODE_TYPE_INTERNAL, |
| 280 | |
| 281 | .n_errors = ARRAY_LEN(l2t_decap_error_strings), |
| 282 | .error_strings = l2t_decap_error_strings, |
| 283 | |
| 284 | .n_next_nodes = L2T_DECAP_N_NEXT, |
| 285 | |
| 286 | /* edit / add dispositions here */ |
| 287 | .next_nodes = { |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 288 | [L2T_DECAP_NEXT_L2_INPUT] = "l2-input", |
| 289 | [L2T_DECAP_NEXT_DROP] = "error-drop", |
Pierre Pfister | a026eb1 | 2016-06-20 14:52:22 +0100 | [diff] [blame] | 290 | }, |
| 291 | }; |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 292 | /* *INDENT-ON* */ |
Pierre Pfister | a026eb1 | 2016-06-20 14:52:22 +0100 | [diff] [blame] | 293 | |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 294 | void |
| 295 | l2tp_decap_init (void) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 296 | { |
Pierre Pfister | a026eb1 | 2016-06-20 14:52:22 +0100 | [diff] [blame] | 297 | ip6_register_protocol (IP_PROTOCOL_L2TP, l2t_decap_local_node.index); |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 298 | } |
Calvin | ee275a7 | 2016-08-10 11:01:41 -0400 | [diff] [blame] | 299 | |
| 300 | /* |
| 301 | * fd.io coding-style-patch-verification: ON |
| 302 | * |
| 303 | * Local Variables: |
| 304 | * eval: (c-set-style "gnu") |
| 305 | * End: |
| 306 | */ |