1. 31 1月, 2011 1 次提交
    • S
      batman-adv: Calculate correct size for merged packets · ae361ce1
      Sven Eckelmann 提交于
      The routing algorithm must be able to decide if a fragment can be merged with
      the missing part and still be passed to a forwarding interface. The fragments
      can only differ by one byte in case that the original payload had an uneven
      length. In that situation the sender has to inform all possible receivers that
      the tail is one byte longer using the flag UNI_FRAG_LARGETAIL.
      
      The combination of UNI_FRAG_LARGETAIL and UNI_FRAG_HEAD flag makes it possible
      to calculate the correct length for even and uneven sized payloads.
      
      The original formula missed to add the unicast header at all and forgot to
      remove the fragment header of the second fragment. This made the results highly
      unreliable and only useful for machines with large differences between the
      configured MTUs.
      Reported-by: NRussell Senior <russell@personaltelco.net>
      Reported-by: NMarek Lindner <lindner_marek@yahoo.de>
      Signed-off-by: NSven Eckelmann <sven@narfation.org>
      ae361ce1
  2. 16 1月, 2011 1 次提交
    • S
      batman-adv: Use "__attribute__" shortcut macros · aa0adb1a
      Sven Eckelmann 提交于
      Linux 2.6.21 defines different macros for __attribute__ which are also
      used inside batman-adv. The next version of checkpatch.pl warns about
      the usage of __attribute__((packed))).
      
      Linux 2.6.33 defines an extra macro __always_unused which is used to
      assist source code analyzers and can be used to removed the last
      existing __attribute__ inside the source code.
      Signed-off-by: NSven Eckelmann <sven@narfation.org>
      aa0adb1a
  3. 17 12月, 2010 1 次提交
  4. 30 11月, 2010 1 次提交
  5. 21 9月, 2010 1 次提交
  6. 05 9月, 2010 1 次提交
    • A
      Staging: batman-adv: layer2 unicast packet fragmentation · e63760e5
      Andreas Langer 提交于
      This patch implements a simple layer2 fragmentation to allow traffic
      exchange over network interfaces with a MTU smaller than 1500 bytes. The
      fragmentation splits the big packets into two parts and marks the frames
      accordingly. The receiving end buffers the packets to reassemble the
      orignal packet before passing it to the higher layers. This feature
      makes it necessary to modify the batman-adv encapsulation for unicast
      packets by adding a sequence number, flags and the originator address.
      This modifcation is part of a seperate packet type for fragemented
      packets to keep the original overhead as low as possible. This patch
      enables the feature by default to ensure the data traffic can travel
      through the network. But it also prints a warning to notify the user
      about the performance implications.
      
      Note: Fragmentation should be avoided at all costs since it has a
      dramatic impact on the performance, especially when it comes wifi
      networks. Instead of a single packet, 2 packets have to be sent! Not
      only valuable airtime is wasted but also packetloss decreases the
      throughput. A link with 50% packetloss and fragmentation enabled is
      pretty much unusable.
      Signed-off-by: NAndreas Langer <an.langer@gmx.de>
      [sven.eckelmann@gmx.de: Rework on top of current version]
      Signed-off-by: NSven Eckelmann <sven.eckelmann@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e63760e5
  7. 09 7月, 2010 1 次提交
  8. 23 6月, 2010 3 次提交
    • D
      Staging: batman-adv: record route for ICMP messages · e4cb3720
      Daniel Seither 提交于
      The standard layer 3 ping utility can use the record route (RR) option
      of IP to collect route data for sent ping messages (ping -R). This
      patch introduces comparable functionality for batman-adv ICMP messages.
      
      The patch adds a second batman ICMP packet format (icmp_packet_rr) such
      that up to 17 MAC addresses can be recorded (sufficient for up to 8
      hops per direction). When no RR is wanted, the old icmp_packet without
      the RR overhead can be sent.
      Signed-off-by: NDaniel Seither <post@tiwoc.de>
      Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
      [sven.eckelmann@gmx.de: Rework on top of current version]
      Signed-off-by: NSven Eckelmann <sven.eckelmann@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e4cb3720
    • S
      Staging: batman-adv: Add bonding functionality · e35fd5ec
      Simon Wunderlich 提交于
      This patch introduces bonding functionality to batman-advanced, targeted
      for the 0.3 release. As we are able to route the payload traffic as we
      want, we may use multiple interfaces on multihomed hosts to transfer data
      to achieve higher bandwidth. This can be considered as "light Multi Path
      Routing" for single hop connections.
      
      To detect which interfaces of a peer node belong to the same host, a
      new flag PRIMARIES_FIRST_HOP is introduced. This flag is set on the first hop
      of OGMs of the primary (first) interface, which is broadcasted on all
      interfaces. When receiving such an OGM, we can learn which interfaces
      belong to the same host (by assigning them to the primary originator).
      
      Bonding works by sending packets in a round-robin fashion to the available
      interfaces of a neighbor host, if multiple interfaces are available. The
      neighbor interfaces should be almost equally good to reach.
      
      To avoid interferences (i.e. sending on the same channel), only neighbor
      interfaces with different mac addresses and different outgoing interfaces
      are considered as candidates.
      
      Bonding is deactivated by default, and can be activated by
      
      echo 1 > /sys/class/net/bat0/mesh/bonding
      
      for each individual node.
      Signed-off-by: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
      [sven.eckelmann@gmx.de: Rework on top of current version]
      Signed-off-by: NSven Eckelmann <sven.eckelmann@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e35fd5ec
    • S
      Staging: batman-adv: 32bit sequence number and TTL for broadcasts · cf2d72ec
      Simon Wunderlich 提交于
      This patch changes the sequence number range from 8 or 16 bit to 32 bit.
      This should avoid problems with the sequence number sliding window algorithm
      which we had seen in the past for broadcast floods or malicious packet
      injections. We can not assure 100% security with this patch, but it is quite
      an improvement over the old 16 bit sequence numbers:
      
       * expected window size can be increased (4096 -> 65536)
       * 64k packets in the right order would now be needed to cause a loop,
         which seems practically impossible.
      
      Furthermore, a TTL field has been added to the broadcast packet type, just to
      make sure.
      
      These changes required to increase the compatibility level once again.
      Signed-off-by: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
      [sven.eckelmann@gmx.de: Change atomic64_* back to atomic_*, Rework on
      top of current version]
      Signed-off-by: NSven Eckelmann <sven.eckelmann@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      cf2d72ec
  9. 12 5月, 2010 1 次提交
  10. 04 3月, 2010 1 次提交
  11. 12 12月, 2009 1 次提交