FD.io VPP  v18.01.2-1-g9b554f3
Vector Packet Processing
tcp_syn_filter4.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include <vlib/vlib.h>
17 #include <vnet/vnet.h>
18 #include <vnet/pg/pg.h>
19 #include <vppinfra/error.h>
20 #include <vnet/feature/feature.h>
21 #include <vnet/ip/ip.h>
22 #include <vppinfra/xxhash.h>
23 
24 typedef struct
25 {
30 
31 typedef struct
32 {
34  int not_a_syn;
37 
38 /* packet trace format function */
39 static u8 *
40 format_syn_filter4_trace (u8 * s, va_list * args)
41 {
42  CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
43  CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
44  syn_filter4_trace_t *t = va_arg (*args, syn_filter4_trace_t *);
45 
46  s = format (s, "SYN_FILTER4: next index %d, %s",
47  t->next_index, t->not_a_syn ? "not a syn" : "syn");
48  if (t->not_a_syn == 0)
49  s = format (s, ", filter value %d\n", t->filter_value);
50  else
51  s = format (s, "\n");
52  return s;
53 }
54 
56 
57 #define foreach_syn_filter_error \
58 _(THROTTLED, "TCP SYN packet throttle drops") \
59 _(OK, "TCP SYN packets passed")
60 
61 typedef enum
62 {
63 #define _(sym,str) SYN_FILTER_ERROR_##sym,
65 #undef _
68 
69 static char *syn_filter4_error_strings[] = {
70 #define _(sym,string) string,
72 #undef _
73 };
74 
75 typedef enum
76 {
80 
82 
83 static uword
85  vlib_node_runtime_t * node, vlib_frame_t * frame)
86 {
87  u32 n_left_from, *from, *to_next;
88  syn_filter_next_t next_index;
89  u32 ok_syn_packets = 0;
91  u8 arc_index = vnet_feat_arc_ip4_local.feature_arc_index;
94  f64 now = vlib_time_now (vm);
95  /* Shut up spurious gcc warnings. */
96  u8 *c0 = 0, *c1 = 0, *c2 = 0, *c3 = 0;
97 
98  from = vlib_frame_vector_args (frame);
99  n_left_from = frame->n_vectors;
100  next_index = node->cached_next_index;
101 
102  if (now > rt->next_reset)
103  {
104  memset (rt->syn_counts, 0, vec_len (rt->syn_counts));
105  rt->next_reset = now + rt->reset_interval;
106  }
107 
108  while (n_left_from > 0)
109  {
110  u32 n_left_to_next;
111 
112  vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next);
113 
114  while (n_left_from >= 8 && n_left_to_next >= 4)
115  {
116  u32 bi0, bi1, bi2, bi3;
117  vlib_buffer_t *b0, *b1, *b2, *b3;
118  u32 next0, next1, next2, next3;
119  ip4_header_t *ip0, *ip1, *ip2, *ip3;
120  tcp_header_t *tcp0, *tcp1, *tcp2, *tcp3;
121  u32 not_a_syn0 = 1, not_a_syn1 = 1, not_a_syn2 = 1, not_a_syn3 = 1;
122  u64 hash0, hash1, hash2, hash3;
123 
124  /* Prefetch next iteration. */
125  {
126  vlib_buffer_t *p4, *p5, *p6, *p7;
127 
128  p4 = vlib_get_buffer (vm, from[4]);
129  p5 = vlib_get_buffer (vm, from[5]);
130  p6 = vlib_get_buffer (vm, from[6]);
131  p7 = vlib_get_buffer (vm, from[7]);
132 
133  vlib_prefetch_buffer_header (p4, LOAD);
134  vlib_prefetch_buffer_header (p5, LOAD);
135  vlib_prefetch_buffer_header (p6, LOAD);
136  vlib_prefetch_buffer_header (p7, LOAD);
137 
142  }
143 
144  /* speculatively enqueue b0 and b1 to the current next frame */
145  to_next[0] = bi0 = from[0];
146  to_next[1] = bi1 = from[1];
147  to_next[2] = bi2 = from[2];
148  to_next[3] = bi3 = from[3];
149  from += 4;
150  to_next += 4;
151  n_left_from -= 4;
152  n_left_to_next -= 4;
153 
154  b0 = vlib_get_buffer (vm, bi0);
155  b1 = vlib_get_buffer (vm, bi1);
156  b2 = vlib_get_buffer (vm, bi2);
157  b3 = vlib_get_buffer (vm, bi3);
158 
160  (&cm->config_main, &b0->current_config_index,
161  &next0, 0 /* sizeof (c0[0]) */ );
163  (&cm->config_main, &b1->current_config_index,
164  &next1, 0 /* sizeof (c0[0]) */ );
166  (&cm->config_main, &b2->current_config_index,
167  &next2, 0 /* sizeof (c0[0]) */ );
169  (&cm->config_main, &b3->current_config_index,
170  &next3, 0 /* sizeof (c0[0]) */ );
171 
172  /* Not TCP? */
173  ip0 = vlib_buffer_get_current (b0);
174  if (ip0->protocol != IP_PROTOCOL_TCP)
175  goto trace00;
176 
177  tcp0 = ip4_next_header (ip0);
178  /*
179  * Not a SYN?
180  * $$$$ hack: the TCP bitfield flags seem not to compile
181  * correct code.
182  */
183  if (PREDICT_TRUE (!(tcp0->flags & 0x2)))
184  goto trace00;
185 
186  not_a_syn0 = 0;
187  hash0 = clib_xxhash ((u64) ip0->src_address.as_u32);
188  c0 = &rt->syn_counts[hash0 & (_vec_len (rt->syn_counts) - 1)];
189  if (PREDICT_FALSE (*c0 >= 0x80))
190  {
191  next0 = SYN_FILTER_NEXT_DROP;
192  b0->error = node->errors[SYN_FILTER_ERROR_THROTTLED];
193  goto trace00;
194  }
195  *c0 += 1;
196  ok_syn_packets++;
197 
198  trace00:
200  && (b0->flags & VLIB_BUFFER_IS_TRACED)))
201  {
203  vlib_add_trace (vm, node, b0, sizeof (*t));
204  t->not_a_syn = not_a_syn0;
205  t->next_index = next0;
206  t->filter_value = not_a_syn0 ? 0 : *c0;
207  }
208 
209  /* Not TCP? */
210  ip1 = vlib_buffer_get_current (b1);
211  if (ip1->protocol != IP_PROTOCOL_TCP)
212  goto trace01;
213 
214  tcp1 = ip4_next_header (ip1);
215  /*
216  * Not a SYN?
217  * $$$$ hack: the TCP bitfield flags seem not to compile
218  * correct code.
219  */
220  if (PREDICT_TRUE (!(tcp1->flags & 0x2)))
221  goto trace01;
222 
223  not_a_syn1 = 0;
224  hash1 = clib_xxhash ((u64) ip1->src_address.as_u32);
225  c1 = &rt->syn_counts[hash1 & (_vec_len (rt->syn_counts) - 1)];
226  if (PREDICT_FALSE (*c1 >= 0x80))
227  {
228  next1 = SYN_FILTER_NEXT_DROP;
229  b1->error = node->errors[SYN_FILTER_ERROR_THROTTLED];
230  goto trace01;
231  }
232  *c1 += 1;
233  ok_syn_packets++;
234 
235  trace01:
237  && (b1->flags & VLIB_BUFFER_IS_TRACED)))
238  {
240  vlib_add_trace (vm, node, b1, sizeof (*t));
241  t->not_a_syn = not_a_syn1;
242  t->next_index = next1;
243  t->filter_value = not_a_syn1 ? 0 : *c1;
244  }
245 
246  /* Not TCP? */
247  ip2 = vlib_buffer_get_current (b2);
248  if (ip2->protocol != IP_PROTOCOL_TCP)
249  goto trace02;
250 
251  tcp2 = ip4_next_header (ip2);
252  /*
253  * Not a SYN?
254  * $$$$ hack: the TCP bitfield flags seem not to compile
255  * correct code.
256  */
257  if (PREDICT_TRUE (!(tcp2->flags & 0x2)))
258  goto trace02;
259 
260  not_a_syn2 = 0;
261  hash2 = clib_xxhash ((u64) ip2->src_address.as_u32);
262  c2 = &rt->syn_counts[hash2 & (_vec_len (rt->syn_counts) - 1)];
263  if (PREDICT_FALSE (*c2 >= 0x80))
264  {
265  next2 = SYN_FILTER_NEXT_DROP;
266  b2->error = node->errors[SYN_FILTER_ERROR_THROTTLED];
267  goto trace02;
268  }
269  *c2 += 1;
270  ok_syn_packets++;
271 
272  trace02:
274  && (b2->flags & VLIB_BUFFER_IS_TRACED)))
275  {
277  vlib_add_trace (vm, node, b2, sizeof (*t));
278  t->not_a_syn = not_a_syn2;
279  t->next_index = next2;
280  t->filter_value = not_a_syn2 ? 0 : *c2;
281  }
282 
283  /* Not TCP? */
284  ip3 = vlib_buffer_get_current (b3);
285  if (ip3->protocol != IP_PROTOCOL_TCP)
286  goto trace03;
287 
288  tcp3 = ip4_next_header (ip3);
289  /*
290  * Not a SYN?
291  * $$$$ hack: the TCP bitfield flags seem not to compile
292  * correct code.
293  */
294  if (PREDICT_TRUE (!(tcp3->flags & 0x2)))
295  goto trace03;
296 
297  not_a_syn3 = 0;
298  hash3 = clib_xxhash ((u64) ip3->src_address.as_u32);
299  c3 = &rt->syn_counts[hash3 & (_vec_len (rt->syn_counts) - 1)];
300  if (PREDICT_FALSE (*c3 >= 0x80))
301  {
302  next3 = SYN_FILTER_NEXT_DROP;
303  b3->error = node->errors[SYN_FILTER_ERROR_THROTTLED];
304  goto trace03;
305  }
306  *c3 += 1;
307  ok_syn_packets++;
308 
309  trace03:
311  && (b3->flags & VLIB_BUFFER_IS_TRACED)))
312  {
314  vlib_add_trace (vm, node, b3, sizeof (*t));
315  t->not_a_syn = not_a_syn3;
316  t->next_index = next3;
317  t->filter_value = not_a_syn3 ? 0 : *c3;
318  }
319  vlib_validate_buffer_enqueue_x4 (vm, node, next_index,
320  to_next, n_left_to_next,
321  bi0, bi1, bi2, bi3,
322  next0, next1, next2, next3);
323  }
324 
325  while (n_left_from > 0 && n_left_to_next > 0)
326  {
327  u32 bi0;
328  vlib_buffer_t *b0;
329  u32 next0;
330  ip4_header_t *ip0;
331  tcp_header_t *tcp0;
332  u32 not_a_syn0 = 1;
333  u32 hash0;
334  u8 *c0;
335 
336  /* speculatively enqueue b0 to the current next frame */
337  bi0 = from[0];
338  to_next[0] = bi0;
339  from += 1;
340  to_next += 1;
341  n_left_from -= 1;
342  n_left_to_next -= 1;
343 
344  b0 = vlib_get_buffer (vm, bi0);
345 
347  (&cm->config_main, &b0->current_config_index,
348  &next0, 0 /* sizeof (c0[0]) */ );
349 
350  /* Not TCP? */
351  ip0 = vlib_buffer_get_current (b0);
352  if (ip0->protocol != IP_PROTOCOL_TCP)
353  goto trace0;
354 
355  tcp0 = ip4_next_header (ip0);
356  /*
357  * Not a SYN?
358  * $$$$ hack: the TCP bitfield flags seem not to compile
359  * correct code.
360  */
361  if (PREDICT_TRUE (!(tcp0->flags & 0x2)))
362  goto trace0;
363 
364  not_a_syn0 = 0;
365  hash0 = clib_xxhash ((u64) ip0->src_address.as_u32);
366  c0 = &rt->syn_counts[hash0 & (_vec_len (rt->syn_counts) - 1)];
367  if (PREDICT_FALSE (*c0 >= 0x80))
368  {
369  next0 = SYN_FILTER_NEXT_DROP;
370  b0->error = node->errors[SYN_FILTER_ERROR_THROTTLED];
371  goto trace0;
372  }
373  *c0 += 1;
374  ok_syn_packets++;
375 
376  trace0:
377 
379  && (b0->flags & VLIB_BUFFER_IS_TRACED)))
380  {
382  vlib_add_trace (vm, node, b0, sizeof (*t));
383  t->not_a_syn = not_a_syn0;
384  t->next_index = next0;
385  t->filter_value = not_a_syn0 ? 0 : *c0;
386  }
387 
388  /* verify speculative enqueue, maybe switch current next frame */
389  vlib_validate_buffer_enqueue_x1 (vm, node, next_index,
390  to_next, n_left_to_next,
391  bi0, next0);
392  }
393 
394  vlib_put_next_frame (vm, node, next_index, n_left_to_next);
395  }
396 
398  SYN_FILTER_ERROR_OK, ok_syn_packets);
399  return frame->n_vectors;
400 }
401 
402 /* *INDENT-OFF* */
404 {
405  .function = syn_filter4_node_fn,
406  .name = "syn-filter-4",
407  .vector_size = sizeof (u32),
408  .format_trace = format_syn_filter4_trace,
409  .type = VLIB_NODE_TYPE_INTERNAL,
410 
411  .runtime_data_bytes = sizeof (syn_filter4_runtime_t),
413  .error_strings = syn_filter4_error_strings,
414 
415  .n_next_nodes = SYN_FILTER_N_NEXT,
416 
417  /* edit / add dispositions here */
418  .next_nodes = {
419  [SYN_FILTER_NEXT_DROP] = "error-drop",
420  },
421 };
422 /* *INDENT-ON* */
423 
425 
426 /* *INDENT-OFF* */
427 VNET_FEATURE_INIT (syn_filter_4, static) =
428 {
429  .arc_name = "ip4-local",
430  .node_name = "syn-filter-4",
431  .runs_before = VNET_FEATURES("ip4-local-end-of-arc"),
432 };
433 /* *INDENT-ON* */
434 
435 int
436 syn_filter_enable_disable (u32 sw_if_index, int enable_disable)
437 {
438  vnet_main_t *vnm = vnet_get_main ();
440  int rv = 0;
441 
442  /* Utterly wrong? */
443  if (pool_is_free_index (vnm->interface_main.sw_interfaces, sw_if_index))
444  return VNET_API_ERROR_INVALID_SW_IF_INDEX;
445 
446  /* Not a physical port? */
447  sw = vnet_get_sw_interface (vnm, sw_if_index);
449  return VNET_API_ERROR_INVALID_SW_IF_INDEX;
450 
451  if (enable_disable)
452  {
454 
455  /* *INDENT-OFF* */
457  rt = vlib_node_get_runtime_data (this_vlib_main, syn_filter4_node.index);
458  vec_validate (rt->syn_counts, 1023);
459  /*
460  * Given perfect disperson / optimal hashing results:
461  * Allow 128k (successful) syns/sec. 1024, buckets each of which
462  * absorb 128 syns before filtering. Reset table once a second.
463  * Reality bites, lets try resetting once every 100ms.
464  */
465  rt->reset_interval = 0.1; /* reset interval in seconds */
466  });
467  /* *INDENT-ON* */
468  }
469 
470  rv = vnet_feature_enable_disable ("ip4-local", "syn-filter-4",
471  sw_if_index, enable_disable, 0, 0);
472 
473  return rv;
474 }
475 
476 static clib_error_t *
478  unformat_input_t * input,
479  vlib_cli_command_t * cmd)
480 {
481  vnet_main_t *vnm = vnet_get_main ();
482  u32 sw_if_index = ~0;
483  int enable_disable = 1;
484  int rv;
485 
487  {
488  if (unformat (input, "disable"))
489  enable_disable = 0;
490  else if (unformat (input, "%U", unformat_vnet_sw_interface,
491  vnm, &sw_if_index))
492  ;
493  else
494  break;
495  }
496 
497  if (sw_if_index == ~0)
498  return clib_error_return (0, "Please specify an interface...");
499 
500  rv = syn_filter_enable_disable (sw_if_index, enable_disable);
501 
502  switch (rv)
503  {
504  case 0:
505  break;
506 
507  case VNET_API_ERROR_INVALID_SW_IF_INDEX:
508  return clib_error_return
509  (0, "Invalid interface, only works on physical ports");
510  break;
511 
512  case VNET_API_ERROR_UNIMPLEMENTED:
513  return clib_error_return (0,
514  "Device driver doesn't support redirection");
515  break;
516 
517  case VNET_API_ERROR_INVALID_VALUE:
518  return clib_error_return (0, "feature arc not found");
519 
520  case VNET_API_ERROR_INVALID_VALUE_2:
521  return clib_error_return (0, "feature node not found");
522 
523  default:
524  return clib_error_return (0, "syn_filter_enable_disable returned %d",
525  rv);
526  }
527  return 0;
528 }
529 
530 /* *INDENT-OFF* */
531 VLIB_CLI_COMMAND (sr_content_command, static) =
532 {
533  .path = "ip syn filter",
534  .short_help = "ip syn filter <interface-name> [disable]",
536 };
537 /* *INDENT-ON* */
538 
539 /*
540  * fd.io coding-style-patch-verification: ON
541  *
542  * Local Variables:
543  * eval: (c-set-style "gnu")
544  * End:
545  */
vnet_config_main_t config_main
Definition: feature.h:65
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
Definition: vec.h:432
#define CLIB_UNUSED(x)
Definition: clib.h:79
u8 runtime_data[0]
Function dependent node-runtime data.
Definition: node.h:464
u32 current_config_index
Used by feature subgraph arcs to visit enabled feature nodes.
Definition: buffer.h:116
ip4_address_t src_address
Definition: ip4_packet.h:164
vnet_main_t * vnet_get_main(void)
Definition: misc.c:47
vnet_interface_main_t interface_main
Definition: vnet.h:56
#define PREDICT_TRUE(x)
Definition: clib.h:106
static f64 vlib_time_now(vlib_main_t *vm)
Definition: main.h:224
#define vlib_validate_buffer_enqueue_x4(vm, node, next_index, to_next, n_left_to_next, bi0, bi1, bi2, bi3, next0, next1, next2, next3)
Finish enqueueing four buffers forward in the graph.
Definition: buffer_node.h:138
static u64 clib_xxhash(u64 key)
Definition: xxhash.h:58
struct _vlib_node_registration vlib_node_registration_t
static vnet_sw_interface_t * vnet_get_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
u8 * format(u8 *s, const char *fmt,...)
Definition: format.c:419
unformat_function_t unformat_vnet_sw_interface
static uword syn_filter4_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
vlib_error_t * errors
Vector of errors for this node.
Definition: node.h:415
struct _tcp_header tcp_header_t
static vlib_node_registration_t syn_filter4_node
(constructor) VLIB_REGISTER_NODE (syn_filter4_node)
static u8 * format_syn_filter4_trace(u8 *s, va_list *args)
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
Definition: buffer.h:171
#define clib_error_return(e, args...)
Definition: error.h:99
unsigned long u64
Definition: types.h:89
static void * ip4_next_header(ip4_header_t *i)
Definition: ip4_packet.h:233
int syn_filter_enable_disable(u32 sw_if_index, int enable_disable)
struct _unformat_input_t unformat_input_t
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
Definition: buffer.h:195
static void * vnet_get_config_data(vnet_config_main_t *cm, u32 *config_index, u32 *next_index, u32 n_data_bytes)
Definition: config.h:122
static void * vlib_node_get_runtime_data(vlib_main_t *vm, u32 node_index)
Get node runtime private data by node index.
Definition: node_funcs.h:110
#define PREDICT_FALSE(x)
Definition: clib.h:105
#define vlib_validate_buffer_enqueue_x1(vm, node, next_index, to_next, n_left_to_next, bi0, next0)
Finish enqueueing one buffer forward in the graph.
Definition: buffer_node.h:218
#define foreach_vlib_main(body)
Definition: threads.h:244
#define vlib_get_next_frame(vm, node, next_index, vectors, n_vectors_left)
Get pointer to next frame vector data by (vlib_node_runtime_t, next_index).
Definition: node_funcs.h:364
vlib_error_t error
Error code for buffers to be enqueued to error handler.
Definition: buffer.h:113
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
Definition: node_funcs.h:1158
#define UNFORMAT_END_OF_INPUT
Definition: format.h:143
u16 n_vectors
Definition: node.h:344
#define CLIB_PREFETCH(addr, size, type)
Definition: cache.h:82
vlib_main_t * vm
Definition: buffer.c:283
syn_filter_next_t
vnet_feature_arc_registration_t vnet_feat_arc_ip4_local
#define VLIB_BUFFER_IS_TRACED
Definition: buffer.h:93
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
Definition: pool.h:268
#define ARRAY_LEN(x)
Definition: clib.h:59
void vlib_put_next_frame(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, u32 n_vectors_left)
Release pointer to next frame vector data.
Definition: main.c:454
#define VLIB_CLI_COMMAND(x,...)
Definition: cli.h:154
u16 cached_next_index
Next frame index that vector arguments were last enqueued to last time this node ran.
Definition: node.h:456
syn_filter_error_t
unsigned int u32
Definition: types.h:88
VNET_FEATURE_INIT(syn_filter_4, static)
#define VLIB_NODE_FLAG_TRACE
Definition: node.h:259
#define VNET_FEATURES(...)
Definition: feature.h:368
u64 uword
Definition: types.h:112
#define foreach_syn_filter_error
static void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
Definition: trace_funcs.h:55
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
double f64
Definition: types.h:142
unsigned char u8
Definition: types.h:56
vnet_sw_interface_t * sw_interfaces
Definition: interface.h:663
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
Definition: node_funcs.h:267
VLIB_NODE_FUNCTION_MULTIARCH(syn_filter4_node, syn_filter4_node_fn)
struct _vnet_feature_arc_registration vnet_feature_arc_registration_t
feature registration object
#define VLIB_REGISTER_NODE(x,...)
Definition: node.h:143
vnet_sw_interface_type_t type
Definition: interface.h:571
u8 data[0]
Packet data.
Definition: buffer.h:159
static char * syn_filter4_error_strings[]
u16 flags
Copy of main node flags.
Definition: node.h:450
vnet_feature_config_main_t * feature_config_mains
feature config main objects
Definition: feature.h:81
#define CLIB_CACHE_LINE_BYTES
Definition: cache.h:67
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
Definition: buffer.h:75
vnet_feature_main_t feature_main
Definition: feature.c:19
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
Definition: buffer_funcs.h:57
uword unformat(unformat_input_t *i, const char *fmt,...)
Definition: unformat.c:972
int vnet_feature_enable_disable(const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)
Definition: feature.c:229
static uword unformat_check_input(unformat_input_t *i)
Definition: format.h:169
static clib_error_t * syn_filter_enable_disable_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)