ipv4/6: fixed crossing link fields from different hash tables.

Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
This commit is contained in:
Alexander Andreev 2017-03-19 14:29:14 +03:00 committed by Axel Dörfler
parent d8ce1a9fad
commit 19d8e4f73c
4 changed files with 6 additions and 2 deletions

View File

@ -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(); }
};

View File

@ -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<typename Addressing>

View File

@ -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(); }
};

View File

@ -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;
};