Commit Graph
27 Commits
Author SHA1 Message Date
Matthias Radestock 3b3d5e6261 document mac_cache max age constraint 2014-12-18 18:21:31 +00:00
Matthias Radestock 1b140e3aa9 don't enter src MACs of forwarded packets in our cache
There is no point, and it populates the cache with entries we don't
need. Local containers will still need to issue an ARP request when
they first talk to an IP corresponding to the MAC, so we learn about
the MAC at that point, just as normally happens.
2014-12-18 17:39:01 +00:00
Matthias Radestock 801b2f6761 refactor for consistency 2014-12-13 10:19:17 +00:00
Matthias Radestock 9ecef5e458 refactor 2014-12-12 14:39:14 +00:00
rade 8dfdeb3eff Merge pull request #271 from bboreham/258_rebuild_routes
Move call to Topology.RebuildRoutes

Closes #258
2014-12-12 14:34:52 +00:00
Bryan Boreham 4c88eb48c0 Move call to Topology.RebuildRoutes
It doesn't belong in handleBroadcastTCP(), so moved it up
to the two places that cause that function to be called.
2014-12-11 00:50:45 +00:00
Bryan Boreham 3a684ba3a9 Fixed typo in error message 2014-12-05 17:44:41 +00:00
Bryan Boreham 4eeeabcf56 Cosmetic changes applied by 2014-12-01 16:51:16 +00:00
Matthias Radestock 9e2123fa4e Merge branch 'master' into refactor_and_explain_route_calculation 2014-12-01 13:50:34 +00:00
Matthias Radestock 89317a24ee oops 2014-12-01 12:56:02 +00:00
Matthias Radestock 37eb2a4598 fix typo 2014-12-01 11:04:51 +00:00
Matthias Radestock c4a64c8649 refactor and explain route calculation
This was rather impenetrable and had some significant code
duplication. So add some words of explanation, and refactor to remove
the duplication.
Some fly-by fixing of minor bug too: buildUnicastRoutes failed to
exclude asymmetric connections from the first hop.
2014-11-30 16:04:55 +00:00
Matthias Radestock 89a1e0fb24 eliminate a deadlock
Golang locks aren't re-entrant. As result one can get deadlocks on
RWMutexes like this:

goroutine #1: attempt to acquire read lock -> success
goroutine #2: attempt to acquire write lock -> wait
goroutine #1: attempt to acquire read lock again -> wait

(a pending write lock prevents subsequent acquisitions of read locks)

Peer.HasPathTo could run into this since it could attempt to acquire
the read lock on a peer multiple times if previously it had
encountered that peer via an asymmetric connection.
2014-11-30 15:48:46 +00:00
Bryan Boreham 997e6ed2b9 squash two ifs together 2014-11-14 14:28:45 +00:00
Bryan Boreham 57aecb868f Add check during initial handshake whether we already have an established connection to this peer 2014-11-14 14:02:33 +00:00
Matthias Radestock f9f29bbe42 refactor: reduce indent 2014-11-12 19:24:06 +00:00
Matthias Radestock 58efafd44e add explanation for why we don't use async send 2014-11-12 08:26:44 +00:00
Matthias Radestock acbabc4f9e s/StatusPort/HttpPort
since we are adding functionality other than status
2014-10-27 08:22:22 +00:00
Matthias Radestock 83464a38eb remove explicit multicast detection
We don't need. Multicast addresses never appear as sources and hence
never end up in the peer_cache. And the router always broadcasts
frames with destination addresses that aren't in the peer cache.
2014-10-24 14:30:58 +01:00
Bryan Boreham 9b90e119e5 Say 'name' instead of 'identity' in log and status 2014-10-24 11:38:10 +01:00
Matthias Radestock 4ddfc47448 don't trip over truncated udp packets
and log such events, plus any other errors during decoding, nicely,
including the connection on which this occured.

Closes #123.
2014-10-15 21:03:15 +01:00
Bryan Boreham e8ec9e84ce clarify messages used on connection errors 2014-10-15 19:34:43 +01:00
Matthias Radestock d1de3eac3e log something when we drop a UDP packet 2014-10-15 15:56:23 +01:00
Matthias Radestock 5acefd5d23 refactor: reduce indent 2014-10-15 15:55:44 +01:00
Matthias Radestock 4ffd15206b remove outdated comment 2014-10-15 15:41:29 +01:00
Matthias Radestock a587fef9c4 fix package name following move 2014-10-15 15:20:49 +01:00
Matthias Radestock e2fd1fda31 move router code 2014-10-15 15:07:42 +01:00