From 8baa0130f5086fec37ebc23260af2a755f7fdba0 Mon Sep 17 00:00:00 2001
From: Alexander Andreev <carzil@yandex.ru>
Date: Sun, 19 Mar 2017 14:29:14 +0300
Subject: [PATCH] fixed crossing link fields from different hash tables
---
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 15011da..2223ae8 100644
a
|
b
|
struct MulticastStateHash {
|
156 | 156 | bool CompareValues(ValueType* value1, ValueType* value2) const |
157 | 157 | { return value1->Interface()->index == value2->Interface()->index |
158 | 158 | && value1->Address().s_addr == value2->Address().s_addr; } |
159 | | ValueType*& GetLink(ValueType* value) const { return value->HashLink(); } |
| 159 | ValueType*& GetLink(ValueType* value) const { return value->MulticastGroupsHashLink(); } |
160 | 160 | }; |
161 | 161 | |
162 | 162 | |
diff --git a/src/add-ons/kernel/network/protocols/ipv4/multicast.h b/src/add-ons/kernel/network/protocols/ipv4/multicast.h
index 2cdf15f..1c395be 100644
a
|
b
|
public:
|
179 | 179 | }; |
180 | 180 | |
181 | 181 | MulticastGroupInterface*& HashLink() { return fLink; } |
| 182 | MulticastGroupInterface*& MulticastGroupsHashLink() { return fMulticastGroupsLink; } |
182 | 183 | |
183 | 184 | private: |
184 | 185 | // for g++ 2.95 |
… |
… |
private:
|
190 | 191 | FilterMode fFilterMode; |
191 | 192 | AddressSet fAddresses; |
192 | 193 | MulticastGroupInterface* fLink; |
| 194 | MulticastGroupInterface* fMulticastGroupsLink; |
193 | 195 | }; |
194 | 196 | |
195 | 197 | template<typename Addressing> |
diff --git a/src/add-ons/kernel/network/protocols/ipv6/ipv6.cpp b/src/add-ons/kernel/network/protocols/ipv6/ipv6.cpp
index cc06ae8..37964ac 100644
a
|
b
|
struct MulticastStateHash {
|
173 | 173 | bool CompareValues(ValueType* value1, ValueType* value2) const |
174 | 174 | { return value1->Interface()->index == value2->Interface()->index |
175 | 175 | && value1->Address() == value2->Address(); } |
176 | | ValueType*& GetLink(ValueType* value) const { return value->HashLink(); } |
| 176 | ValueType*& GetLink(ValueType* value) const { return value->MulticastGroupsHashLink(); } |
177 | 177 | }; |
178 | 178 | |
179 | 179 | |
diff --git a/src/add-ons/kernel/network/protocols/ipv6/multicast.h b/src/add-ons/kernel/network/protocols/ipv6/multicast.h
index 4583d20..c6cbe5d 100644
a
|
b
|
public:
|
188 | 188 | }; |
189 | 189 | |
190 | 190 | MulticastGroupInterface*& HashLink() { return fLink; } |
| 191 | MulticastGroupInterface*& MulticastGroupsHashLink() { return fMulticastGroupsLink; } |
191 | 192 | |
192 | 193 | private: |
193 | 194 | // for g++ 2.95 |
… |
… |
private:
|
199 | 200 | FilterMode fFilterMode; |
200 | 201 | AddressSet fAddresses; |
201 | 202 | MulticastGroupInterface* fLink; |
| 203 | MulticastGroupInterface* fMulticastGroupsLink; |
202 | 204 | }; |
203 | 205 | |
204 | 206 | |