From 19d8e4f73cff0862a80d4d7954a3e0c4da9e40b8 Mon Sep 17 00:00:00 2001 From: Alexander Andreev Date: Sun, 19 Mar 2017 14:29:14 +0300 Subject: [PATCH] ipv4/6: fixed crossing link fields from different hash tables. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Axel Dörfler --- src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp | 2 +- src/add-ons/kernel/network/protocols/ipv4/multicast.h | 2 ++ src/add-ons/kernel/network/protocols/ipv6/ipv6.cpp | 2 +- src/add-ons/kernel/network/protocols/ipv6/multicast.h | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp b/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp index 15011dacfa..2223ae846d 100644 --- a/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp +++ b/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp @@ -156,7 +156,7 @@ struct MulticastStateHash { bool CompareValues(ValueType* value1, ValueType* value2) const { return value1->Interface()->index == value2->Interface()->index && value1->Address().s_addr == value2->Address().s_addr; } - ValueType*& GetLink(ValueType* value) const { return value->HashLink(); } + ValueType*& GetLink(ValueType* value) const { return value->MulticastGroupsHashLink(); } }; diff --git a/src/add-ons/kernel/network/protocols/ipv4/multicast.h b/src/add-ons/kernel/network/protocols/ipv4/multicast.h index 2cdf15fb1f..1c395befa3 100644 --- a/src/add-ons/kernel/network/protocols/ipv4/multicast.h +++ b/src/add-ons/kernel/network/protocols/ipv4/multicast.h @@ -179,6 +179,7 @@ public: }; MulticastGroupInterface*& HashLink() { return fLink; } + MulticastGroupInterface*& MulticastGroupsHashLink() { return fMulticastGroupsLink; } private: // for g++ 2.95 @@ -190,6 +191,7 @@ private: FilterMode fFilterMode; AddressSet fAddresses; MulticastGroupInterface* fLink; + MulticastGroupInterface* fMulticastGroupsLink; }; template diff --git a/src/add-ons/kernel/network/protocols/ipv6/ipv6.cpp b/src/add-ons/kernel/network/protocols/ipv6/ipv6.cpp index cc06ae8d68..37964ac598 100644 --- a/src/add-ons/kernel/network/protocols/ipv6/ipv6.cpp +++ b/src/add-ons/kernel/network/protocols/ipv6/ipv6.cpp @@ -173,7 +173,7 @@ struct MulticastStateHash { bool CompareValues(ValueType* value1, ValueType* value2) const { return value1->Interface()->index == value2->Interface()->index && value1->Address() == value2->Address(); } - ValueType*& GetLink(ValueType* value) const { return value->HashLink(); } + ValueType*& GetLink(ValueType* value) const { return value->MulticastGroupsHashLink(); } }; diff --git a/src/add-ons/kernel/network/protocols/ipv6/multicast.h b/src/add-ons/kernel/network/protocols/ipv6/multicast.h index 4583d205a6..c6cbe5da71 100644 --- a/src/add-ons/kernel/network/protocols/ipv6/multicast.h +++ b/src/add-ons/kernel/network/protocols/ipv6/multicast.h @@ -188,6 +188,7 @@ public: }; MulticastGroupInterface*& HashLink() { return fLink; } + MulticastGroupInterface*& MulticastGroupsHashLink() { return fMulticastGroupsLink; } private: // for g++ 2.95 @@ -199,6 +200,7 @@ private: FilterMode fFilterMode; AddressSet fAddresses; MulticastGroupInterface* fLink; + MulticastGroupInterface* fMulticastGroupsLink; };