[acassen/keepalived] be7ae8: Stop segfaulting when configuration keyword is mis...

pqarmitage <[email protected]>
Newsgroups gmane.linux.keepalived.devel
Message-ID <581b560c4ea4e_42183fb08caab1401005b7@hookshot-fe3-cp1-prd.iad.github.net.mail>
  Branch: refs/heads/master
  Home:   https://github.com/acassen/keepalived
  Commit: be7ae8008bfce711b55e938ad3ff94dde6c7f79f
      https://github.com/acassen/keepalived/commit/be7ae8008bfce711b55e938ad3ff94dde6c7f79f
  Author: Quentin Armitage <[email protected]>
  Date:   2016-11-02 (Wed, 02 Nov 2016)

  Changed paths:
    M keepalived/check/check_api.c
    M keepalived/check/check_data.c
    M keepalived/check/check_http.c
    M keepalived/check/check_parser.c
    M keepalived/core/global_parser.c
    M keepalived/vrrp/vrrp_data.c
    M keepalived/vrrp/vrrp_ipaddress.c
    M keepalived/vrrp/vrrp_iproute.c
    M keepalived/vrrp/vrrp_iprule.c
    M keepalived/vrrp/vrrp_parser.c
    M keepalived/vrrp/vrrp_track.c
    M lib/parser.c
    M lib/vector.c
    M lib/vector.h

  Log Message:
  -----------
  Stop segfaulting when configuration keyword is missing its parameter

There are many places where during configuration parsing the code
assumes that if a keyword is specified that requires a parameter, then
the parameter exists. If the parameter doesn't exist, then the code
indexes past the end of the vector, and at best segfaults, and at worst
may carry on, parsing random data.

This commit adds strvec_slot() which checks for the presence of the
parameter, and if configured will call a function that can handle the
error. Currently this logs that the parameter is missing, with as much
helpful information as it can provide, and then terminates.

Signed-off-by: Quentin Armitage <[email protected]>


  Commit: eb8c82ac5bb229729ec5ee37184dab60a25fb78f
      https://github.com/acassen/keepalived/commit/eb8c82ac5bb229729ec5ee37184dab60a25fb78f
  Author: Quentin Armitage <[email protected]>
  Date:   2016-11-02 (Wed, 02 Nov 2016)

  Changed paths:
    M keepalived/check/check_parser.c

  Log Message:
  -----------
  Use FMT_STR_VSLOT where appropriate

Signed-off-by: Quentin Armitage <[email protected]>


  Commit: 75e85fbc3c4eb1074efde3659900699cb029480d
      https://github.com/acassen/keepalived/commit/75e85fbc3c4eb1074efde3659900699cb029480d
  Author: Quentin Armitage <[email protected]>
  Date:   2016-11-02 (Wed, 02 Nov 2016)

  Changed paths:
    M keepalived/core/global_parser.c

  Log Message:
  -----------
  Use TIMER_HZ where appropriate

Signed-off-by: Quentin Armitage <[email protected]>


  Commit: ed5a8721249d230ca1f27ea4f317538dc5d31834
      https://github.com/acassen/keepalived/commit/ed5a8721249d230ca1f27ea4f317538dc5d31834
  Author: Quentin Armitage <[email protected]>
  Date:   2016-11-02 (Wed, 02 Nov 2016)

  Changed paths:
    M keepalived/check/check_http.c

  Log Message:
  -----------
  Fix comment and error message re http write timeout

When the code was first added in v0.3.6, the comment referred to a read
timeout, but it was handling and reporting a write timeout.

In v0.4.9, the error message was changed to match the comment, rather
than the other way around.

Signed-off-by: Quentin Armitage <[email protected]>


  Commit: 371edd345edf98069666ab0f0dcd4d0de13f56a3
      https://github.com/acassen/keepalived/commit/371edd345edf98069666ab0f0dcd4d0de13f56a3
  Author: Quentin Armitage <[email protected]>
  Date:   2016-11-02 (Wed, 02 Nov 2016)

  Changed paths:
    M lib/parser.c
    M lib/vector.c
    M lib/vector.h

  Log Message:
  -----------
  Resolve compiler conversion warnings introduced in commit be7ae80

Signed-off-by: Quentin Armitage <[email protected]>


  Commit: 8e420c6f023885d398d55bf89dd0152de34da6f5
      https://github.com/acassen/keepalived/commit/8e420c6f023885d398d55bf89dd0152de34da6f5
  Author: Quentin Armitage <[email protected]>
  Date:   2016-11-02 (Wed, 02 Nov 2016)

  Changed paths:
    M keepalived/core/global_data.c
    M keepalived/core/snmp.c
    M keepalived/vrrp/vrrp_snmp.c

  Log Message:
  -----------
  Apply patch submitted in pull request #447 with some slight changes

Pull request #447 included some patches for some clear errors, but
one or two slight modifications were required.

This patch includes those modifications, but doesn't yet include
adding '{' and '}' to the OID definitions.

Originally-submitted-by: Anthony Dempsey <[email protected]>
Signed-off-by: Quentin Armitage <[email protected]>


  Commit: 967b7e9f0352d921328f1c52640582379114b66a
      https://github.com/acassen/keepalived/commit/967b7e9f0352d921328f1c52640582379114b66a
  Author: Rolf Fokkens <[email protected]>
  Date:   2016-11-03 (Thu, 03 Nov 2016)

  Changed paths:
    M keepalived/include/vrrp_scheduler.h
    M keepalived/vrrp/vrrp.c
    M keepalived/vrrp/vrrp_parser.c
    M keepalived/vrrp/vrrp_scheduler.c

  Log Message:
  -----------
  More verbose logging on (effective) priorities pt. 2


  Commit: 66e4e644441dce424145370e4b0ef538ae806249
      https://github.com/acassen/keepalived/commit/66e4e644441dce424145370e4b0ef538ae806249
  Author: Quentin Armitage <[email protected]>
  Date:   2016-11-03 (Thu, 03 Nov 2016)

  Changed paths:
    M keepalived/include/vrrp_scheduler.h
    M keepalived/vrrp/vrrp.c
    M keepalived/vrrp/vrrp_parser.c
    M keepalived/vrrp/vrrp_scheduler.c

  Log Message:
  -----------
  Update commit 967b7e9 in line with comments in original pull request

Signed-off-by: Quentin Armitage <[email protected]>


  Commit: 95c6aadaafc738aaeeb9ba094cee888be12b60f8
      https://github.com/acassen/keepalived/commit/95c6aadaafc738aaeeb9ba094cee888be12b60f8
  Author: Quentin Armitage <[email protected]>
  Date:   2016-11-03 (Thu, 03 Nov 2016)

  Changed paths:
    M configure
    M configure.ac

  Log Message:
  -----------
  Change configure option --enable-snmp-keepalived to --enable-snmp-vrrp

The option was enabling snmp for vrrp, not all of keepalived (the
--enable-snmp option does that), so this commit renames it to reflect
what it is actually doing.

The --enable-snmp-keepalived option is retained but marked as obsolete.

Signed-off-by: Quentin Armitage <[email protected]>


  Commit: 7134088bcaff545023c13a3f5f9311552399082e
      https://github.com/acassen/keepalived/commit/7134088bcaff545023c13a3f5f9311552399082e
  Author: Quentin Armitage <[email protected]>
  Date:   2016-11-03 (Thu, 03 Nov 2016)

  Changed paths:
    M configure
    M configure.ac

  Log Message:
  -----------
  Use AS_HELP_STRING autoconf macro

Signed-off-by: Quentin Armitage <[email protected]>


  Commit: 1fd2845bf0642bc9759d1f8880020105d163a11e
      https://github.com/acassen/keepalived/commit/1fd2845bf0642bc9759d1f8880020105d163a11e
  Author: Quentin Armitage <[email protected]>
  Date:   2016-11-03 (Thu, 03 Nov 2016)

  Changed paths:
    M genhash/main.c
    M keepalived/check/check_daemon.c
    M keepalived/check/check_misc.c
    M keepalived/core/main.c
    M keepalived/vrrp/vrrp_daemon.c
    M keepalived/vrrp/vrrp_scheduler.c
    M lib/notify.c
    M lib/notify.h
    M lib/signals.c
    M lib/signals.h

  Log Message:
  -----------
  Merge remote-tracking branch 'upstream/master'


  Commit: f5e29270191384a7150da78b6296a4f7b82b10fe
      https://github.com/acassen/keepalived/commit/f5e29270191384a7150da78b6296a4f7b82b10fe
  Author: Quentin Armitage <[email protected]>
  Date:   2016-11-03 (Thu, 03 Nov 2016)

  Changed paths:
    M genhash/main.c
    M keepalived/check/check_daemon.c
    M keepalived/check/check_misc.c
    M keepalived/core/main.c
    M keepalived/vrrp/vrrp_daemon.c
    M keepalived/vrrp/vrrp_scheduler.c
    M lib/notify.c
    M lib/notify.h
    M lib/signals.c
    M lib/signals.h

  Log Message:
  -----------
  Merge branch 'master' into fixes


  Commit: bf025ef4655a422201ff4206a4773c5bcb5f34a6
      https://github.com/acassen/keepalived/commit/bf025ef4655a422201ff4206a4773c5bcb5f34a6
  Author: Quentin Armitage <[email protected]>
  Date:   2016-11-03 (Thu, 03 Nov 2016)

  Changed paths:
    M keepalived/check/check_misc.c
    M keepalived/include/check_misc.h
    M keepalived/include/vrrp_track.h
    M keepalived/vrrp/vrrp_scheduler.c

  Log Message:
  -----------
  Add forcing termination of children of scripts if script times out

Commits fe9638b..cebfbf5 resolved problems around forced termination
of scripts if they didn't terminate within the proscribed time. During
the development of the patches, it was identified that after a script
had been terminated by SIGTERM, any child processes created by the
script also need to be kill.

This commit adds the forced termination of any such children.

Signed-off-by: Quentin Armitage <[email protected]>


  Commit: 5cc4c097913f6c833840c80a94a05e7c22cb7db7
      https://github.com/acassen/keepalived/commit/5cc4c097913f6c833840c80a94a05e7c22cb7db7
  Author: pqarmitage <[email protected]>
  Date:   2016-11-03 (Thu, 03 Nov 2016)

  Changed paths:
    M configure
    M configure.ac
    M keepalived/check/check_api.c
    M keepalived/check/check_data.c
    M keepalived/check/check_http.c
    M keepalived/check/check_misc.c
    M keepalived/check/check_parser.c
    M keepalived/core/global_data.c
    M keepalived/core/global_parser.c
    M keepalived/core/snmp.c
    M keepalived/include/check_misc.h
    M keepalived/include/vrrp_track.h
    M keepalived/vrrp/vrrp.c
    M keepalived/vrrp/vrrp_data.c
    M keepalived/vrrp/vrrp_ipaddress.c
    M keepalived/vrrp/vrrp_iproute.c
    M keepalived/vrrp/vrrp_iprule.c
    M keepalived/vrrp/vrrp_parser.c
    M keepalived/vrrp/vrrp_scheduler.c
    M keepalived/vrrp/vrrp_snmp.c
    M keepalived/vrrp/vrrp_track.c
    M lib/parser.c
    M lib/vector.c
    M lib/vector.h

  Log Message:
  -----------
  Merge pull request #448 from pqarmitage/fixes

Resolve segfaults during configuration parsing and add 4 uses of defines and apply some outstanding pull requests that needed conflict resolution or minor tweaks.


Compare: https://github.com/acassen/keepalived/compare/dc85fdfc739b...5cc4c097913f

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi

_______________________________________________
Keepalived-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.