1. 09 Apr, 2020 2 commits
    • Nils Goroll's avatar
      tabularize parameters to be passed to vcc · 430bbce9
      Nils Goroll authored
      Parameters are passed to vcc via specific setter functions, presumably
      to avoid binary compability issues between the main program (here:
      vanishd) and a library (here: libvcc).
      
      This commit does not change that interface in any way, but generates
      both sides from a common table include to avoid having to edit five
      spots in four different source files and write trivial setter functions
      for a simple mgt_vcc parameter change.
      430bbce9
    • Nils Goroll's avatar
      VDP/VFP sanity · d0a89676
      Nils Goroll authored
      * there is no NULL filter
      * the filter name cannot be NULL or empty
      d0a89676
  2. 05 Apr, 2020 5 commits
    • Nils Goroll's avatar
      some beresp.do_* flags are undefined after setting beresp.filters · a80d0362
      Nils Goroll authored
      See previous commit: Analogous to resp.do_esi, any access to the
      beresp.do_* flags which influence beresp.filters is now a VCL error.
      
      Ref #3002
      a80d0362
    • Nils Goroll's avatar
      resp.do_esi is undefined after setting resp.filters · 2b3c76a8
      Nils Goroll authored
      After fixing resp.filters, resp.do_esi loses its meaning.
      
      Note:
      
      Setting resp.filters also fixes whether or not the gunzip and range VDPs
      are being pushed.
      
      These do not depend on switches, but on request headers. So we need to
      consider the case that a VCL author
      
      	- fixes resp.filters
      	- and then adds or removes relevant headers
      
      * req.http.Accept-Encoding for the gunzip vdp
      
        if removed: gunzip stays in the VDP list, which is always ok
      
        if added: that is probably wrong anyway and the VCL author can
        be held responsible for their actions as per the warning in the
        resp.filters documentation.
      
      * req.http.Range for the range vdp
      
        if removed: the range vdp vetoes itself in the _init callback
      
        if added: no range handling will be present, which is always ok
        (and see above for VCL author responsibilities)
      
      Fixes #3002
      2b3c76a8
    • Nils Goroll's avatar
      NULL any filters for VRT_fail() and return(synth()) · ad176224
      Nils Goroll authored
      The synthetic response has nothing to do with the filters set for
      the original body.
      
      See next commit for implicit test
      ad176224
    • Nils Goroll's avatar
      Test resp.filters with esi, gunzip and range · 2ab29dc4
      Nils Goroll authored
      2ab29dc4
    • Nils Goroll's avatar
      esi can be turned off at esi_level > 0 · d099d7f6
      Nils Goroll authored
      d099d7f6
  3. 04 Apr, 2020 24 commits
  4. 03 Apr, 2020 4 commits
  5. 02 Apr, 2020 2 commits
  6. 01 Apr, 2020 3 commits
    • Nils Goroll's avatar
    • Nils Goroll's avatar
      add vcc_acl_pedantic parameter · 6c8f25e7
      Nils Goroll authored
      See also previous commit:
      
      With this parameter set to on, any ACL entries in non-canonical form
      cause a VCL compilation error rather than only a warning.
      6c8f25e7
    • Nils Goroll's avatar
      Warn about ACL entries with non-zero host bits · b9756475
      Nils Goroll authored
      Summary:
      
      ACL entries with netmasks shorter than the maximum for the respective
      protocol represent network addresses and as such, by convention,
      should be written with all zero bits in the host part to avoid
      confusion.
      
      This patch adds VCL compile warnings and improved logging if they are
      not.
      
      Discussion:
      
      For example, while 1.2.3.0/24 and 1.2.3.255/24, in CIDR notation, both
      specify all addresses with the first three octets matching 1, 2 and 3,
      using the latter can be a source of subtle confusion.
      
      This becomes particularly apparent with netmasks outside byte
      boundaries: 1.2.6.0/22 specifies addresses 1.2.4.0 - 1.2.7.255, but
      not so experienced administrators might be tempted to think that it
      specified 1.2.6.0 - 1.2.9.255.
      
      To summarize, denoting network addresses in non-canonical form is
      confusing, a possible source of error and additionally complicates
      analyses.
      
      This patch makes sure that such mishaps do not remain unnoticed by
      
      - issuing warnings during VCL compilation about non-canonical network
        addresses
      
      - Logging ACL matches together with the canonical address
      
      The actual matching code is not touched, but a minor simplification
      can be applied later.
      b9756475