OpenVPN
test_push_update_msg.c
Go to the documentation of this file.
1#ifdef HAVE_CONFIG_H
2#include "config.h"
3#endif
4
5#include <stdlib.h>
6#include <stdarg.h>
7#include <setjmp.h>
8#include <cmocka.h>
9#include "push.h"
10#include "options_util.h"
11#include "multi.h"
12
13#include "push_util.c"
14
15/* mocks */
16
17void
18throw_signal_soft(const int signum, const char *signal_text)
19{
20 msg(M_WARN, "Offending option received from server");
21}
22
23unsigned int
32
33void
35{
36 return;
37}
38
39void
41{
42 return;
43}
44
45void
46update_vhash(struct multi_context *m, struct multi_instance *mi, const char *new_ip, const char *new_ipv6)
47{
48 return;
49}
50
51bool
53{
54 return true;
55}
56
57bool
58apply_push_options(struct context *c, struct options *options, struct buffer *buf,
59 unsigned int permission_mask, unsigned int *option_types_found,
60 struct env_set *es, bool is_update)
61{
62 char line[OPTION_PARM_SIZE];
63
64 while (buf_parse(buf, ',', line, sizeof(line)))
65 {
66 unsigned int push_update_option_flags = 0;
67 int i = 0;
68
69 if (is_update || options->pull_filter_list)
70 {
71 /* skip leading spaces matching the behaviour of parse_line */
72 while (isspace(line[i]))
73 {
74 i++;
75 }
76
77 if ((is_update && !check_push_update_option_flags(line, &i, &push_update_option_flags))
79 {
80 if (push_update_option_flags & PUSH_OPT_OPTIONAL)
81 {
82 continue; /* Ignoring this option */
83 }
84 return false; /* Cause push/pull error and stop push processing */
85 }
86 }
87 /*
88 * No need to test also the application part here
89 * (add_option/remove_option/update_option)
90 */
91 }
92 return true;
93}
94
95int
97 bool honor_received_options, unsigned int permission_mask,
98 unsigned int *option_types_found)
99{
100 struct buffer buf = *buffer;
101
102 if (buf_string_compare_advance(&buf, "PUSH_REQUEST"))
103 {
104 return PUSH_MSG_REQUEST;
105 }
107 {
108 return PUSH_MSG_REPLY;
109 }
111 {
112 return process_push_update(c, &c->options, permission_mask, option_types_found, &buf, false);
113 }
114 else
115 {
116 return PUSH_MSG_ERROR;
117 }
118}
119
120const char *
121tls_common_name(const struct tls_multi *multi, const bool null)
122{
123 return NULL;
124}
125
126#ifndef ENABLE_MANAGEMENT
127bool
128send_control_channel_string(struct context *c, const char *str, msglvl_t msglevel)
129{
130 return true;
131}
132#else /* ifndef ENABLE_MANAGEMENT */
133char **res;
134int i;
135
136bool
137send_control_channel_string(struct context *c, const char *str, msglvl_t msglevel)
138{
139 if (res && res[i] && strcmp(res[i], str))
140 {
141 printf("\n\nexpected: %s\n\n actual: %s\n\n", res[i], str);
142 return false;
143 }
144 i++;
145 return true;
146}
147
148struct multi_instance *
149lookup_by_cid(struct multi_context *m, const unsigned long cid)
150{
151 return *(m->instances);
152}
153
154bool
156 const struct openvpn_sockaddr *osaddr,
157 bool use_port)
158{
159 return true;
160}
161
162unsigned int
163extract_iv_proto(const char *peer_info)
164{
166}
167#endif /* ifdef ENABLE_MANAGEMENT */
168
169/* tests */
170
171static void
173{
174 struct context *c = *state;
175 struct buffer buf = alloc_buf(256);
176 const char *update_msg =
177 "PUSH_UPDATE,dhcp-option DNS 8.8.8.8, route 0.0.0.0 0.0.0.0 10.10.10.1";
179 unsigned int option_types_found = 0;
180
182 &option_types_found),
184
185 free_buf(&buf);
186}
187
188static void
190{
191 struct context *c = *state;
192 struct buffer buf = alloc_buf(256);
193 const char *update_msg = "PUSH_UPDATEerr,dhcp-option DNS 8.8.8.8";
195 unsigned int option_types_found = 0;
196
198 &option_types_found),
200
201 free_buf(&buf);
202}
203
204static void
206{
207 struct context *c = *state;
208 struct buffer buf = alloc_buf(256);
209 const char *update_msg = "PUSH_UPDATE ,dhcp-option DNS 8.8.8.8";
211 unsigned int option_types_found = 0;
212
214 &option_types_found),
216
217 free_buf(&buf);
218}
219
220static void
222{
223 struct context *c = *state;
224 struct buffer buf = alloc_buf(256);
225 const char *update_msg = "PUSH_UPDATE, -?dns, route something, ?dhcp-option DNS 8.8.8.8";
227 unsigned int option_types_found = 0;
228
230 &option_types_found),
232
233 free_buf(&buf);
234}
235
236static void
238{
239 struct context *c = *state;
240 struct buffer buf = alloc_buf(256);
241 const char *update_msg = "PUSH_UPDATE, -dhcp-option, ?-dns";
243 unsigned int option_types_found = 0;
244
246 &option_types_found),
248
249 free_buf(&buf);
250}
251
252static void
254{
255 struct context *c = *state;
256 struct buffer buf = alloc_buf(256);
257 const char *update_msg = "PUSH_UPDATE, dev tun";
259 unsigned int option_types_found = 0;
260
262 &option_types_found),
264
265 free_buf(&buf);
266}
267
268static void
270{
271 struct context *c = *state;
272 struct buffer buf = alloc_buf(256);
273 const char *update_msg =
274 "PUSH_UPDATE,-dhcp-option, route 10.10.10.0, dhcp-option DNS 1.1.1.1, route 10.11.12.0, dhcp-option DOMAIN corp.local, keepalive 10 60";
276 unsigned int option_types_found = 0;
277
279 &option_types_found),
281
282 free_buf(&buf);
283}
284
285static void
287{
288 struct context *c = *state;
289 struct buffer buf = alloc_buf(256);
290 const char *update_msg =
291 "PUSH_UPDATE,-dhcp-option,dhcp-option DNS 8.8.8.8,redirect-gateway local,route 192.168.1.0 255.255.255.0";
293 unsigned int option_types_found = 0;
294
296 &option_types_found),
298
299 free_buf(&buf);
300}
301
302#ifdef ENABLE_MANAGEMENT
303char *r0[] = {
304 "PUSH_UPDATE,redirect-gateway local,route 192.168.1.0 255.255.255.0"
305};
306char *r1[] = {
307 "PUSH_UPDATE,-dhcp-option,blablalalalalalalalalalalalalf, lalalalalalalalalalalalalalaf,push-continuation 2",
308 "PUSH_UPDATE, akakakakakakakakakakakaf, dhcp-option DNS 8.8.8.8,redirect-gateway local,push-continuation 2",
309 "PUSH_UPDATE,route 192.168.1.0 255.255.255.0,push-continuation 1"
310};
311char *r3[] = {
312 "PUSH_UPDATE,,,"
313};
314char *r4[] = {
315 "PUSH_UPDATE,-dhcp-option, blablalalalalalalalalalalalalf, lalalalalalalalalalalalalalaf,push-continuation 2",
316 "PUSH_UPDATE, akakakakakakakakakakakaf,dhcp-option DNS 8.8.8.8, redirect-gateway local,push-continuation 2",
317 "PUSH_UPDATE, route 192.168.1.0 255.255.255.0,,push-continuation 1"
318};
319char *r5[] = {
320 "PUSH_UPDATE,,-dhcp-option, blablalalalalalalalalalalalalf, lalalalalalalalalalalalalalaf,push-continuation 2",
321 "PUSH_UPDATE, akakakakakakakakakakakaf,dhcp-option DNS 8.8.8.8, redirect-gateway local,push-continuation 2",
322 "PUSH_UPDATE, route 192.168.1.0 255.255.255.0,push-continuation 1"
323};
324char *r6[] = {
325 "PUSH_UPDATE,-dhcp-option,blablalalalalalalalalalalalalf, lalalalalalalalalalalalalalaf,push-continuation 2",
326 "PUSH_UPDATE, akakakakakakakakakakakaf, dhcp-option DNS 8.8.8.8, redirect-gateway 10.10.10.10,,push-continuation 2",
327 "PUSH_UPDATE, route 192.168.1.0 255.255.255.0,,push-continuation 1"
328};
329char *r7[] = {
330 "PUSH_UPDATE,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,push-continuation 2",
331 "PUSH_UPDATE,,,,,,,,,,,,,,,,,,,push-continuation 1"
332};
333char *r8[] = {
334 "PUSH_UPDATE,-dhcp-option,blablalalalalalalalalalalalalf, lalalalalalalalalalalalalalaf,push-continuation 2",
335 "PUSH_UPDATE, akakakakakakakakakakakaf, dhcp-option DNS 8.8.8.8,redirect-gateway\n local,push-continuation 2",
336 "PUSH_UPDATE,route 192.168.1.0 255.255.255.0\n\n\n,push-continuation 1"
337};
338char *r9[] = {
339 "PUSH_UPDATE,,"
340};
341
342
343const char *msg0 = "redirect-gateway local,route 192.168.1.0 255.255.255.0";
344const char *msg1 = "-dhcp-option,blablalalalalalalalalalalalalf, lalalalalalalalalalalalalalaf,"
345 " akakakakakakakakakakakaf, dhcp-option DNS 8.8.8.8,redirect-gateway local,route 192.168.1.0 255.255.255.0";
346const char *msg2 = "";
347const char *msg3 = ",,";
348const char *msg4 = "-dhcp-option, blablalalalalalalalalalalalalf, lalalalalalalalalalalalalalaf,"
349 " akakakakakakakakakakakaf,dhcp-option DNS 8.8.8.8, redirect-gateway local, route 192.168.1.0 255.255.255.0,";
350const char *msg5 = ",-dhcp-option, blablalalalalalalalalalalalalf, lalalalalalalalalalalalalalaf,"
351 " akakakakakakakakakakakaf,dhcp-option DNS 8.8.8.8, redirect-gateway local, route 192.168.1.0 255.255.255.0";
352const char *msg6 = "-dhcp-option,blablalalalalalalalalalalalalf, lalalalalalalalalalalalalalaf, akakakakakakakakakakakaf,"
353 " dhcp-option DNS 8.8.8.8, redirect-gateway 10.10.10.10,, route 192.168.1.0 255.255.255.0,";
354const char *msg7 = ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,";
355const char *msg8 = "-dhcp-option,blablalalalalalalalalalalalalf, lalalalalalalalalalalalalalaf, akakakakakakakakakakakaf,"
356 " dhcp-option DNS 8.8.8.8,redirect-gateway\n local,route 192.168.1.0 255.255.255.0\n\n\n";
357const char *msg9 = ",";
358
359const char *msg10 = "abandon ability able about above absent absorb abstract absurd abuse access accident account accuse achieve"
360 "acid acoustic acquire across act action actor actress actual adapt add addict address adjust"
361 "baby bachelor bacon badge bag balance balcony ball bamboo banana banner bar barely bargain barrel base basic"
362 "basket battle beach bean beauty because become beef before begin behave behind"
363 "cabbage cabin cable cactus cage cake call calm camera camp can canal cancel candy cannon canoe canvas canyon"
364 "capable capital captain car carbon card cargo carpet carry cart case"
365 "daisy damage damp dance danger daring dash daughter dawn day deal debate debris decade december decide decline"
366 "decorate decrease deer defense define defy degree delay deliver demand demise denial";
367
368#define PUSH_BUNDLE_SIZE_TEST 184
369
370static void
372{
373 i = 0;
374 res = r0;
375 struct multi_context *m = *state;
376 const unsigned long cid = 0;
377 assert_int_equal(send_push_update(m, &cid, msg0, UPT_BY_CID, PUSH_BUNDLE_SIZE_TEST), 1);
378}
379static void
381{
382 i = 0;
383 res = r1;
384 struct multi_context *m = *state;
385 const unsigned long cid = 0;
386 assert_int_equal(send_push_update(m, &cid, msg1, UPT_BY_CID, PUSH_BUNDLE_SIZE_TEST), 1);
387}
388
389static void
391{
392 i = 0;
393 res = NULL;
394 struct multi_context *m = *state;
395 const unsigned long cid = 0;
396 assert_int_equal(send_push_update(m, &cid, msg2, UPT_BY_CID, PUSH_BUNDLE_SIZE_TEST), -EINVAL);
397}
398
399static void
401{
402 i = 0;
403 res = r3;
404 struct multi_context *m = *state;
405 const unsigned long cid = 0;
406 assert_int_equal(send_push_update(m, &cid, msg3, UPT_BY_CID, PUSH_BUNDLE_SIZE_TEST), 1);
407}
408
409static void
411{
412 i = 0;
413 res = r4;
414 struct multi_context *m = *state;
415 const unsigned long cid = 0;
416 assert_int_equal(send_push_update(m, &cid, msg4, UPT_BY_CID, PUSH_BUNDLE_SIZE_TEST), 1);
417}
418
419static void
421{
422 i = 0;
423 res = r5;
424 struct multi_context *m = *state;
425 const unsigned long cid = 0;
426 assert_int_equal(send_push_update(m, &cid, msg5, UPT_BY_CID, PUSH_BUNDLE_SIZE_TEST), 1);
427}
428
429static void
431{
432 i = 0;
433 res = r6;
434 struct multi_context *m = *state;
435 const unsigned long cid = 0;
436 assert_int_equal(send_push_update(m, &cid, msg6, UPT_BY_CID, PUSH_BUNDLE_SIZE_TEST), 1);
437}
438
439static void
441{
442 i = 0;
443 res = r7;
444 struct multi_context *m = *state;
445 const unsigned long cid = 0;
446 assert_int_equal(send_push_update(m, &cid, msg7, UPT_BY_CID, PUSH_BUNDLE_SIZE_TEST), 1);
447}
448
449static void
451{
452 i = 0;
453 res = r8;
454 struct multi_context *m = *state;
455 const unsigned long cid = 0;
456 assert_int_equal(send_push_update(m, &cid, msg8, UPT_BY_CID, PUSH_BUNDLE_SIZE_TEST), 1);
457}
458
459static void
461{
462 i = 0;
463 res = r9;
464 struct multi_context *m = *state;
465 const unsigned long cid = 0;
466 assert_int_equal(send_push_update(m, &cid, msg9, UPT_BY_CID, PUSH_BUNDLE_SIZE_TEST), 1);
467}
468
469static void
471{
472 i = 0;
473 res = NULL;
474 struct multi_context *m = *state;
475 const unsigned long cid = 0;
476 assert_int_equal(send_push_update(m, &cid, msg10, UPT_BY_CID, PUSH_BUNDLE_SIZE_TEST), -EINVAL);
477}
478
479#undef PUSH_BUNDLE_SIZE_TEST
480
481static int
482setup2(void **state)
483{
484 struct multi_context *m = calloc(1, sizeof(struct multi_context));
485 m->instances = calloc(1, sizeof(struct multi_instance *));
486 struct multi_instance *mi = calloc(1, sizeof(struct multi_instance));
487 mi->context.c2.tls_multi = calloc(1, sizeof(struct tls_multi));
488 *(m->instances) = mi;
489 m->top.options.disable_dco = true;
490 *state = m;
491 return 0;
492}
493
494static int
495teardown2(void **state)
496{
497 struct multi_context *m = *state;
498 free((*(m->instances))->context.c2.tls_multi);
499 free(*(m->instances));
500 free(m->instances);
501 free(m);
502 return 0;
503}
504#endif /* ifdef ENABLE_MANAGEMENT */
505
506static int
507setup(void **state)
508{
509 struct context *c = calloc(1, sizeof(struct context));
510 c->options.pull = true;
511 c->options.route_nopull = false;
512 *state = c;
513 return 0;
514}
515
516static int
517teardown(void **state)
518{
519 struct context *c = *state;
520 free(c);
521 return 0;
522}
523
524int
525main(void)
526{
527 const struct CMUnitTest tests[] = {
528 cmocka_unit_test_setup_teardown(test_incoming_push_message_basic, setup, teardown),
529 cmocka_unit_test_setup_teardown(test_incoming_push_message_error1, setup, teardown),
530 cmocka_unit_test_setup_teardown(test_incoming_push_message_error2, setup, teardown),
531 cmocka_unit_test_setup_teardown(test_incoming_push_message_not_updatable_option, setup,
532 teardown),
533 cmocka_unit_test_setup_teardown(test_incoming_push_message_1, setup, teardown),
534 cmocka_unit_test_setup_teardown(test_incoming_push_message_bad_format, setup, teardown),
535 cmocka_unit_test_setup_teardown(test_incoming_push_message_mix, setup, teardown),
536 cmocka_unit_test_setup_teardown(test_incoming_push_message_mix2, setup, teardown),
537#ifdef ENABLE_MANAGEMENT
538 cmocka_unit_test_setup_teardown(test_send_push_msg0, setup2, teardown2),
539 cmocka_unit_test_setup_teardown(test_send_push_msg1, setup2, teardown2),
540 cmocka_unit_test_setup_teardown(test_send_push_msg2, setup2, teardown2),
541 cmocka_unit_test_setup_teardown(test_send_push_msg3, setup2, teardown2),
542 cmocka_unit_test_setup_teardown(test_send_push_msg4, setup2, teardown2),
543 cmocka_unit_test_setup_teardown(test_send_push_msg5, setup2, teardown2),
544 cmocka_unit_test_setup_teardown(test_send_push_msg6, setup2, teardown2),
545 cmocka_unit_test_setup_teardown(test_send_push_msg7, setup2, teardown2),
546 cmocka_unit_test_setup_teardown(test_send_push_msg8, setup2, teardown2),
547 cmocka_unit_test_setup_teardown(test_send_push_msg9, setup2, teardown2),
548 cmocka_unit_test_setup_teardown(test_send_push_msg10, setup2, teardown2)
549#endif
550 };
551
552 return cmocka_run_group_tests(tests, NULL, NULL);
553}
bool buf_string_compare_advance(struct buffer *src, const char *match)
Definition buffer.c:789
void free_buf(struct buffer *buf)
Definition buffer.c:184
struct buffer alloc_buf(size_t size)
Definition buffer.c:63
bool buf_parse(struct buffer *buf, const int delim, char *line, const int size)
Definition buffer.c:825
static bool buf_write(struct buffer *dest, const void *src, size_t size)
Definition buffer.h:660
Header file for server-mode related structures and functions.
#define msg(flags,...)
Definition error.h:152
unsigned int msglvl_t
Definition error.h:77
#define M_WARN
Definition error.h:92
#define OPT_P_UP
Definition options.h:736
#define OPT_P_NCP
Negotiable crypto parameters.
Definition options.h:747
#define OPT_P_ECHO
Definition options.h:755
#define OPT_P_EXPLICIT_NOTIFY
Definition options.h:754
#define OPT_P_SHAPER
Definition options.h:741
#define OPT_P_SOCKFLAGS
Definition options.h:761
#define OPT_P_MESSAGES
Definition options.h:746
#define OPT_P_SETENV
Definition options.h:740
#define OPT_P_SOCKBUF
Definition options.h:760
#define OPTION_PARM_SIZE
Definition options.h:56
#define OPT_P_TIMER
Definition options.h:742
#define OPT_P_DHCPDNS
Definition options.h:738
#define OPT_P_PULL_MODE
Definition options.h:758
#define OPT_P_PUSH_MTU
Definition options.h:765
#define OPT_P_PERSIST
Definition options.h:743
#define OPT_P_COMP
Definition options.h:745
#define OPT_P_ROUTE_EXTRAS
Definition options.h:757
#define OPT_P_PEER_ID
Definition options.h:763
#define OPT_P_ROUTE
Definition options.h:737
bool check_push_update_option_flags(char *line, int *i, unsigned int *flags)
Checks the formatting and validity of options inside push-update messages.
bool apply_pull_filter(const struct options *o, char *line)
Filter an option line by all pull filters.
@ UPT_BY_CID
Definition push.h:49
#define PUSH_MSG_REQUEST
Definition push.h:29
int process_push_update(struct context *c, struct options *o, unsigned int permission_mask, unsigned int *option_types_found, struct buffer *buf, bool msg_sender)
Handles the receiving of a push-update message and applies updates to the specified options.
Definition push_util.c:14
#define PUSH_OPT_OPTIONAL
Definition push.h:42
#define PUSH_MSG_ERROR
Definition push.h:28
#define PUSH_MSG_REPLY
Definition push.h:30
#define PUSH_MSG_UPDATE
Definition push.h:35
#define push_update_cmd
Definition push.h:38
#define push_reply_cmd
Definition push.h:37
static int send_push_update(struct multi_context *m, const void *target, const char *msg, const push_update_type type, const size_t push_bundle_size)
A function to send a PUSH_UPDATE control message from server to client(s).
Definition push_util.c:252
#define IV_PROTO_PUSH_UPDATE
Supports push-update.
Definition ssl.h:117
Wrapper structure for dynamically allocated memory.
Definition buffer.h:60
int len
Length in bytes of the actual content within the allocated memory.
Definition buffer.h:65
struct tls_multi * tls_multi
TLS state structure for this VPN tunnel.
Definition openvpn.h:323
Contains all state information for one tunnel.
Definition openvpn.h:474
struct context_2 c2
Level 2 context.
Definition openvpn.h:517
struct options options
Options loaded from command line or configuration file.
Definition openvpn.h:475
Main OpenVPN server state structure.
Definition multi.h:163
struct context top
Storage structure for process-wide configuration.
Definition multi.h:202
struct multi_instance ** instances
Array of multi_instances.
Definition multi.h:164
Server-mode state structure for one single VPN tunnel.
Definition multi.h:102
struct context context
The context structure storing state for this VPN tunnel.
Definition multi.h:143
bool route_nopull
Definition options.h:443
bool disable_dco
Definition options.h:377
bool pull
Definition options.h:562
struct pull_filter_list * pull_filter_list
Definition options.h:720
Security parameter state for a single VPN tunnel.
Definition ssl_common.h:612
struct env_set * es
bool options_postprocess_pull(struct options *options, struct env_set *es)
const char * msg2
static void test_send_push_msg2(void **state)
bool send_control_channel_string(struct context *c, const char *str, msglvl_t msglevel)
const char * msg10
static int teardown(void **state)
char * r4[]
static void test_send_push_msg9(void **state)
void throw_signal_soft(const int signum, const char *signal_text)
Throw a soft global signal.
static void test_send_push_msg4(void **state)
const char * msg1
static void test_send_push_msg1(void **state)
bool mroute_extract_openvpn_sockaddr(struct mroute_addr *addr, const struct openvpn_sockaddr *osaddr, bool use_port)
const char * msg8
static void test_send_push_msg3(void **state)
char * r9[]
static void test_send_push_msg0(void **state)
const char * msg6
static void test_send_push_msg8(void **state)
struct multi_instance * lookup_by_cid(struct multi_context *m, const unsigned long cid)
static int teardown2(void **state)
char * r5[]
const char * msg0
static void test_incoming_push_message_bad_format(void **state)
char ** res
char * r3[]
static void test_send_push_msg6(void **state)
static void test_send_push_msg7(void **state)
const char * msg4
int main(void)
const char * msg5
static void test_incoming_push_message_error2(void **state)
static void test_send_push_msg5(void **state)
const char * msg7
static int setup2(void **state)
bool apply_push_options(struct context *c, struct options *options, struct buffer *buf, unsigned int permission_mask, unsigned int *option_types_found, struct env_set *es, bool is_update)
static void test_send_push_msg10(void **state)
char * r6[]
static void test_incoming_push_message_mix(void **state)
static int setup(void **state)
static void test_incoming_push_message_basic(void **state)
static void test_incoming_push_message_1(void **state)
static void test_incoming_push_message_error1(void **state)
static void test_incoming_push_message_mix2(void **state)
unsigned int extract_iv_proto(const char *peer_info)
Extracts the IV_PROTO variable and returns its value or 0 if it cannot be extracted.
const char * msg9
void unlearn_ifconfig_ipv6(struct multi_context *m, struct multi_instance *mi)
void unlearn_ifconfig(struct multi_context *m, struct multi_instance *mi)
static void test_incoming_push_message_not_updatable_option(void **state)
#define PUSH_BUNDLE_SIZE_TEST
void update_vhash(struct multi_context *m, struct multi_instance *mi, const char *new_ip, const char *new_ipv6)
Update the vhash with new IP/IPv6 addresses in the multi_context when a push-update message containin...
unsigned int pull_permission_mask(const struct context *c)
int process_incoming_push_msg(struct context *c, const struct buffer *buffer, bool honor_received_options, unsigned int permission_mask, unsigned int *option_types_found)
char * r8[]
const char * tls_common_name(const struct tls_multi *multi, const bool null)
Returns the common name field for the given tunnel.
char * r1[]
char * r0[]
char * r7[]
const char * msg3