From 11c92e691dc13de66961239f5e2ceef2c8f4dd24 Mon Sep 17 00:00:00 2001 From: Ted Blackman Date: Sun, 12 Jan 2020 13:06:27 -0800 Subject: [PATCH] ames: adjust route update logic There was a typo in the routing logic that was comparing equality against a value where it should have been doing a pattern match. The value compared against contained the literal * gate, which would never match route.peer-state, so this condition was always true, meaning the fix that had added this extra condition (5406f06) did not actually change the behavior from what it been previously. --- bin/solid.pill | 4 ++-- pkg/arvo/sys/vane/ames.hoon | 13 +++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/bin/solid.pill b/bin/solid.pill index 74f3c5d75..5f7e8aade 100644 --- a/bin/solid.pill +++ b/bin/solid.pill @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:db17380940f4f10dab139b385cf5f752282e069b290cdb5255c8510e5cc36ea7 -size 14122439 +oid sha256:c7473fe654d5f3fd04207e9da559bceaf89899f04e9f3897704c4ffc29c90ba9 +size 9617890 diff --git a/pkg/arvo/sys/vane/ames.hoon b/pkg/arvo/sys/vane/ames.hoon index d060625b8..328feb4fc 100644 --- a/pkg/arvo/sys/vane/ames.hoon +++ b/pkg/arvo/sys/vane/ames.hoon @@ -1418,10 +1418,15 @@ ?> =(rcvr-life.shut-packet our-life.channel) :: non-galaxy: update route with heard lane or forwarded lane :: - =? route.peer-state - ?& !=(%czar (clan:title her.channel)) - !=([~ %& *] route.peer-state) - == + =? route.peer-state + ?: =(%czar (clan:title her.channel)) + %.n + =/ is-old-direct=? ?=([~ %& *] route.peer-state) + =/ is-new-direct=? ?=(~ origin.packet) + :: old direct takes precedence over new indirect + :: + |(is-new-direct !is-old-direct) + :: ?~ origin.packet `[direct=%.y lane] `[direct=%.n u.origin.packet]