aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/l2tp/l2tp_api.c
blob: 6b48c140c71c23cbb0b5678a87fc734ea5de044f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
/*
 *------------------------------------------------------------------
 * l2tp_api.c - l2tpv3 api
 *
 * Copyright (c) 2016 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *------------------------------------------------------------------
 */

#include <vnet/vnet.h>
#include <vlibmemory/api.h>

#include <vnet/interface.h>
#include <vnet/api_errno.h>
#include <vnet/l2tp/l2tp.h>

#include <vnet/vnet_msg_enum.h>

#define vl_typedefs		/* define message structures */
#include <vnet/vnet_all_api_h.h>
#undef vl_typedefs

#define vl_endianfun		/* define message structures */
#include <vnet/vnet_all_api_h.h>
#undef vl_endianfun

/* instantiate all the print functions we know about */
#define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
#define vl_printfun
#include <vnet/vnet_all_api_h.h>
#undef vl_printfun

#include <vlibapi/api_helper_macros.h>

#define foreach_vpe_api_msg                             \
_(L2TPV3_CREATE_TUNNEL, l2tpv3_create_tunnel)                           \
_(L2TPV3_SET_TUNNEL_COOKIES, l2tpv3_set_tunnel_cookies)                 \
_(L2TPV3_INTERFACE_ENABLE_DISABLE, l2tpv3_interface_enable_disable)     \
_(L2TPV3_SET_LOOKUP_KEY, l2tpv3_set_lookup_key)                         \
_(SW_IF_L2TPV3_TUNNEL_DUMP, sw_if_l2tpv3_tunnel_dump)

static void
send_sw_if_l2tpv3_tunnel_details (vpe_api_main_t * am,
				  vl_api_registration_t * reg,
				  l2t_session_t * s,
				  l2t_main_t * lm, u32 context)
{
  vl_api_sw_if_l2tpv3_tunnel_details_t *mp;
  u8 *if_name = NULL;
  vnet_sw_interface_t *si = NULL;

  si = vnet_get_hw_sw_interface (lm->vnet_main, s->hw_if_index);

  if_name = format (if_name, "%U",
		    format_vnet_sw_interface_name, lm->vnet_main, si);

  mp = vl_msg_api_alloc (sizeof (*mp));
  clib_memset (mp, 0, sizeof (*mp));
  mp->_vl_msg_id = ntohs (VL_API_SW_IF_L2TPV3_TUNNEL_DETAILS);
  strncpy ((char *) mp->interface_name,
	   (char *) if_name, ARRAY_LEN (mp->interface_name) - 1);
  mp->sw_if_index = ntohl (si->sw_if_index);
  mp->local_session_id = s->local_session_id;
  mp->remote_session_id = s->remote_session_id;
  mp->local_cookie[0] = s->local_cookie[0];
  mp->local_cookie[1] = s->local_cookie[1];
  mp->remote_cookie = s->remote_cookie;
  clib_memcpy (mp->client_address, &s->client_address,
	       sizeof (s->client_address));
  clib_memcpy (mp->our_address, &s->our_address, sizeof (s->our_address));
  mp->l2_sublayer_present = s->l2_sublayer_present;
  mp->context = context;

  vl_api_send_msg (reg, (u8 *) mp);
}


static void
vl_api_sw_if_l2tpv3_tunnel_dump_t_handler (vl_api_sw_if_l2tpv3_tunnel_dump_t *
					   mp)
{
  vpe_api_main_t *am = &vpe_api_main;
  l2t_main_t *lm = &l2t_main;
  vl_api_registration_t *reg;
  l2t_session_t *session;

  reg = vl_api_client_index_to_registration (mp->client_index);
  if (!reg)
    return;

  /* *INDENT-OFF* */
  pool_foreach (session, lm->sessions,
  ({
    send_sw_if_l2tpv3_tunnel_details (am, reg, session, lm, mp->context);
  }));
  /* *INDENT-ON* */
}

static void vl_api_l2tpv3_create_tunnel_t_handler
  (vl_api_l2tpv3_create_tunnel_t * mp)
{
  vl_api_l2tpv3_create_tunnel_reply_t *rmp;
  l2t_main_t *lm = &l2t_main;
  u32 sw_if_index = (u32) ~ 0;
  int rv;

  if (mp->is_ipv6 != 1)
    {
      rv = VNET_API_ERROR_UNIMPLEMENTED;
      goto out;
    }

  u32 encap_fib_index;

  if (mp->encap_vrf_id != ~0)
    {
      uword *p;
      ip6_main_t *im = &ip6_main;
      if (!
	  (p =
	   hash_get (im->fib_index_by_table_id, ntohl (mp->encap_vrf_id))))
	{
	  rv = VNET_API_ERROR_NO_SUCH_FIB;
	  goto out;
	}
      encap_fib_index = p[0];
    }
  else
    {
      encap_fib_index = ~0;
    }

  rv = create_l2tpv3_ipv6_tunnel (lm,
				  (ip6_address_t *) mp->client_address,
				  (ip6_address_t *) mp->our_address,
				  ntohl (mp->local_session_id),
				  ntohl (mp->remote_session_id),
				  clib_net_to_host_u64 (mp->local_cookie),
				  clib_net_to_host_u64 (mp->remote_cookie),
				  mp->l2_sublayer_present,
				  encap_fib_index, &sw_if_index);

out:
  /* *INDENT-OFF* */
  REPLY_MACRO2(VL_API_L2TPV3_CREATE_TUNNEL_REPLY,
  ({
    rmp->sw_if_index = ntohl (sw_if_index);
  }));
  /* *INDENT-ON* */
}

static void vl_api_l2tpv3_set_tunnel_cookies_t_handler
  (vl_api_l2tpv3_set_tunnel_cookies_t * mp)
{
  vl_api_l2tpv3_set_tunnel_cookies_reply_t *rmp;
  l2t_main_t *lm = &l2t_main;
  int rv;

  VALIDATE_SW_IF_INDEX (mp);

  rv = l2tpv3_set_tunnel_cookies (lm, ntohl (mp->sw_if_index),
				  clib_net_to_host_u64 (mp->new_local_cookie),
				  clib_net_to_host_u64
				  (mp->new_remote_cookie));

  BAD_SW_IF_INDEX_LABEL;

  REPLY_MACRO (VL_API_L2TPV3_SET_TUNNEL_COOKIES_REPLY);
}

static void vl_api_l2tpv3_interface_enable_disable_t_handler
  (vl_api_l2tpv3_interface_enable_disable_t * mp)
{
  int rv;
  vnet_main_t *vnm = vnet_get_main ();
  vl_api_l2tpv3_interface_enable_disable_reply_t *rmp;

  VALIDATE_SW_IF_INDEX (mp);

  rv = l2tpv3_interface_enable_disable
    (vnm, ntohl (mp->sw_if_index), mp->enable_disable);

  BAD_SW_IF_INDEX_LABEL;

  REPLY_MACRO (VL_API_L2TPV3_INTERFACE_ENABLE_DISABLE_REPLY);
}

static void vl_api_l2tpv3_set_lookup_key_t_handler
  (vl_api_l2tpv3_set_lookup_key_t * mp)
{
  int rv = 0;
  l2t_main_t *lm = &l2t_main;
  vl_api_l2tpv3_set_lookup_key_reply_t *rmp;

  if (mp->key > L2T_LOOKUP_SESSION_ID)
    {
      rv = VNET_API_ERROR_INVALID_VALUE;
      goto out;
    }

  lm->lookup_type = mp->key;

out:
  REPLY_MACRO (VL_API_L2TPV3_SET_LOOKUP_KEY_REPLY);
}

/*
 * l2tp_api_hookup
 * Add vpe's API message handlers to the table.
 * vlib has already mapped shared memory and
 * added the client registration handlers.
 * See .../vlib-api/vlibmemory/memclnt_vlib.c:memclnt_process()
 */
#define vl_msg_name_crc_list
#include <vnet/vnet_all_api_h.h>
#undef vl_msg_name_crc_list

static void
setup_message_id_table (api_main_t * am)
{
#define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id);
  foreach_vl_msg_name_crc_l2tp;
#undef _
}

static clib_error_t *
l2tp_api_hookup (vlib_main_t * vm)
{
  api_main_t *am = &api_main;

#define _(N,n)                                                  \
    vl_msg_api_set_handlers(VL_API_##N, #n,                     \
                           vl_api_##n##_t_handler,              \
                           vl_noop_handler,                     \
                           vl_api_##n##_t_endian,               \
                           vl_api_##n##_t_print,                \
                           sizeof(vl_api_##n##_t), 1);
  foreach_vpe_api_msg;
#undef _

  /*
   * Set up the (msg_name, crc, message-id) table
   */
  setup_message_id_table (am);

  return 0;
}

VLIB_API_INIT_FUNCTION (l2tp_api_hookup);

/*
 * fd.io coding-style-patch-verification: ON
 *
 * Local Variables:
 * eval: (c-set-style "gnu")
 * End:
 */
s="p">, default_route-> sw_if_index); fib_prefix_t pfx = { .fp_proto = FIB_PROTOCOL_IP6, }; ip46_address_t nh = { .ip6 = default_route->router_address, }; fib_table_entry_update_one_path (fib_index, &pfx, FIB_SOURCE_API, FIB_ENTRY_FLAG_NONE, DPO_PROTO_IP6, &nh, default_route->sw_if_index, 0, 1, NULL, FIB_ROUTE_PATH_FLAG_NONE); } } static int remove_slaac_address (vlib_main_t * vm, slaac_address_t * slaac_address) { rd_cp_main_t *rm = &rd_cp_main; clib_error_t *rv = 0; rv = ip6_add_del_interface_address (vm, slaac_address->sw_if_index, &slaac_address->address, slaac_address->address_length, 1); pool_put (rm->slaac_address_pool, slaac_address); return rv != 0; } static void remove_default_route (vlib_main_t * vm, default_route_t * default_route) { rd_cp_main_t *rm = &rd_cp_main; { u32 fib_index = fib_table_get_index_for_sw_if_index (FIB_PROTOCOL_IP6, default_route-> sw_if_index); fib_prefix_t pfx = { .fp_proto = FIB_PROTOCOL_IP6, }; ip46_address_t nh = { .ip6 = default_route->router_address, }; fib_table_entry_path_remove (fib_index, &pfx, FIB_SOURCE_API, DPO_PROTO_IP6, &nh, default_route->sw_if_index, 0, 1, FIB_ROUTE_PATH_FLAG_NONE); } pool_put (rm->default_route_pool, default_route); } static u32 get_interface_mac_address (u32 sw_if_index, u8 mac[]) { rd_cp_main_t *rm = &rd_cp_main; vnet_sw_interface_t *si; ethernet_interface_t *eth_if = 0; if (!vnet_sw_interface_is_api_valid (rm->vnet_main, sw_if_index)) { vlib_log_warn (rm->log_class, "Invalid sw_if_index"); return 1; } si = vnet_get_sup_sw_interface (rm->vnet_main, sw_if_index); if (si->type == VNET_SW_INTERFACE_TYPE_HARDWARE) eth_if = ethernet_get_interface (&ethernet_main, si->hw_if_index); if (!eth_if) { vlib_log_warn (rm->log_class, "Failed to get hardware interface"); return 1; } clib_memcpy_fast (mac, eth_if->address, 6); return 0; } static u32 ip6_enable (u32 sw_if_index) { rd_cp_main_t *rm = &rd_cp_main; clib_error_t *rv; rv = enable_ip6_interface (rm->vlib_main, sw_if_index); return rv != 0; } static u8 ip6_prefixes_equal (ip6_address_t * prefix1, ip6_address_t * prefix2, u8 len) { if (len >= 64) { if (prefix1->as_u64[0] != prefix2->as_u64[0]) return 0; if (len == 64) return 1; return prefix1->as_u64[1] >> (128 - len) == prefix2->as_u64[1] >> (128 - len); } return prefix1->as_u64[0] >> (64 - len) == prefix2->as_u64[0] >> (64 - len); } #define PREFIX_FLAG_A (1 << 6) #define PREFIX_FLAG_L (1 << 7) static clib_error_t * ip6_ra_report_handler (void *data) { rd_cp_main_t *rm = &rd_cp_main; vlib_main_t *vm = rm->vlib_main; clib_error_t *error = 0; ra_report_t *r = data; interface_config_t *if_config; default_route_t *default_route; slaac_address_t *slaac_address; u32 sw_if_index; u16 router_lifetime_in_sec; u32 n_prefixes; ra_report_prefix_info_t *prefix; u8 mac[6]; f64 current_time; u32 i; current_time = vlib_time_now (vm); sw_if_index = r->sw_if_index; if (sw_if_index >= vec_len (rm->config_by_sw_if_index)) return 0; if_config = &rm->config_by_sw_if_index[sw_if_index]; if (if_config->install_default_routes) { router_lifetime_in_sec = r->router_lifetime_in_sec; u8 route_already_present = 0; /* *INDENT-OFF* */ pool_foreach (default_route, rm->default_route_pool, ({ if (default_route->sw_if_index != sw_if_index) ; else if (0 != memcmp (&default_route->router_address, &r->router_address, 16)) ; else { route_already_present = 1; goto default_route_pool_foreach_out; } })); /* *INDENT-ON* */ default_route_pool_foreach_out: if (!route_already_present) { if (router_lifetime_in_sec != 0) add_default_route (vm, sw_if_index, &r->router_address, current_time + router_lifetime_in_sec); } else { if (router_lifetime_in_sec != 0) default_route->due_time = current_time + router_lifetime_in_sec; else remove_default_route (vm, default_route); } } if (get_interface_mac_address (sw_if_index, mac) != 0) { vlib_log_warn (rm->log_class, "Error getting MAC address"); return clib_error_return (0, "Error getting MAC address"); } if (!if_config->enabled) return 0; n_prefixes = vec_len (r->prefixes); for (i = 0; i < n_prefixes; i++) { ip6_address_t *dst_address; u8 prefix_length; u32 valid_time; u32 preferred_time; f64 due_time; prefix = &r->prefixes[i]; if (!(prefix->flags & PREFIX_FLAG_A)) continue; dst_address = &prefix->prefix.fp_addr.ip6; prefix_length = prefix->prefix.fp_len; if (ip6_address_is_link_local_unicast (dst_address)) continue; valid_time = prefix->valid_time; preferred_time = prefix->preferred_time; if (preferred_time > valid_time) continue; if (prefix_length != 64) continue; u8 address_already_present = 0; /* *INDENT-OFF* */ pool_foreach (slaac_address, rm->slaac_address_pool, ({ if (slaac_address->sw_if_index != sw_if_index) ; else if (slaac_address->address_length != prefix_length) ; else if (!ip6_prefixes_equal (&slaac_address->address, dst_address, prefix_length)) ; else { address_already_present = 1; goto slaac_address_pool_foreach_out; } })); /* *INDENT-ON* */ slaac_address_pool_foreach_out: if (address_already_present) { f64 remaining_life_time = slaac_address->due_time - current_time; if (valid_time > 2 * 60 * 60 || valid_time > remaining_life_time) slaac_address->due_time = current_time + valid_time; else if (remaining_life_time > 2 * 60 * 60) slaac_address->due_time = current_time + 2 * 60 * 60; continue; } if (valid_time == 0) continue; due_time = current_time + valid_time; ip6_address_t addr; addr.as_u64[0] = dst_address->as_u64[0]; /* Invert the "u" bit */ addr.as_u8[8] = mac[0] ^ (1 << 1); addr.as_u8[9] = mac[1]; addr.as_u8[10] = mac[2]; addr.as_u8[11] = 0xFF; addr.as_u8[12] = 0xFE; addr.as_u8[13] = mac[3]; addr.as_u8[14] = mac[4]; addr.as_u8[15] = mac[5]; add_slaac_address (vm, sw_if_index, prefix_length, &addr, due_time); } interrupt_process (); return error; } VNET_IP6_NEIGHBOR_RA_FUNCTION (ip6_ra_report_handler); static uword rd_cp_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) { uword *event_data = 0; rd_cp_main_t *rm = &rd_cp_main; slaac_address_t *slaac_address; default_route_t *default_route; f64 sleep_time = 1e9; f64 current_time; f64 due_time; while (1) { vlib_process_wait_for_event_or_clock (vm, sleep_time); vlib_process_get_events (vm, &event_data); vec_reset_length (event_data); current_time = vlib_time_now (vm); do { due_time = current_time + 1e9; /* *INDENT-OFF* */ pool_foreach (slaac_address, rm->slaac_address_pool, ({ if (slaac_address->due_time > current_time) { if (slaac_address->due_time < due_time) due_time = slaac_address->due_time; } else { remove_slaac_address (vm, slaac_address); /* make sure ip6 stays enabled */ ip6_enable (slaac_address->sw_if_index); } })); pool_foreach (default_route, rm->default_route_pool, ({ if (default_route->due_time > current_time) { if (default_route->due_time < due_time) due_time = default_route->due_time; } else remove_default_route (vm, default_route); })); /* *INDENT-ON* */ current_time = vlib_time_now (vm); } while (due_time < current_time); sleep_time = due_time - current_time; } return 0; } /* *INDENT-OFF* */ VLIB_REGISTER_NODE (rd_cp_process_node) = { .function = rd_cp_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "rd-cp-process", }; /* *INDENT-ON* */ static void interrupt_process (void) { rd_cp_main_t *rm = &rd_cp_main; vlib_main_t *vm = rm->vlib_main; vlib_process_signal_event (vm, rd_cp_process_node.index, RD_CP_EVENT_INTERRUPT, 0); } static int set_address_autoconfig (u32 sw_if_index, u8 enable, u8 install_default_routes) { rd_cp_main_t *rm = &rd_cp_main; vlib_main_t *vm = rm->vlib_main; vnet_main_t *vnm = rm->vnet_main; interface_config_t *if_config; interface_config_t empty_config = { 0, 0 }; slaac_address_t *slaac_address; default_route_t *default_route; if (!enable) install_default_routes = 0; if (!vnet_sw_interface_is_api_valid (vnm, sw_if_index)) { vlib_log_warn (rm->log_class, "Invalid sw_if_index"); return 1; } if (!rm->enabled) { /* process kickoff */ interrupt_process (); rm->enabled = 1; } vec_validate_init_empty (rm->config_by_sw_if_index, sw_if_index, empty_config); if_config = &rm->config_by_sw_if_index[sw_if_index]; if (!if_config->enabled && enable) ip6_enable (sw_if_index); if ((!if_config->enabled && enable) || (!if_config->install_default_routes && install_default_routes)) router_solicitation_start_stop (sw_if_index, 1); else if (if_config->enabled && !enable) router_solicitation_start_stop (sw_if_index, 0); if (if_config->enabled && !enable) { /* *INDENT-OFF* */ pool_foreach (slaac_address, rm->slaac_address_pool, ({ remove_slaac_address (vm, slaac_address); })); /* *INDENT-ON* */ } if (if_config->install_default_routes && !install_default_routes) { /* *INDENT-OFF* */ pool_foreach (default_route, rm->default_route_pool, ({ remove_default_route (vm, default_route); })); /* *INDENT-ON* */ } if_config->enabled = enable; if_config->install_default_routes = install_default_routes; return 0; } static clib_error_t * ip6_nd_address_autoconfig (vlib_main_t * vm, unformat_input_t * input, vlib_cli_command_t * cmd) { rd_cp_main_t *rm = &rd_cp_main; vnet_main_t *vnm = rm->vnet_main; clib_error_t *error = 0; u32 sw_if_index = ~0; u8 enable = 1; u8 default_route = 0; while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) { if (unformat (input, "%U", unformat_vnet_sw_interface, vnm, &sw_if_index)) ; if (unformat (input, "default-route")) default_route = 1; if (unformat (input, "disable")) enable = 0; else break; } if (sw_if_index != ~0) { if (set_address_autoconfig (sw_if_index, enable, default_route) != 0) error = clib_error_return (0, "Invalid sw_if_index"); } else error = clib_error_return (0, "Missing sw_if_index"); return error; } /*? * This command is used to enable ND address autoconfiguration * on particular interface including setting up default routes. * * @cliexpar * @parblock * Example of how to enable ND address autoconfiguration: * @cliexcmd{ip6 nd address autoconfig GigabitEthernet2/0/0} * Example of how to enable ND address autoconfiguration * with setting up default routes: * @cliexcmd{ip6 nd address autoconfig GigabitEthernet2/0/0 default-route} * Example of how to disable ND address autoconfiguration: * @cliexcmd{ip6 nd address autoconfig GigabitEthernet2/0/0 disable} * @endparblock ?*/ /* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip6_nd_address_autoconfig_command, static) = { .path = "ip6 nd address autoconfig", .short_help = "ip6 nd address autoconfig <interface> [default-route|disable]", .function = ip6_nd_address_autoconfig, }; /* *INDENT-ON* */ static void vl_api_ip6_nd_address_autoconfig_t_handler (vl_api_ip6_nd_address_autoconfig_t * mp) { vl_api_ip6_nd_address_autoconfig_reply_t *rmp; u32 sw_if_index; int rv = 0; VALIDATE_SW_IF_INDEX (mp); sw_if_index = ntohl (mp->sw_if_index); rv = set_address_autoconfig (sw_if_index, mp->enable, mp->install_default_routes); BAD_SW_IF_INDEX_LABEL; REPLY_MACRO (VL_API_SW_INTERFACE_SET_TABLE_REPLY); } #define vl_msg_name_crc_list #include <vnet/ip/rd_cp.api.h> #undef vl_msg_name_crc_list static void setup_message_id_table (api_main_t * am) { #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); foreach_vl_msg_name_crc_rd_cp; #undef _ } static clib_error_t * rd_cp_init (vlib_main_t * vm) { rd_cp_main_t *rm = &rd_cp_main; api_main_t *am = &api_main; rm->vlib_main = vm; rm->vnet_main = vnet_get_main (); rm->api_main = am; rm->node_index = rd_cp_process_node.index; rm->log_class = vlib_log_register_class ("rd_cp", 0); #define _(N,n) \ vl_msg_api_set_handlers(VL_API_##N, #n, \ vl_api_##n##_t_handler, \ vl_noop_handler, \ vl_api_##n##_t_endian, \ vl_api_##n##_t_print, \ sizeof(vl_api_##n##_t), 0/* do NOT trace! */); foreach_rd_cp_msg; #undef _ /* * Set up the (msg_name, crc, message-id) table */ setup_message_id_table (am); return 0; } VLIB_INIT_FUNCTION (rd_cp_init); /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */