Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76e0d67a authored by David S. Miller's avatar David S. Miller
Browse files

Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge



Included changes:
- Increase batman-adv version
- Bridge Loop Avoidance: compute checksum (using crc32) on skb fragments instead
  of linearising it
- sort the sysfs documentation
- some other minor cleanups

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents de4594a5 e022b956
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line

What:           /sys/class/net/<iface>/batman-adv/iface_status
Date:           May 2010
Contact:        Marek Lindner <lindner_marek@yahoo.de>
Description:
                Indicates the status of <iface> as it is seen by batman.

What:           /sys/class/net/<iface>/batman-adv/mesh_iface
Date:           May 2010
Contact:        Marek Lindner <lindner_marek@yahoo.de>
@@ -7,8 +13,3 @@ Description:
                displays the batman mesh interface this <iface>
                currently is associated with.
What:           /sys/class/net/<iface>/batman-adv/iface_status
Date:           May 2010
Contact:        Marek Lindner <lindner_marek@yahoo.de>
Description:
                Indicates the status of <iface> as it is seen by batman.
+20 −20
Original line number Diff line number Diff line
@@ -6,6 +6,14 @@ Description:
                Indicates whether the batman protocol messages of the
                mesh <mesh_iface> shall be aggregated or not.

What:           /sys/class/net/<mesh_iface>/mesh/ap_isolation
Date:           May 2011
Contact:        Antonio Quartulli <ordex@autistici.org>
Description:
                Indicates whether the data traffic going from a
                wireless client to another wireless client will be
                silently dropped.

What:           /sys/class/net/<mesh_iface>/mesh/bonding
Date:           June 2010
Contact:        Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
@@ -31,14 +39,6 @@ Description:
                mesh will be fragmented or silently discarded if the
                packet size exceeds the outgoing interface MTU.

What:		/sys/class/net/<mesh_iface>/mesh/ap_isolation
Date:		May 2011
Contact:	Antonio Quartulli <ordex@autistici.org>
Description:
		Indicates whether the data traffic going from a
		wireless client to another wireless client will be
		silently dropped.

What:           /sys/class/net/<mesh_iface>/mesh/gw_bandwidth
Date:           October 2010
Contact:        Marek Lindner <lindner_marek@yahoo.de>
@@ -60,13 +60,6 @@ Description:
                Defines the selection criteria this node will use
                to choose a gateway if gw_mode was set to 'client'.

What:           /sys/class/net/<mesh_iface>/mesh/orig_interval
Date:           May 2010
Contact:        Marek Lindner <lindner_marek@yahoo.de>
Description:
                Defines the interval in milliseconds in which batman
                sends its protocol messages.

What:           /sys/class/net/<mesh_iface>/mesh/hop_penalty
Date:           Oct 2010
Contact:        Linus Lüssing <linus.luessing@web.de>
@@ -74,6 +67,13 @@ Description:
                Defines the penalty which will be applied to an
                originator message's tq-field on every hop.

What:           /sys/class/net/<mesh_iface>/mesh/orig_interval
Date:           May 2010
Contact:        Marek Lindner <lindner_marek@yahoo.de>
Description:
                Defines the interval in milliseconds in which batman
                sends its protocol messages.

What:           /sys/class/net/<mesh_iface>/mesh/routing_algo
Date:           Dec 2011
Contact:        Marek Lindner <lindner_marek@yahoo.de>
+1 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ config BATMAN_ADV
	tristate "B.A.T.M.A.N. Advanced Meshing Protocol"
	depends on NET
	select CRC16
	select LIBCRC32C
        default n
	help
          B.A.T.M.A.N. (better approach to mobile ad-hoc networking) is
+23 −13
Original line number Diff line number Diff line
@@ -77,8 +77,15 @@ static int batadv_compare_backbone_gw(const struct hlist_node *node,
{
	const void *data1 = container_of(node, struct batadv_backbone_gw,
					 hash_entry);
	const struct batadv_backbone_gw *gw1 = data1, *gw2 = data2;

	return (memcmp(data1, data2, ETH_ALEN + sizeof(short)) == 0 ? 1 : 0);
	if (!batadv_compare_eth(gw1->orig, gw2->orig))
		return 0;

	if (gw1->vid != gw2->vid)
		return 0;

	return 1;
}

/* compares address and vid of two claims */
@@ -87,8 +94,15 @@ static int batadv_compare_claim(const struct hlist_node *node,
{
	const void *data1 = container_of(node, struct batadv_claim,
					 hash_entry);
	const struct batadv_claim *cl1 = data1, *cl2 = data2;

	if (!batadv_compare_eth(cl1->addr, cl2->addr))
		return 0;

	if (cl1->vid != cl2->vid)
		return 0;

	return (memcmp(data1, data2, ETH_ALEN + sizeof(short)) == 0 ? 1 : 0);
	return 1;
}

/* free a backbone gw */
@@ -1235,8 +1249,7 @@ int batadv_bla_init(struct batadv_priv *bat_priv)
/**
 * batadv_bla_check_bcast_duplist
 * @bat_priv: the bat priv with all the soft interface information
 * @bcast_packet: encapsulated broadcast frame plus batman header
 * @bcast_packet_len: length of encapsulated broadcast frame plus batman header
 * @skb: contains the bcast_packet to be checked
 *
 * check if it is on our broadcast list. Another gateway might
 * have sent the same packet because it is connected to the same backbone,
@@ -1248,20 +1261,17 @@ int batadv_bla_init(struct batadv_priv *bat_priv)
 * the same host however as this might be intended.
 */
int batadv_bla_check_bcast_duplist(struct batadv_priv *bat_priv,
				   struct batadv_bcast_packet *bcast_packet,
				   int bcast_packet_len)
				   struct sk_buff *skb)
{
	int i, length, curr, ret = 0;
	uint8_t *content;
	uint16_t crc;
	int i, curr, ret = 0;
	__be32 crc;
	struct batadv_bcast_packet *bcast_packet;
	struct batadv_bcast_duplist_entry *entry;

	length = bcast_packet_len - sizeof(*bcast_packet);
	content = (uint8_t *)bcast_packet;
	content += sizeof(*bcast_packet);
	bcast_packet = (struct batadv_bcast_packet *)skb->data;

	/* calculate the crc ... */
	crc = crc16(0, content, length);
	crc = batadv_skb_crc32(skb, (u8 *)(bcast_packet + 1));

	spin_lock_bh(&bat_priv->bla.bcast_duplist_lock);

+2 −4
Original line number Diff line number Diff line
@@ -31,8 +31,7 @@ int batadv_bla_backbone_table_seq_print_text(struct seq_file *seq,
					     void *offset);
int batadv_bla_is_backbone_gw_orig(struct batadv_priv *bat_priv, uint8_t *orig);
int batadv_bla_check_bcast_duplist(struct batadv_priv *bat_priv,
				   struct batadv_bcast_packet *bcast_packet,
				   int hdr_size);
				   struct sk_buff *skb);
void batadv_bla_update_orig_address(struct batadv_priv *bat_priv,
				    struct batadv_hard_iface *primary_if,
				    struct batadv_hard_iface *oldif);
@@ -81,8 +80,7 @@ static inline int batadv_bla_is_backbone_gw_orig(struct batadv_priv *bat_priv,

static inline int
batadv_bla_check_bcast_duplist(struct batadv_priv *bat_priv,
			       struct batadv_bcast_packet *bcast_packet,
			       int hdr_size)
			       struct sk_buff *skb)
{
	return 0;
}
Loading