1. 04 Apr, 2019 1 commit
    • Thomas Haller's avatar
      shared: workaround -Wunused-but-set-variable warning with assertions · c50ef0df
      Thomas Haller authored
      Usually, we don't want to build with NDEBUG (because disabling regular
      assertions is an untested configuration). Still, when we do, we get
      compiler warnings.
      
      Non-debug builds break with a compiler warning:
      
        $ ccache cc -Ishared/a4d2686@@n-acd@sta -Ishared -I../shared -I../shared/c-siphash/src -I../shared/c-list/src -I../shared/c-rbtree/src -fdiagnostics-color=always -DNDEBUG -pipe -D_FILE_OFFSET_BITS=64 -Werror -std=gnu11 -fdata-sections -ffunction-sections -O2 -g -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -D_GNU_SOURCE -DSO_ATTACH_BPF=50 -std=c11 -Wno-pointer-arith -Wno-vla -MD -MQ 'shared/a4d2686@@n-acd@sta/n-acd_src_n-acd-probe.c.o' -MF 'shared/a4d2686@@n-acd@sta/n-acd_src_n-acd-probe.c.o.d' -o 'shared/a4d2686@@n-acd@sta/n-acd_src_n-acd-probe.c.o' -c ../shared/n-acd/src/n-acd-probe.c
        ../shared/n-acd/src/n-acd-probe.c: In function 'n_acd_probe_unlink':
        ../shared/n-acd/src/n-acd-probe.c:209:13: error: variable 'r' set but not used [-Werror=unused-but-set-variable]
                 int r;
                     ^
      
        $ cache cc -Ishared/a4d2686@@c-rbtree@sta -Ishared -I../shared -fdiagnostics-color=always -DNDEBUG -pipe -D_FILE_OFFSET_BITS=64 -Werror -std=gnu11 -fdata-sections -ffunction-sections -O2 -g -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -std=c11 -MD -MQ 'shared/a4d2686@@c-rbtree@sta/c-rbtree_src_c-rbtree.c.o' -MF 'shared/a4d2686@@c-rbtree@sta/c-rbtree_src_c-rbtree.c.o.d' -o 'shared/a4d2686@@c-rbtree@sta/c-rbtree_src_c-rbtree.c.o' -c ../shared/c-rbtree/src/c-rbtree.c
        ../shared/c-rbtree/src/c-rbtree.c: In function 'c_rbtree_move':
        ../shared/c-rbtree/src/c-rbtree.c:456:18: error: variable 't' set but not used [-Werror=unused-but-set-variable]
                 CRBTree *t;
                          ^
      
      https://github.com/nettools/n-acd/pull/6
      https://github.com/c-util/c-rbtree/pull/3
      c50ef0df
  2. 06 Feb, 2019 1 commit
  3. 20 Dec, 2018 1 commit
  4. 30 Sep, 2018 1 commit
    • Rafael Fontenelle's avatar
      Fix typos · 34fd6289
      Rafael Fontenelle authored
      !21
      
      [thaller@redhat.com: fix generated clients/common/settings-docs.h.in file
         and fix wrong change in src/systemd/src/libsystemd/sd-event/sd-event.c]
      34fd6289
  5. 29 May, 2018 2 commits
    • Beniamino Galvani's avatar
      n-acd: better handle interfaces going temporarily down · d082af6b
      Beniamino Galvani authored
      NM sometimes brings an interface temporarily down (for example to
      change a VLAN MAC to align it to the parent interface's one). When
      this happens, any recv() or send() in n-acd fails, the n-acd instance
      is reset to the initial state and a DOWN event is reported to the
      manager, which currently does not handle it. The result is an
      inconsistent state.
      
      There is no simple way of dealing with the DOWN event in the
      manager. What we can do instead is to:
      
       - ignore errors during recv() because there is really nothing we can
         do, except for waiting timeouts to expire;
      
       - during probe, ignore errors during send() so that we don't exceed
         the probe timeout;
      
       - during announcement, retry after a send() error to ensure we send
         all 3 announcements.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1578675
      d082af6b
    • Beniamino Galvani's avatar
      n-acd: use RFC 5227 timeout for announcements · 2f4b3392
      Beniamino Galvani authored
      When doing announcements, use the the timeout specified by RFC
      5227. Note that timeout_multiplier might be 0.
      
      This aligns behavior to upstream version of n-acd.
      2f4b3392
  6. 23 Apr, 2018 1 commit
    • Lubomir Rintel's avatar
      n-acd: don't use a return value in deallocator · de8bf742
      Lubomir Rintel authored
      ...so that its prototype is compatible with GDestroyNotify:
      
      src/devices/nm-acd-manager.c: In function ‘destroy_address_info’:
      /usr/include/glib-2.0/glib/gmem.h:120:31: error: cast between incompatible function types from ‘NAcd * (*)(NAcd *)’ {aka ‘struct NAcd * (*)(struct NAcd *)’} to ‘void (*)(void *)’ [-Werror=cast-function-type]
           GDestroyNotify _destroy = (GDestroyNotify) (destroy);                      \
                                     ^
      src/devices/nm-acd-manager.c:430:2: note: in expansion of macro ‘g_clear_pointer’
        g_clear_pointer (&info->acd, n_acd_free);
        ^~~~~~~~~~~~~~~
      
      The same change was done upstream, so the subsequent subtree pull of n-acd
      won't mess this up.
      de8bf742
  7. 18 Apr, 2018 1 commit