Ticket #349: openvpn-2.3.2.patch

File openvpn-2.3.2.patch, 1.7 KB (added by fpeter, 10 years ago)

push-continuation openvpn 2.3.2 patch

  • src/openvpn/options.c

    diff -rupN openvpn-2.3.2/src/openvpn/options.c openvpn-2.3.2-new/src/openvpn/options.c
    old new pre_pull_restore (struct options *o) 
    28292829    }
    28302830
    28312831  o->push_continuation = 0;
     2832  o->push_option_types_found = 0;
    28322833}
    28332834
    28342835#endif
  • src/openvpn/options.h

    diff -rupN openvpn-2.3.2/src/openvpn/options.h openvpn-2.3.2-new/src/openvpn/options.h
    old new struct options 
    458458  bool client;
    459459  bool pull; /* client pull of config options from server */
    460460  int push_continuation;
     461  int push_option_types_found;
    461462  const char *auth_user_pass_file;
    462463  struct options_pre_pull *pre_pull;
    463464
  • src/openvpn/push.c

    diff -rupN openvpn-2.3.2/src/openvpn/push.c openvpn-2.3.2-new/src/openvpn/push.c
    old new incoming_push_message (struct context *c 
    202202    msg (D_PUSH_ERRORS, "WARNING: Received bad push/pull message: %s", sanitize_control_message(BSTR(buffer), &gc));
    203203  else if (status == PUSH_MSG_REPLY || status == PUSH_MSG_CONTINUATION)
    204204    {
     205      c->options.push_option_types_found |= option_types_found;
     206
    205207      if (status == PUSH_MSG_REPLY)
    206         do_up (c, true, option_types_found); /* delay bringing tun/tap up until --push parms received from remote */
     208        do_up (c, true, c->options.push_option_types_found ); /* delay bringing tun/tap up until --push parms received from remote */
    207209      event_timeout_clear (&c->c2.push_request_interval);
    208210    }
    209211