1. 05 Apr, 2020 1 commit
  2. 04 Apr, 2020 24 commits
  3. 03 Apr, 2020 4 commits
  4. 02 Apr, 2020 2 commits
  5. 01 Apr, 2020 9 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
    • Nils Goroll's avatar
      4e5fcfeb
    • Nils Goroll's avatar
      VSA_BuildFAP: Build a suckaddr from Family, Address and Port · 358f7331
      Nils Goroll authored
      Follow the spirit of the vsa.c top level rant and spare callers the
      hassle of creating sockaddrs specific to ip4/ip6 just to build a VSA,
      which is intended to avoid having to special-case the protocols in the
      first place.
      358f7331
    • Nils Goroll's avatar
      Appease Solaris gcc 64bit · 544f62bd
      Nils Goroll authored
      544f62bd
    • Nils Goroll's avatar
      VSA_Build: Assign (struct sockaddr).sa_len where present · 105be6a6
      Nils Goroll authored
      In #3154 we said we would add this to the upcoming VSA_BuildFAP(),
      but actually VSA_Build() is the right place.
      105be6a6
    • Nils Goroll's avatar
      Deflate VSA_* code a bit · 50970bc9
      Nils Goroll authored
      - Centralize duplicated code in sua_len()
      - Have VSA_Malloc call VSA_Build
      - Use INIT_OBJ instead of memset + magic assignment
      
      April sales extra exclusively to customers in Paris: Now with free
      capitalized letters!
      50970bc9
    • Dridi Boukelmoune's avatar
      New HAVE_STRUCT_SOCKADDR_SA_LEN macro · 98b38e9f
      Dridi Boukelmoune authored
      Only present if struct sockaddr.sa_len exists, to be checked with
      preprocessor's #ifdef.
      
      Refs #3154
      98b38e9f