22 Mar, 2014

4 commits

  • Convert the current documentation for the TT flags in proper
    kerneldoc and improve it by adding an explanation for each
    of the flags.

    Signed-off-by: Antonio Quartulli
    Signed-off-by: Marek Lindner

    Antonio Quartulli
     
  • With this patch a node sends IPv4 multicast packets to nodes which
    have a BATADV_MCAST_WANT_ALL_IPV4 flag set and IPv6 multicast packets
    to nodes which have a BATADV_MCAST_WANT_ALL_IPV6 flag set, too.

    Why is this needed? There are scenarios involving bridges where
    multicast report snooping and multicast TT announcements are not
    sufficient, which would lead to packet loss for some nodes otherwise:

    MLDv1 and IGMPv1/IGMPv2 have a suppression mechanism
    for multicast listener reports. When we have an MLDv1/IGMPv1/IGMPv2
    querier behind a bridge then our snooping bridge is potentially not
    going to see any reports even though listeners exist because according
    to RFC4541 such reports are only forwarded to multicast routers:

    -----------------------------------------------------------
    ---------------
    {Querier}---|Snoop. Switch|----{Listener}
    ---------------
    \ ^
    -------
    | br0 | < ???
    -------
    \
    _-~---~_
    _-~/ ~-_
    ~ batman-adv \-----{Sender}
    \~_ cloud ~/
    -~~__-__-~_/

    I) MLDv1 Query: {Querier} -> flooded
    II) MLDv1 Report: {Listener} -> {Querier}

    -> br0 cannot detect the {Listener}
    => Packets from {Sender} need to be forwarded to all
    detected listeners and MLDv1/IGMPv1/IGMPv2 queriers.

    -----------------------------------------------------------

    Note that we do not need to explicitly forward to MLDv2/IGMPv3 queriers,
    because these protocols have no report suppression: A bridge has no
    trouble detecting MLDv2/IGMPv3 listeners.

    Even though we do not support bridges yet we need to provide the
    according infrastructure already to not break compatibility later.

    Signed-off-by: Linus Lüssing
    Signed-off-by: Marek Lindner
    Signed-off-by: Antonio Quartulli

    Linus Lüssing
     
  • With this patch a node may additionally perform the dropping or
    unicasting behaviour for a link-local IPv4 and link-local-all-nodes
    IPv6 multicast packet, too.

    The extra counter and BATADV_MCAST_WANT_ALL_UNSNOOPABLES flag is needed
    because with a future bridge snooping support integration a node with a
    bridge on top of its soft interface is not able to reliably detect its
    multicast listeners for IPv4 link-local and the IPv6
    link-local-all-nodes addresses anymore (see RFC4541, section 2.1.2.2
    and section 3).

    Even though this new flag does make "no difference" now, it'll ensure
    a seamless integration of multicast bridge support without needing to
    break compatibility later.

    Also note, that even with multicast bridge support it won't be possible
    to optimize 224.0.0.x and ff02::1 towards nodes with bridges, they will
    always receive these ranges.

    Signed-off-by: Linus Lüssing
    Signed-off-by: Marek Lindner
    Signed-off-by: Antonio Quartulli

    Linus Lüssing
     
  • If the soft interface of a node is not part of a bridge then a node
    announces a new multicast TVLV: The existence of this TVLV
    signalizes that this node is announcing all of its multicast listeners
    via the translation table infrastructure.

    Signed-off-by: Linus Lüssing
    Signed-off-by: Marek Lindner
    Signed-off-by: Antonio Quartulli

    Linus Lüssing
     

12 Jan, 2014

1 commit


09 Jan, 2014

2 commits

  • A client sending packets which mark matches the value
    configured via sysfs has to be identified as isolated using
    the TT_CLIENT_ISOLA flag.

    The match is mask based, meaning that only bits set in the
    mask are compared with those in the mark value.

    If the configured mask is equal to 0 no operation is
    performed.

    Such flag is then advertised within the classic client
    announcement mechanism.

    Signed-off-by: Antonio Quartulli
    Signed-off-by: Marek Lindner

    Antonio Quartulli
     
  • As suggested by checkpatch, remove all the references to the
    FSF address since the kernel already has one reference in
    its documentation.

    In this way it is easier to update it in case of future
    changes.

    Signed-off-by: Antonio Quartulli
    Signed-off-by: Marek Lindner

    Antonio Quartulli
     

28 Dec, 2013

5 commits


23 Oct, 2013

2 commits

  • Instead of handling icmp packets only up to length of icmp_packet_rr,
    the code should handle any icmp length size. Therefore the length
    truncating is moved to when the packet is actually sent to userspace
    (this does not support lengths longer than icmp_packet_rr yet). Longer
    packets are forwarded without truncating.

    This patch also cleans up some parts where the icmp header struct could
    be used instead of other icmp_packet(_rr) structs to make the code more
    readable.

    Signed-off-by: Simon Wunderlich
    Signed-off-by: Marek Lindner
    Signed-off-by: Antonio Quartulli

    Simon Wunderlich
     
  • Flags covered by TT_SYNC_MASK are kept in sync among the
    nodes in the network and therefore they have to be
    considered while computing the global/local table CRC.

    In this way a generic originator is able to understand if
    its table contains the correct flags or not.

    Bits from 4 to 7 in the TT flags fields are now reserved for
    "synchronized" flags only.

    This allows future developers to add more flags of this type
    without breaking compatibility.

    It's important to note that not all the remote TT flags are
    synchronised. This comes from the fact that some flags are
    used to inject an information once only.

    Signed-off-by: Antonio Quartulli
    Signed-off-by: Marek Lindner

    Antonio Quartulli
     

20 Oct, 2013

1 commit

  • This change allows nodes to handle the TT table on a
    per-VLAN basis. This is needed because nodes may have to
    store only some of the global entries advertised by another
    node.

    In this scenario such nodes would re-create only a partial
    global table and would not be able to compute a correct CRC
    anymore.

    This patch splits the logic and introduces one CRC per VLAN.
    In this way a node fetching only some entries belonging to
    some VLANs is still able to compute the needed CRCs and
    still check the table correctness.

    With this patch the shape of the TVLV-TT is changed too
    because now a node needs to advertise all the CRCs of all
    the VLANs that it is wired to.

    The debug output of the local Translation Table now shows
    the CRC along with each entry since there is not a common
    value for the entire table anymore.

    Signed-off-by: Antonio Quartulli
    Signed-off-by: Marek Lindner

    Antonio Quartulli
     

19 Oct, 2013

1 commit


12 Oct, 2013

3 commits

  • the icmp and the icmp_rr packets share the same initial
    fields since they use the same code to be processed and
    forwarded.

    Extract the common fields and put them into a separate
    struct so that future ICMP packets can be easily added
    without bloating the packet definition.

    However, keep the seqno field outside of the newly created
    common header because future ICMP types may require a
    bigger sequence number space.

    This change breaks compatibility due to fields reordering
    in the ICMP headers.

    Signed-off-by: Antonio Quartulli
    Signed-off-by: Marek Lindner

    Antonio Quartulli
     
  • Fragments arriving at their destination are buffered for later merge.
    Merged packets are passed to the main receive function as had they never
    been fragmented.

    Fragments are forwarded without merging if the MTU of the outgoing
    interface is smaller than the size of the merged packet.

    Signed-off-by: Martin Hundebøll
    Signed-off-by: Marek Lindner
    Signed-off-by: Antonio Quartulli

    Martin Hundebøll
     
  • Remove the existing fragmentation code before adding the new version
    and delete unicast.{h,c}.

    batadv_unicast_send_skb() is moved to send.c and renamed to
    batadv_send_skb_unicast().

    fragmentation entry in sysfs (bat_priv->fragmentation) is kept for use in
    the new fragmentation code.

    BATADV_UNICAST_FRAG packet type is renamed to BATADV_FRAG for use in the
    new fragmentation code.

    Signed-off-by: Martin Hundebøll
    Signed-off-by: Marek Lindner
    Signed-off-by: Antonio Quartulli

    Martin Hundebøll
     

10 Oct, 2013

14 commits


27 Mar, 2013

1 commit

  • Add a htonl() in network_coding.c when reading the sequence number
    from received ogm_packet, to avoid wrong byte ordering when comparing
    with a host value. This bug was introduced in
    3ed7ada3f0bbcd058567bc0a8f9729a73eba7db6 ("batman-adv: network coding -
    detect coding nodes and remove these after timeout").

    Change the type of coded_packet->coded_len from uint16 to __be16 to
    avoid wrong assumptions about endianness in later uses. Introduced in
    c3289f3650d34b60296000a629c99f2488f7c3dd ("batman-adv: network coding -
    code and transmit packets if possible").

    Reported-by: Fengguang Wu
    Signed-off-by: Martin Hundebøll
    Signed-off-by: Marek Lindner
    Signed-off-by: Antonio Quartulli

    Martin Hundebøll
     

14 Mar, 2013

1 commit

  • Before adding forward-skbs to the coding buffer, the buffer is searched
    for a potential coding opportunity. If one is found, the two packets are
    network coded and transmitted right away. If not, the forward-skb is
    added to the buffer.

    Network coded packets are transmitted with information about the two
    receivers and the two coded packets. The first receiver is given by the
    MAC header, while the second is given in the payload/bat-header. The
    second receiver uses promiscuous mode to receive the packet and check
    the second destination.

    Signed-off-by: Martin Hundebøll
    Signed-off-by: Marek Lindner
    Signed-off-by: Antonio Quartulli

    Martin Hundebøll
     

19 Jan, 2013

1 commit


30 Nov, 2012

1 commit


21 Nov, 2012

1 commit

  • All packet headers in front of an ethernet header have to be completely
    divisible by 2 but not by 4 to make the payload after the ethernet header again
    4 bytes boundary aligned.

    A packing of 2 is necessary to avoid extra padding at the end of the struct
    caused by a structure member which is larger than two bytes. Otherwise the
    structure would not fulfill the previously mentioned rule to avoid the
    misalignment of the payload after the ethernet header. It may also lead to
    leakage of information when the padding it not initialized before sending.

    Signed-off-by: Sven Eckelmann
    Signed-off-by: Marek Lindner
    Signed-off-by: Antonio Quartulli

    Sven Eckelmann
     

08 Nov, 2012

2 commits

  • ARP messages are now parsed to make it possible to trigger special actions
    depending on their types (snooping).

    Signed-off-by: Antonio Quartulli

    Antonio Quartulli
     
  • The current unicast packet type does not contain the orig source address. This
    patches add a new unicast packet (called UNICAST_4ADDR) which provides two new
    fields: the originator source address and the subtype (the type of the data
    contained in the packet payload). The former is useful to identify the node
    which injected the packet into the network and the latter is useful to avoid
    creating new unicast packet types in the future: a macro defining a new subtype
    will be enough.

    Signed-off-by: Antonio Quartulli

    Antonio Quartulli