Opened 11 years ago

Closed 11 years ago

#273 closed Bug / Defect (fixed)

Switching on snappy compression from a config file fails

Reported by: Samuli Seppänen Owned by: Gert Döring
Priority: major Milestone:
Component: Generic / unclassified Version: OpenVPN git master branch (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords:
Cc:

Description

Adapted from James' description:

"There is still one issue that I haven't solved with snappy patch in 2.1. When running in server mode, the patch works fine if per-client-session compression parameters are set via client-connect script or management interface, however the patch fails if they are hardcoded into config file."

This ticket can be fixed after porting of 2.1.x-only patches to master has been finished.

Attachments (2)

273-patch.txt (413 bytes) - added by Gert Döring 11 years ago.
patch seems trivial, maybe I'm overlooking something. mailed james, asked for review
0005-Fix-usage-of-compression-.-from-global-config.patch (1.1 KB) - added by Gert Döring 11 years ago.
commited to git. will send to list tomorrow.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 11 years ago by Samuli Seppänen

More info from James:

There's one issue I've seen in the Snappy implementation in 2.1.  There 
are two locations in init.c with code that resets the compression context.

dest->c2.comp_context = NULL;

This code works fine with the AS because it always uses explicit 
"client-connect" directives to set up the compression parameters for a 
given client instance object, so there's no need to inherit compression 
directives from the main config.  But I realized later, when I tried to 
run a standalone OpenVPN server using a standard config file, without 
the AS, and without a client-connect script, that those lines cause 
compression directives in the config file to fail to propagate to the 
client instance object.

comment:2 Changed 11 years ago by Gert Döring

Actually, it's even worse - not only "switching on snappy from config file" fails but also "any compression" - I have "comp-lzo" set in my server config, and upon client connect it seems to fall down to "no compression"...

"compress <anything>" in ccd/client.conf works fine.

OTOH with the hints from James this should be fairly easy to spot now... just need to understand the flow of compression configuration through the code.

Changed 11 years ago by Gert Döring

Attachment: 273-patch.txt added

patch seems trivial, maybe I'm overlooking something. mailed james, asked for review

Changed 11 years ago by Gert Döring

commited to git. will send to list tomorrow.

comment:3 Changed 11 years ago by Gert Döring

Resolution: fixed
Status: newclosed

committed to master, as commit 1690f290f4bd2b203634e8fef9a82f7a03e5b06b

Note: See TracTickets for help on using tickets.