Skip to content

Commit

Permalink
ipv4/6: fixed crossing link fields from different hash tables.
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
  • Loading branch information
carzil authored and axeld committed Mar 21, 2017
1 parent d8ce1a9 commit 19d8e4f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp
Expand Up @@ -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(); }
};


Expand Down
2 changes: 2 additions & 0 deletions src/add-ons/kernel/network/protocols/ipv4/multicast.h
Expand Up @@ -179,6 +179,7 @@ class MulticastGroupInterface {
};

MulticastGroupInterface*& HashLink() { return fLink; }
MulticastGroupInterface*& MulticastGroupsHashLink() { return fMulticastGroupsLink; }

private:
// for g++ 2.95
Expand All @@ -190,6 +191,7 @@ class MulticastGroupInterface {
FilterMode fFilterMode;
AddressSet fAddresses;
MulticastGroupInterface* fLink;
MulticastGroupInterface* fMulticastGroupsLink;
};

template<typename Addressing>
Expand Down
2 changes: 1 addition & 1 deletion src/add-ons/kernel/network/protocols/ipv6/ipv6.cpp
Expand Up @@ -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(); }
};


Expand Down
2 changes: 2 additions & 0 deletions src/add-ons/kernel/network/protocols/ipv6/multicast.h
Expand Up @@ -188,6 +188,7 @@ class MulticastGroupInterface {
};

MulticastGroupInterface*& HashLink() { return fLink; }
MulticastGroupInterface*& MulticastGroupsHashLink() { return fMulticastGroupsLink; }

private:
// for g++ 2.95
Expand All @@ -199,6 +200,7 @@ class MulticastGroupInterface {
FilterMode fFilterMode;
AddressSet fAddresses;
MulticastGroupInterface* fLink;
MulticastGroupInterface* fMulticastGroupsLink;
};


Expand Down

0 comments on commit 19d8e4f

Please sign in to comment.