]> Cypherpunks.ru repositories - nncp.git/commitdiff
Do not relay to area message's originator
authorSergey Matveev <stargrave@stargrave.org>
Thu, 8 Jul 2021 10:42:00 +0000 (13:42 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 8 Jul 2021 17:14:42 +0000 (20:14 +0300)
doc/multicast.texi
doc/news.ru.texi
doc/news.texi
src/toss.go

index c14f58ead26a18ec1177001dbb4e5334e25f3471..36e8bf9d53390523881d81337294c1e9105cf658 100644 (file)
@@ -137,9 +137,6 @@ If @code{nodeD} will receive packet from the @code{nodeB} first, it will
 relay it to the @code{nodeA} also, that will silently remove it when
 tossing, because it was already seen.
 
-@strong{TODO}: we must not relay packet to the node also presenting as
-the sender of the area's message. Obviously it has seen it.
-
 @item
 When @code{nodeC} sends message to the area, then @code{nodeA} will
 receive it twice from @code{nodeB} and @code{nodeD}, ignoring one of
index d2eae5bba8d3828cf2719e72491d6db466d6eacf..4f87e6407e92eeb7c795f6b42735f5cf1aff66c4 100644 (file)
 Если у целевой ноды транзитного пакета задан @option{via} маршрут, то
 использовать его, а не игнорировать.
 
+@item
+Не отправлять multicast пакет оригинатору сообщения, очевидно точно
+видящего свой собственный пакет.
+
 @end itemize
 
 @node Релиз 7.1.1
index 6f0a8c3299a291a8a0db9d5bffe490d3067ceb88..ba822d2b08c58209b0f93522c21b8baa01f565bb 100644 (file)
@@ -14,6 +14,10 @@ See also this page @ref{Новости, on russian}.
 If destination node of transitional packet has non empty @option{via}
 route, then do not ignore, but use it.
 
+@item
+Do not relay multicast packet to area message's originator, that
+obviously has seen its own packet.
+
 @end itemize
 
 @node Release 7_1_1
index 4a447cecadae479e81a15b39ef3d0c350cfed83a..dc5573bd675527fb63084b5b2be2972dfbee130c 100644 (file)
@@ -729,7 +729,7 @@ func jobProcess(
                                        })
                                        continue
                                }
-                               if nodeId != sender.Id {
+                               if nodeId != sender.Id && nodeId != pktEnc.Sender {
                                        ctx.LogI("rx-area-echo", lesEcho, logMsgNode)
                                        if _, err = ctx.Tx(
                                                node, &pkt, nice, int64(pktSize), 0, fullPipeR, pktName, nil,