mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-08 13:56:09 +02:00
packet/bgp: Add missing __hash__ function
This commit fixes up the commit 7d42aecb, which added __eq__ without adding __hash__ and left some copy-paste error. Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
a7e804fdec
commit
7f38397442
@ -1095,7 +1095,9 @@ class RouteTargetMembershipNLRI(StringifyMixin):
|
||||
def __eq__(self, other):
|
||||
return ((self.origin_as, self.route_target) ==
|
||||
(other.origin_as, other.route_target))
|
||||
return (self.afi, self.safi) == (other.afi, other.safi)
|
||||
|
||||
def __hash__(self):
|
||||
return hash((self.origin_as, self.route_target))
|
||||
|
||||
@classmethod
|
||||
def parser(cls, buf):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user