1/* 2 * OpenVPN -- An application to securely tunnel IP networks 3 * over a single UDP port, with support for SSL/TLS-based 4 * session authentication and key exchange, 5 * packet encryption, packet authentication, and 6 * packet compression. 7 * 8 * Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net> 9 * 10 * This program is free software; you can redistribute it and/or modify 11 * it under the terms of the GNU General Public License version 2 12 * as published by the Free Software Foundation. 13 * 14 * This program is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU General Public License for more details. 18 * 19 * You should have received a copy of the GNU General Public License 20 * along with this program (see the file COPYING included with this 21 * distribution); if not, write to the Free Software Foundation, Inc., 22 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 */ 24 25/* 26 * 2004-01-28: Added Socks5 proxy support 27 * (Christof Meerwald, http://cmeerw.org) 28 */ 29 30#ifndef OPTIONS_H 31#define OPTIONS_H 32 33#include "basic.h" 34#include "common.h" 35#include "mtu.h" 36#include "route.h" 37#include "tun.h" 38#include "socket.h" 39#include "plugin.h" 40#include "manage.h" 41#include "proxy.h" 42#include "lzo.h" 43#include "pushlist.h" 44#include "clinat.h" 45 46/* 47 * Maximum number of parameters associated with an option, 48 * including the option name itself. 49 */ 50#define MAX_PARMS 16 51 52/* 53 * Max size of options line and parameter. 54 */ 55#define OPTION_PARM_SIZE 256 56#define OPTION_LINE_SIZE 256 57 58extern const char title_string[]; 59 60#if P2MP 61 62/* certain options are saved before --pull modifications are applied */ 63struct options_pre_pull 64{ 65 bool tuntap_options_defined; 66 struct tuntap_options tuntap_options; 67 68 bool routes_defined; 69 struct route_option_list *routes; 70 71 bool routes_ipv6_defined; 72 struct route_ipv6_option_list *routes_ipv6; 73 74#ifdef ENABLE_CLIENT_NAT 75 bool client_nat_defined; 76 struct client_nat_option_list *client_nat; 77#endif 78 79 int foreign_option_index; 80}; 81 82#endif 83#if defined(ENABLE_CRYPTO) && !defined(ENABLE_CRYPTO_OPENSSL) && !defined(ENABLE_CRYPTO_POLARSSL) 84# error "At least one of OpenSSL or PolarSSL needs to be defined." 85#endif 86 87struct connection_entry 88{ 89 int proto; 90 int local_port; 91 bool local_port_defined; 92 int remote_port; 93 const char *local; 94 const char *remote; 95 bool remote_float; 96 bool bind_defined; 97 bool bind_local; 98 int connect_retry_seconds; 99 bool connect_retry_defined; 100 int connect_retry_max; 101 int connect_timeout; 102 bool connect_timeout_defined; 103#ifdef ENABLE_HTTP_PROXY 104 struct http_proxy_options *http_proxy_options; 105#endif 106#ifdef ENABLE_SOCKS 107 const char *socks_proxy_server; 108 int socks_proxy_port; 109 const char *socks_proxy_authfile; 110 bool socks_proxy_retry; 111#endif 112 113 int tun_mtu; /* MTU of tun device */ 114 bool tun_mtu_defined; /* true if user overriding parm with command line option */ 115 int tun_mtu_extra; 116 bool tun_mtu_extra_defined; 117 int link_mtu; /* MTU of device over which tunnel packets pass via TCP/UDP */ 118 bool link_mtu_defined; /* true if user overriding parm with command line option */ 119 120 /* Advanced MTU negotiation and datagram fragmentation options */ 121 int mtu_discover_type; /* used if OS supports setting Path MTU discovery options on socket */ 122 123 int fragment; /* internal fragmentation size */ 124 int mssfix; /* Upper bound on TCP MSS */ 125 bool mssfix_default; /* true if --mssfix was supplied without a parameter */ 126 127#ifdef ENABLE_OCC 128 int explicit_exit_notification; /* Explicitly tell peer when we are exiting via OCC_EXIT message */ 129#endif 130 131# define CE_DISABLED (1<<0) 132# define CE_MAN_QUERY_PROXY (1<<1) 133# define CE_MAN_QUERY_REMOTE_UNDEF 0 134# define CE_MAN_QUERY_REMOTE_QUERY 1 135# define CE_MAN_QUERY_REMOTE_ACCEPT 2 136# define CE_MAN_QUERY_REMOTE_MOD 3 137# define CE_MAN_QUERY_REMOTE_SKIP 4 138# define CE_MAN_QUERY_REMOTE_MASK (0x07) 139# define CE_MAN_QUERY_REMOTE_SHIFT (2) 140 unsigned int flags; 141}; 142 143struct remote_entry 144{ 145 const char *remote; 146 int remote_port; 147 int proto; 148}; 149 150#define CONNECTION_LIST_SIZE 64 151 152struct connection_list 153{ 154 int len; 155 int current; 156 int n_cycles; 157 bool no_advance; 158 struct connection_entry *array[CONNECTION_LIST_SIZE]; 159}; 160 161struct remote_list 162{ 163 int len; 164 struct remote_entry *array[CONNECTION_LIST_SIZE]; 165}; 166 167struct remote_host_store 168{ 169# define RH_HOST_LEN 80 170 char host[RH_HOST_LEN]; 171}; 172 173/* Command line options */ 174struct options 175{ 176 struct gc_arena gc; 177 bool gc_owned; 178 179 /* first config file */ 180 const char *config; 181 182 /* major mode */ 183# define MODE_POINT_TO_POINT 0 184# define MODE_SERVER 1 185 int mode; 186 187 /* enable forward compatibility for post-2.1 features */ 188 bool forward_compatible; 189 190 /* persist parms */ 191 bool persist_config; 192 int persist_mode; 193 194#ifdef ENABLE_CRYPTO 195 const char *key_pass_file; 196 bool show_ciphers; 197 bool show_digests; 198 bool show_engines; 199#ifdef ENABLE_SSL 200 bool show_tls_ciphers; 201#endif 202 bool genkey; 203#endif 204 205 /* Networking parms */ 206 struct connection_entry ce; 207 char *remote_ip_hint; 208 struct connection_list *connection_list; 209 struct remote_list *remote_list; 210 bool force_connection_list; 211 212#if HTTP_PROXY_OVERRIDE 213 struct http_proxy_options *http_proxy_override; 214#endif 215 216 struct remote_host_store *rh_store; 217 218 bool remote_random; 219 const char *ipchange; 220 const char *dev; 221 const char *dev_type; 222 const char *dev_node; 223 const char *lladdr; 224 int topology; /* one of the TOP_x values from proto.h */ 225 const char *ifconfig_local; 226 const char *ifconfig_remote_netmask; 227 const char *ifconfig_ipv6_local; 228 int ifconfig_ipv6_netbits; 229 const char *ifconfig_ipv6_remote; 230 bool ifconfig_noexec; 231 bool ifconfig_nowarn; 232#ifdef ENABLE_FEATURE_SHAPER 233 int shaper; 234#endif 235 236 int proto_force; 237 238#ifdef ENABLE_OCC 239 bool mtu_test; 240#endif 241 242#ifdef ENABLE_MEMSTATS 243 char *memstats_fn; 244#endif 245 246 bool mlock; 247 248 int keepalive_ping; /* a proxy for ping/ping-restart */ 249 int keepalive_timeout; 250 251 int inactivity_timeout; /* --inactive */ 252 int inactivity_minimum_bytes; 253 254 int ping_send_timeout; /* Send a TCP/UDP ping to remote every n seconds */ 255 int ping_rec_timeout; /* Expect a TCP/UDP ping from remote at least once every n seconds */ 256 bool ping_timer_remote; /* Run ping timer only if we have a remote address */ 257 bool tun_ipv6; /* Build tun dev that supports IPv6 */ 258 259# define PING_UNDEF 0 260# define PING_EXIT 1 261# define PING_RESTART 2 262 int ping_rec_timeout_action; /* What action to take on ping_rec_timeout (exit or restart)? */ 263 264 bool persist_tun; /* Don't close/reopen TUN/TAP dev on SIGUSR1 or PING_RESTART */ 265 bool persist_local_ip; /* Don't re-resolve local address on SIGUSR1 or PING_RESTART */ 266 bool persist_remote_ip; /* Don't re-resolve remote address on SIGUSR1 or PING_RESTART */ 267 bool persist_key; /* Don't re-read key files on SIGUSR1 or PING_RESTART */ 268 269#if PASSTOS_CAPABILITY 270 bool passtos; 271#endif 272 273 int resolve_retry_seconds; /* If hostname resolve fails, retry for n seconds */ 274 275 struct tuntap_options tuntap_options; 276 277 /* Misc parms */ 278 const char *username; 279 const char *groupname; 280 const char *chroot_dir; 281 const char *cd_dir; 282#ifdef ENABLE_SELINUX 283 char *selinux_context; 284#endif 285 const char *writepid; 286 const char *up_script; 287 const char *down_script; 288 bool user_script_used; 289 bool down_pre; 290 bool up_delay; 291 bool up_restart; 292 bool daemon; 293 294 int remap_sigusr1; 295 296 /* inetd modes defined in socket.h */ 297 int inetd; 298 299 bool log; 300 bool suppress_timestamps; 301 int nice; 302 int verbosity; 303 int mute; 304 305#ifdef ENABLE_DEBUG 306 int gremlin; 307#endif 308 309 const char *status_file; 310 int status_file_version; 311 int status_file_update_freq; 312 313 /* optimize TUN/TAP/UDP writes */ 314 bool fast_io; 315 316#ifdef ENABLE_LZO 317 /* LZO_x flags from lzo.h */ 318 unsigned int lzo; 319#endif 320 321 /* buffer sizes */ 322 int rcvbuf; 323 int sndbuf; 324 325 /* mark value */ 326 int mark; 327 328 /* socket flags */ 329 unsigned int sockflags; 330 331 /* route management */ 332 const char *route_script; 333 const char *route_predown_script; 334 const char *route_default_gateway; 335 int route_default_metric; 336 bool route_noexec; 337 int route_delay; 338 int route_delay_window; 339 bool route_delay_defined; 340 int max_routes; 341 struct route_option_list *routes; 342 struct route_ipv6_option_list *routes_ipv6; /* IPv6 */ 343 bool route_nopull; 344 bool route_gateway_via_dhcp; 345 bool allow_pull_fqdn; /* as a client, allow server to push a FQDN for certain parameters */ 346 347#ifdef ENABLE_CLIENT_NAT 348 struct client_nat_option_list *client_nat; 349#endif 350 351#ifdef ENABLE_OCC 352 /* Enable options consistency check between peers */ 353 bool occ; 354#endif 355 356#ifdef ENABLE_MANAGEMENT 357 const char *management_addr; 358 int management_port; 359 const char *management_user_pass; 360 int management_log_history_cache; 361 int management_echo_buffer_size; 362 int management_state_buffer_size; 363 const char *management_write_peer_info_file; 364 365 const char *management_client_user; 366 const char *management_client_group; 367 368 /* Mask of MF_ values of manage.h */ 369 unsigned int management_flags; 370#endif 371 372#ifdef ENABLE_PLUGIN 373 struct plugin_option_list *plugin_list; 374#endif 375 376 377 378#if P2MP 379 380#if P2MP_SERVER 381 /* the tmp dir is for now only used in the P2P server context */ 382 const char *tmp_dir; 383 bool server_defined; 384 in_addr_t server_network; 385 in_addr_t server_netmask; 386 bool server_ipv6_defined; /* IPv6 */ 387 struct in6_addr server_network_ipv6; /* IPv6 */ 388 unsigned int server_netbits_ipv6; /* IPv6 */ 389 390# define SF_NOPOOL (1<<0) 391# define SF_TCP_NODELAY_HELPER (1<<1) 392# define SF_NO_PUSH_ROUTE_GATEWAY (1<<2) 393 unsigned int server_flags; 394 395 bool server_bridge_proxy_dhcp; 396 397 bool server_bridge_defined; 398 in_addr_t server_bridge_ip; 399 in_addr_t server_bridge_netmask; 400 in_addr_t server_bridge_pool_start; 401 in_addr_t server_bridge_pool_end; 402 403 struct push_list push_list; 404 bool ifconfig_pool_defined; 405 in_addr_t ifconfig_pool_start; 406 in_addr_t ifconfig_pool_end; 407 in_addr_t ifconfig_pool_netmask; 408 const char *ifconfig_pool_persist_filename; 409 int ifconfig_pool_persist_refresh_freq; 410 411 bool ifconfig_ipv6_pool_defined; /* IPv6 */ 412 struct in6_addr ifconfig_ipv6_pool_base; /* IPv6 */ 413 int ifconfig_ipv6_pool_netbits; /* IPv6 */ 414 415 int real_hash_size; 416 int virtual_hash_size; 417 const char *client_connect_script; 418 const char *client_disconnect_script; 419 const char *learn_address_script; 420 const char *client_config_dir; 421 bool ccd_exclusive; 422 bool disable; 423 int n_bcast_buf; 424 int tcp_queue_limit; 425 struct iroute *iroutes; 426 struct iroute_ipv6 *iroutes_ipv6; /* IPv6 */ 427 bool push_ifconfig_defined; 428 in_addr_t push_ifconfig_local; 429 in_addr_t push_ifconfig_remote_netmask; 430#ifdef ENABLE_CLIENT_NAT 431 in_addr_t push_ifconfig_local_alias; 432#endif 433 bool push_ifconfig_constraint_defined; 434 in_addr_t push_ifconfig_constraint_network; 435 in_addr_t push_ifconfig_constraint_netmask; 436 bool push_ifconfig_ipv6_defined; /* IPv6 */ 437 struct in6_addr push_ifconfig_ipv6_local; /* IPv6 */ 438 int push_ifconfig_ipv6_netbits; /* IPv6 */ 439 struct in6_addr push_ifconfig_ipv6_remote; /* IPv6 */ 440 bool enable_c2c; 441 bool duplicate_cn; 442 int cf_max; 443 int cf_per; 444 int max_clients; 445 int max_routes_per_client; 446 int stale_routes_check_interval; 447 int stale_routes_ageing_time; 448 449 const char *auth_user_pass_verify_script; 450 bool auth_user_pass_verify_script_via_file; 451#if PORT_SHARE 452 char *port_share_host; 453 int port_share_port; 454 const char *port_share_journal_dir; 455#endif 456#endif 457 458 bool client; 459 bool pull; /* client pull of config options from server */ 460 int push_continuation; 461 const char *auth_user_pass_file; 462 struct options_pre_pull *pre_pull; 463 464 int server_poll_timeout; 465 466 int scheduled_exit_interval; 467 468#ifdef ENABLE_CLIENT_CR 469 struct static_challenge_info sc_info; 470#endif 471#endif 472 473#ifdef ENABLE_CRYPTO 474 /* Cipher parms */ 475 const char *shared_secret_file; 476 const char *shared_secret_file_inline; 477 int key_direction; 478 bool ciphername_defined; 479 const char *ciphername; 480 bool authname_defined; 481 const char *authname; 482 int keysize; 483 const char *prng_hash; 484 int prng_nonce_secret_len; 485 const char *engine; 486 bool replay; 487 bool mute_replay_warnings; 488 int replay_window; 489 int replay_time; 490 const char *packet_id_file; 491 bool use_iv; 492 bool test_crypto; 493#ifdef ENABLE_PREDICTION_RESISTANCE 494 bool use_prediction_resistance; 495#endif 496 497#ifdef ENABLE_SSL 498 /* TLS (control channel) parms */ 499 bool tls_server; 500 bool tls_client; 501 const char *ca_file; 502 const char *ca_path; 503 const char *dh_file; 504 const char *cert_file; 505 const char *extra_certs_file; 506 const char *priv_key_file; 507 const char *pkcs12_file; 508 const char *cipher_list; 509 const char *tls_verify; 510 int verify_x509_type; 511 const char *verify_x509_name; 512 const char *tls_export_cert; 513 const char *crl_file; 514 515 const char *ca_file_inline; 516 const char *cert_file_inline; 517 const char *extra_certs_file_inline; 518 char *priv_key_file_inline; 519 const char *dh_file_inline; 520 const char *pkcs12_file_inline; /* contains the base64 encoding of pkcs12 file */ 521 522 int ns_cert_type; /* set to 0, NS_CERT_CHECK_SERVER, or NS_CERT_CHECK_CLIENT */ 523 unsigned remote_cert_ku[MAX_PARMS]; 524 const char *remote_cert_eku; 525 uint8_t *verify_hash; 526 unsigned int ssl_flags; /* set to SSLF_x flags from ssl.h */ 527 528#ifdef ENABLE_PKCS11 529 const char *pkcs11_providers[MAX_PARMS]; 530 unsigned pkcs11_private_mode[MAX_PARMS]; 531 bool pkcs11_protected_authentication[MAX_PARMS]; 532 bool pkcs11_cert_private[MAX_PARMS]; 533 int pkcs11_pin_cache_period; 534 const char *pkcs11_id; 535 bool pkcs11_id_management; 536#endif 537 538#ifdef ENABLE_CRYPTOAPI 539 const char *cryptoapi_cert; 540#endif 541 542 /* data channel key exchange method */ 543 int key_method; 544 545 /* Per-packet timeout on control channel */ 546 int tls_timeout; 547 548 /* Data channel key renegotiation parameters */ 549 int renegotiate_bytes; 550 int renegotiate_packets; 551 int renegotiate_seconds; 552 553 /* Data channel key handshake must finalize 554 within n seconds of handshake initiation. */ 555 int handshake_window; 556 557#ifdef ENABLE_X509ALTUSERNAME 558 /* Field used to be the username in X509 cert. */ 559 char *x509_username_field; 560#endif 561 562 /* Old key allowed to live n seconds after new key goes active */ 563 int transition_window; 564 565 /* Special authentication MAC for TLS control channel */ 566 const char *tls_auth_file; /* shared secret */ 567 const char *tls_auth_file_inline; 568 569 /* Allow only one session */ 570 bool single_session; 571 572#ifdef ENABLE_PUSH_PEER_INFO 573 bool push_peer_info; 574#endif 575 576 bool tls_exit; 577 578#endif /* ENABLE_SSL */ 579#endif /* ENABLE_CRYPTO */ 580 581#ifdef ENABLE_X509_TRACK 582 const struct x509_track *x509_track; 583#endif 584 585 /* special state parms */ 586 int foreign_option_index; 587 588#ifdef WIN32 589 const char *exit_event_name; 590 bool exit_event_initial_state; 591 bool show_net_up; 592 int route_method; 593#endif 594}; 595 596#define streq(x, y) (!strcmp((x), (y))) 597 598/* 599 * Option classes. 600 */ 601#define OPT_P_GENERAL (1<<0) 602#define OPT_P_UP (1<<1) 603#define OPT_P_ROUTE (1<<2) 604#define OPT_P_IPWIN32 (1<<3) 605#define OPT_P_SCRIPT (1<<4) 606#define OPT_P_SETENV (1<<5) 607#define OPT_P_SHAPER (1<<6) 608#define OPT_P_TIMER (1<<7) 609#define OPT_P_PERSIST (1<<8) 610#define OPT_P_PERSIST_IP (1<<9) 611#define OPT_P_COMP (1<<10) /* TODO */ 612#define OPT_P_MESSAGES (1<<11) 613#define OPT_P_CRYPTO (1<<12) /* TODO */ 614#define OPT_P_TLS_PARMS (1<<13) /* TODO */ 615#define OPT_P_MTU (1<<14) /* TODO */ 616#define OPT_P_NICE (1<<15) 617#define OPT_P_PUSH (1<<16) 618#define OPT_P_INSTANCE (1<<17) 619#define OPT_P_CONFIG (1<<18) 620#define OPT_P_EXPLICIT_NOTIFY (1<<19) 621#define OPT_P_ECHO (1<<20) 622#define OPT_P_INHERIT (1<<21) 623#define OPT_P_ROUTE_EXTRAS (1<<22) 624#define OPT_P_PULL_MODE (1<<23) 625#define OPT_P_PLUGIN (1<<24) 626#define OPT_P_SOCKBUF (1<<25) 627#define OPT_P_SOCKFLAGS (1<<26) 628#define OPT_P_CONNECTION (1<<27) 629 630#define OPT_P_DEFAULT (~(OPT_P_INSTANCE|OPT_P_PULL_MODE)) 631 632#if P2MP 633#define PULL_DEFINED(opt) ((opt)->pull) 634#if P2MP_SERVER 635#define PUSH_DEFINED(opt) ((opt)->push_list) 636#endif 637#endif 638 639#ifndef PULL_DEFINED 640#define PULL_DEFINED(opt) (false) 641#endif 642 643#ifndef PUSH_DEFINED 644#define PUSH_DEFINED(opt) (false) 645#endif 646 647#ifdef WIN32 648#define ROUTE_OPTION_FLAGS(o) ((o)->route_method & ROUTE_METHOD_MASK) 649#else 650#define ROUTE_OPTION_FLAGS(o) (0) 651#endif 652 653#ifdef ENABLE_FEATURE_SHAPER 654#define SHAPER_DEFINED(opt) ((opt)->shaper) 655#else 656#define SHAPER_DEFINED(opt) (false) 657#endif 658 659#ifdef ENABLE_PLUGIN 660#define PLUGIN_OPTION_LIST(opt) ((opt)->plugin_list) 661#else 662#define PLUGIN_OPTION_LIST(opt) (NULL) 663#endif 664 665#ifdef MANAGEMENT_DEF_AUTH 666#define MAN_CLIENT_AUTH_ENABLED(opt) ((opt)->management_flags & MF_CLIENT_AUTH) 667#else 668#define MAN_CLIENT_AUTH_ENABLED(opt) (false) 669#endif 670 671void parse_argv (struct options *options, 672 const int argc, 673 char *argv[], 674 const int msglevel, 675 const unsigned int permission_mask, 676 unsigned int *option_types_found, 677 struct env_set *es); 678 679void notnull (const char *arg, const char *description); 680 681void usage_small (void); 682 683void init_options (struct options *o, const bool init_gc); 684void uninit_options (struct options *o); 685 686void setenv_settings (struct env_set *es, const struct options *o); 687void show_settings (const struct options *o); 688 689bool string_defined_equal (const char *s1, const char *s2); 690 691#ifdef ENABLE_OCC 692 693const char *options_string_version (const char* s, struct gc_arena *gc); 694 695char *options_string (const struct options *o, 696 const struct frame *frame, 697 struct tuntap *tt, 698 bool remote, 699 struct gc_arena *gc); 700 701bool options_cmp_equal_safe (char *actual, const char *expected, size_t actual_n); 702void options_warning_safe (char *actual, const char *expected, size_t actual_n); 703bool options_cmp_equal (char *actual, const char *expected); 704void options_warning (char *actual, const char *expected); 705 706#endif 707 708void options_postprocess (struct options *options); 709 710void pre_pull_save (struct options *o); 711void pre_pull_restore (struct options *o); 712 713bool apply_push_options (struct options *options, 714 struct buffer *buf, 715 unsigned int permission_mask, 716 unsigned int *option_types_found, 717 struct env_set *es); 718 719void options_detach (struct options *o); 720 721void options_server_import (struct options *o, 722 const char *filename, 723 int msglevel, 724 unsigned int permission_mask, 725 unsigned int *option_types_found, 726 struct env_set *es); 727 728void pre_pull_default (struct options *o); 729 730void rol_check_alloc (struct options *options); 731 732int parse_line (const char *line, 733 char *p[], 734 const int n, 735 const char *file, 736 const int line_num, 737 int msglevel, 738 struct gc_arena *gc); 739 740/* 741 * parse/print topology coding 742 */ 743 744int parse_topology (const char *str, const int msglevel); 745const char *print_topology (const int topology); 746 747/* 748 * Manage auth-retry variable 749 */ 750 751#if P2MP 752 753#define AR_NONE 0 754#define AR_INTERACT 1 755#define AR_NOINTERACT 2 756 757int auth_retry_get (void); 758bool auth_retry_set (const int msglevel, const char *option); 759const char *auth_retry_print (void); 760 761#endif 762 763void options_string_import (struct options *options, 764 const char *config, 765 const int msglevel, 766 const unsigned int permission_mask, 767 unsigned int *option_types_found, 768 struct env_set *es); 769 770bool get_ipv6_addr( const char * prefix_str, struct in6_addr *network, 771 unsigned int * netbits, char ** printable_ipv6, 772 int msglevel ); 773 774/* 775 * inline functions 776 */ 777static inline bool 778connection_list_defined (const struct options *o) 779{ 780 return o->connection_list != NULL; 781} 782 783static inline void 784connection_list_set_no_advance (struct options *o) 785{ 786 if (o->connection_list) 787 o->connection_list->no_advance = true; 788} 789 790#endif 791