Ticket #270: 8212-fixed.patch

File 8212-fixed.patch, 2.5 KB (added by Samuli Seppänen, 9 years ago)

Patch with fixed paths

  • src/openvpn/init.c

    From: James Yonan <james@openvpn.net>
    Date: Tue, 18 Sep 2012 09:33:34 +0300
    Subject: [PATCH] Minor fixes to compression code introduced in previous commit:
    
    
    Add compression overhead to extra buffer unconditionally, as long
    as USE_COMP is defined.
    
    Remove "compress no" option since it is redundant with "compress"
    by itself.
    
    Version 2.1.21b
    
    ---
    
    a b  
    23562356
    23572357#ifdef USE_COMP
    23582358  /*
    2359    * Modify frame parameters if compression is enabled.
     2359   * Modify frame parameters if compression is compiled.
    23602360   * Should be called after frame_finalize_options.
    23612361   */
    2362   if (comp_enabled(&c->options.comp))
    2363     {
    2364       comp_add_to_extra_buffer (&c->c2.frame);
     2362  comp_add_to_extra_buffer (&c->c2.frame);
    23652363#ifdef ENABLE_FRAGMENT
    2366       comp_add_to_extra_buffer (&c->c2.frame_fragment_omit); /* omit compression frame delta from final frame_fragment */
     2364  comp_add_to_extra_buffer (&c->c2.frame_fragment_omit); /* omit compression frame delta from final frame_fragment */
    23672365#endif
    2368     }
    23692366#endif /* USE_COMP */
    23702367
    23712368#ifdef ENABLE_FRAGMENT
  • doc/openvpn.8

    a b  
    22612261
    22622262The
    22632263.B algorithm
    2264 parameter may be "snappy", "lzo", "stub", or "no".  Snappy and LZO
     2264parameter may be "snappy", "lzo", or empty.  Snappy and LZO
    22652265are different compression algorithms, with Snappy generally
    22662266offering the best performance.
    22672267
    2268 "no" indicates that compression should be turned off, but the packet
    2269 framing for compression is still enabled, allowing a different
    2270 setting to be later pushed.
     2268If the
     2269.B algorithm
     2270parameter is empty, compression will be turned off, but the packet
     2271framing for compression will still be enabled, allowing a different
     2272setting to be pushed later.
    22712273.\"*********************************************************
    22722274.TP
    22732275.B --comp-lzo [mode]
  • src/openvpn/options.c

    a b  
    56275627      VERIFY_PERMISSION (OPT_P_COMP);
    56285628      if (p[1])
    56295629        {
    5630           if (streq (p[1], "no"))
    5631             {
    5632               options->comp.alg = COMP_ALG_STUB;
    5633               options->comp.flags = COMP_F_SWAP;
    5634             }
    56355630          if (streq (p[1], "stub"))
    56365631            {
    56375632              options->comp.alg = COMP_ALG_STUB;