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

Signed-off-by: Axel Dörfler <[email protected]>
This commit is contained in:
Alexander Andreev
2017-03-21 12:38:55 +01:00
committed by Axel Dörfler
parent d8ce1a9fad
commit 19d8e4f73c
4 changed files with 6 additions and 2 deletions
@@ -156,7 +156,7 @@ struct MulticastStateHash {
bool CompareValues(ValueType* value1, ValueType* value2) const bool CompareValues(ValueType* value1, ValueType* value2) const
{ return value1->Interface()->index == value2->Interface()->index { return value1->Interface()->index == value2->Interface()->index
&& value1->Address().s_addr == value2->Address().s_addr; } && value1->Address().s_addr == value2->Address().s_addr; }
ValueType*& GetLink(ValueType* value) const { return value->HashLink(); } ValueType*& GetLink(ValueType* value) const { return value->MulticastGroupsHashLink(); }
}; };
@@ -179,6 +179,7 @@ public:
}; };
MulticastGroupInterface*& HashLink() { return fLink; } MulticastGroupInterface*& HashLink() { return fLink; }
MulticastGroupInterface*& MulticastGroupsHashLink() { return fMulticastGroupsLink; }
private: private:
// for g++ 2.95 // for g++ 2.95
@@ -190,6 +191,7 @@ private:
FilterMode fFilterMode; FilterMode fFilterMode;
AddressSet fAddresses; AddressSet fAddresses;
MulticastGroupInterface* fLink; MulticastGroupInterface* fLink;
MulticastGroupInterface* fMulticastGroupsLink;
}; };
template<typename Addressing> template<typename Addressing>
@@ -173,7 +173,7 @@ struct MulticastStateHash {
bool CompareValues(ValueType* value1, ValueType* value2) const bool CompareValues(ValueType* value1, ValueType* value2) const
{ return value1->Interface()->index == value2->Interface()->index { return value1->Interface()->index == value2->Interface()->index
&& value1->Address() == value2->Address(); } && value1->Address() == value2->Address(); }
ValueType*& GetLink(ValueType* value) const { return value->HashLink(); } ValueType*& GetLink(ValueType* value) const { return value->MulticastGroupsHashLink(); }
}; };
@@ -188,6 +188,7 @@ public:
}; };
MulticastGroupInterface*& HashLink() { return fLink; } MulticastGroupInterface*& HashLink() { return fLink; }
MulticastGroupInterface*& MulticastGroupsHashLink() { return fMulticastGroupsLink; }
private: private:
// for g++ 2.95 // for g++ 2.95
@@ -199,6 +200,7 @@ private:
FilterMode fFilterMode; FilterMode fFilterMode;
AddressSet fAddresses; AddressSet fAddresses;
MulticastGroupInterface* fLink; MulticastGroupInterface* fLink;
MulticastGroupInterface* fMulticastGroupsLink;
}; };