15 Commits
Author SHA1 Message Date
Peter Bourgon e27b320ede Update import location for mesh 2016-01-15 15:57:01 +01:00
Matthias Radestock dc9f8762ca move generic communication substrate into its own 'mesh' package
This is mostly a matter of moving some files, changing package names,
changing some imports, and changing some type references.

We duplicate the odd constant & global var, and the intmac/macint
functions, since neither 'router' or 'mesh' nor, really,' common' are
a natural home for them.
2015-11-09 16:37:39 +00:00
Matthias Radestock 8bd77c0d47 refactor: get rid of router/utils.go
most functions end up in other files in the router package, but a few
land in common.
2015-11-07 15:45:29 +00:00
David Wragg d2dfb0d15d Do InvalidateRoutes when a forwarded packet updates a MAC cache entry
When we get a forwarded packet, we put its source MAC into the MAC cache,
overriding any existing entry.  But we could have a flow which says
to forward packets destined to that MAC based on the old entry.  Such
a flow could be prolonged indefinitely by attempts to send to the MAC.
This is obviously bad, so do InvalidateRoutes in such cases.
2015-10-21 13:46:18 +01:00
David Wragg f7ce6a1fdb Injected packets shouldn't happen in handleCapturedPacket
Check for them just in case, but don't take an extra lock to do it.
2015-09-08 10:46:04 +01:00
David Wragg c2ad4c5633 Flows
For fast datapath, the router core will only be invoked upon datapath
misses.  And it needs to yield routing decisions in a form that can be
used to configure the in-kernel datapath.  So here we make the router
core yield FlowOps, which represent operations which actually do
something with a packet.  The router core obtains these in turn from
the Bridge or the Overlay, depending on what it wants to do with
a packet.

For fast datapath, it's critical that the router makes decisions based
only on the required packet header information (as the same header
information will be used when configuring the ODP flow rules).  So we
pass only that information into the router core, in the form of
PacketKeys.

The overall effect is to curry the router core: Rather than taking a
packet and doing something with it, it takes packet header information
and returns a function that does something with a packet.
2015-09-08 10:44:52 +01:00
Adam Harrison fc9a1c8664 new weave status, weave status ..., and weave report 2015-08-11 12:15:13 +01:00
David Wragg d6bceb139e Eliminate MacCache Start method 2015-06-23 16:08:43 +01:00
Matthias Radestock 0cbbe9bac3 make Peer.String() return the common case
When we want a string representation of a Peer, we nearly always just
want the full name. So make String() return that and introduce Info()
to return expanded info.
2015-05-10 23:58:23 +01:00
Matthias Radestock 33520ea230 include peer nickname in display output whenever possible 2015-03-27 05:25:28 +00:00
Matthias Radestock e3ef5433cf cosmetic: linting 2015-03-27 00:43:26 +00:00
Matthias Radestock 45740b1419 refactor: replace buf.WriteString(fmt.S*(...)) with fmt.F*(&buf,...)
shorter and more efficient
2015-03-26 14:20:28 +00:00
Matthias Radestock 24bd0a9a75 refactor: separate MacCache creation from activation 2015-01-19 16:45:06 +00: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