Ticket #349: openvpn-2.2.1.patch

File openvpn-2.2.1.patch, 1.6 KB (added by fpeter, 8 years ago)

openvpn push-continuation fix

  • openvpn-2.2.

    diff -rupN openvpn-2.2.1/options.c openvpn-2.2.1-new/options.c
    old new pre_pull_restore (struct options *o) 
    23772377    }
    23782378
    23792379  o->push_continuation = 0;
     2380  o->push_option_types_found = 0;
    23802381}
    23812382
    23822383#endif
  • openvpn-2.2.

    diff -rupN openvpn-2.2.1/options.h openvpn-2.2.1-new/options.h
    old new struct options 
    420420  bool client;
    421421  bool pull; /* client pull of config options from server */
    422422  int push_continuation;
     423  int push_option_types_found;
    423424  const char *auth_user_pass_file;
    424425  struct options_pre_pull *pre_pull;
    425426
  • openvpn-2.2.

    diff -rupN openvpn-2.2.1/push.c openvpn-2.2.1-new/push.c
    old new incoming_push_message (struct context *c 
    161161    msg (D_PUSH_ERRORS, "WARNING: Received bad push/pull message: %s", BSTR (buffer));
    162162  else if (status == PUSH_MSG_REPLY || status == PUSH_MSG_CONTINUATION)
    163163    {
     164      c->options.push_option_types_found |= option_types_found;
     165
    164166      if (status == PUSH_MSG_REPLY)
    165         do_up (c, true, option_types_found); /* delay bringing tun/tap up until --push parms received from remote */
     167        do_up (c, true, c->options.push_option_types_found ); /* delay bringing tun/tap up until --push parms received from remote */
    166168      event_timeout_clear (&c->c2.push_request_interval);
    167169    }
    168170