Skip to content
Snippets Groups Projects
  1. Jun 09, 2022
    • Vladimír Čunát's avatar
      ci: fixup lint:scan-build · e9c94f53
      Vladimír Čunát authored
      I have no idea why this one appeared right now (part not touched),
      and it does not make sense at all:
      
      ../../../lib/utils.c:524:20: warning: Out of bound memory access (accessed memory precedes memory block)
              buf[len_need - 1] = 0;
              ~~~~~~~~~~~~~~~~~~^~~
      Verified
      e9c94f53
    • Vladimír Čunát's avatar
      tweak inlining · 5bd8a765
      Vladimír Čunát authored
      I used -Winline (optimizing, gcc 11 or 12) to gather warnings
      about cases that were considered too expensive for inlining.
      Some of these probably used not to happen when we were dropping
      assertions during preprocessing in -DNDEBUG builds.
      This commit mainly improves size of the compiled binary by several KiB.
      
      - queue_head_impl(): optionally (un)inline; not big but in warnings
      - queue_pop_impl(): uninline; too complex for my today's eyes
      - kr_rand_bytes(): optionally (un)inline
        The inlining potential there comes from calling with a constant.
      - kr_straddr(): uninline.  It's never been meant for hot code,
        and this gives us large savings due to deduplicating the static array.
      - For some I couldn't see a good resolution due to restrictions in C.
      
      C hint: `static inline` is probably well known;
      the other inline combination is well explained at:
      https://stackoverflow.com/a/6312813/587396
      Verified
      5bd8a765
    • Vladimír Čunát's avatar
    • Vladimír Čunát's avatar
      lib/selection debug logs: print one more line · f9d75a16
      Vladimír Čunát authored
      And that made the "NO6: is KO" line extraneous.
      Example in context:
      [select][14162.01]   => id: '15271' choosing from addresses: 0 v4 + 1 v6; names to resolve: 6 v4 + 5 v6; force_resolve: 0; NO6: IPv6 is OK
      [select][14162.01]   => id: '15271' choosing: 'ns1.p31.dynect.net.'@'2600:2000:2210::31#00053' with timeout 774 ms zone cut: 'amazon.com.'
      [select][14162.01]   => id: '15271' updating: 'ns1.p31.dynect.net.'@'2600:2000:2210::31#00053' zone cut: 'amazon.com.' with rtt 316 to srtt: 311 and variance: 89
      Verified
      f9d75a16
    • Vladimír Čunát's avatar
      lib/selection: improve IPv6 avoidance if broken · 83efd209
      Vladimír Čunát authored
      It was still possible to get into a deadlock here.
      https://forum.turris.cz/t/not-connecting-to-applications-like-discord/17111/7
      If A records for a NS fell out of cache but AAAA remained,
      with probability 1-\epsilon we'd choose an AAAA address
      even if IPv6 was considered broken.
      
      I looked at *the whole* no6 strategy again, and I do think that
      there are no such holes anymore.  A few percent attempts will still
      go over IPv6 even if it's considered broken, but that sounds OK-ish.
      Verified
      83efd209
  2. Jun 06, 2022
  3. Jun 04, 2022
  4. Jun 03, 2022
  5. Jun 01, 2022
  6. May 30, 2022
  7. May 28, 2022
  8. May 20, 2022
  9. May 18, 2022