Ticket #13211: 0001-fixed-crossing-link-fields-from-different-hash-table.2.patch

File 0001-fixed-crossing-link-fields-from-different-hash-table.2.patch, 3.2 KB (added by Carzil, 7 years ago)
  • src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp

    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 {  
    156156    bool CompareValues(ValueType* value1, ValueType* value2) const
    157157        { return value1->Interface()->index == value2->Interface()->index
    158158            && 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(); }
    160160};
    161161
    162162
  • src/add-ons/kernel/network/protocols/ipv4/multicast.h

    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:  
    179179    };
    180180
    181181    MulticastGroupInterface*& HashLink() { return fLink; }
     182    MulticastGroupInterface*& MulticastGroupsHashLink() { return fMulticastGroupsLink; }
    182183
    183184private:
    184185    // for g++ 2.95
    private:  
    190191    FilterMode fFilterMode;
    191192    AddressSet fAddresses;
    192193    MulticastGroupInterface* fLink;
     194    MulticastGroupInterface* fMulticastGroupsLink;
    193195};
    194196
    195197template<typename Addressing>
  • src/add-ons/kernel/network/protocols/ipv6/ipv6.cpp

    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 {  
    173173    bool CompareValues(ValueType* value1, ValueType* value2) const
    174174        { return value1->Interface()->index == value2->Interface()->index
    175175            && value1->Address() == value2->Address(); }
    176     ValueType*& GetLink(ValueType* value) const { return value->HashLink(); }
     176    ValueType*& GetLink(ValueType* value) const { return value->MulticastGroupsHashLink(); }
    177177};
    178178
    179179
  • src/add-ons/kernel/network/protocols/ipv6/multicast.h

    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:  
    188188    };
    189189
    190190    MulticastGroupInterface*& HashLink() { return fLink; }
     191    MulticastGroupInterface*& MulticastGroupsHashLink() { return fMulticastGroupsLink; }
    191192
    192193private:
    193194    // for g++ 2.95
    private:  
    199200    FilterMode fFilterMode;
    200201    AddressSet fAddresses;
    201202    MulticastGroupInterface* fLink;
     203    MulticastGroupInterface* fMulticastGroupsLink;
    202204};
    203205
    204206