Module: check_mk
Branch: master
Commit: 270d2f09622ef46b543c4d2e88bb58f03ad2b156
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=270d2f09622ef4…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Wed Jan 17 09:59:04 2018 +0100
5688 FIX Windows agent: numerous fixes to only_from
The setting only_from was handled improperly in many ways:
* The IPv4 loopback address 127.0.0.1 did not always work in
only_from, depending on what kind of client was used on localhost.
Now if the IPv4 loopback address is given in only_from, the
corresponding IPv6 loopback ::1 is added there to ensure the correct
functionality with different clients on localhost.
* IPv6 addresses converted from only_from IPv4 addresses were not
output in section Check_MK. This was a regression from 1.2.8
introduced in the huge refactoring
c5ee818358e695b01c2f2dbc05ad0713723a37f8.
* IPv6 addresses were output incorrectly in section Check_MK:
* the last colon-separated group was always missing.
* the groups were output as decimal instead of hexadecimal digits.
* the groups were output in network byte order instead of host byte
order, leading to incorrect output.
Change-Id: I0dad7b50d6c9e682734b68338d847c83e2a0a165
---
.werks/5688 | 25 ++++++++++++++
agents/windows/SectionManager.cc | 10 +++---
agents/windows/SectionManager.h | 11 ++++--
agents/windows/WinApi.cc | 2 ++
agents/windows/WinApi.h | 1 +
agents/windows/WinApiAdaptor.h | 1 +
agents/windows/build_version | 2 +-
agents/windows/check_mk_agent.cc | 57 ++++++++++++-------------------
agents/windows/sections/SectionCheckMK.cc | 5 +--
agents/windows/sections/SectionCheckMK.h | 13 +++----
agents/windows/stringutil.cc | 1 +
agents/windows/stringutil.h | 10 +++---
agents/windows/test/MockWinApi.h | 1 +
agents/windows/test/stringutilTest.cc | 38 ++++++++++++++++-----
agents/windows/types.cc | 41 ++++++++++++++++++++--
agents/windows/types.h | 4 +++
16 files changed, 154 insertions(+), 68 deletions(-)
Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=270d2f0962…