The following commit has been merged in the master branch:
commit de7607d5f8bed4143c5f1fc94ccd424e1f1875a0
Author: Antonio Quartulli <ordex(a)autistici.org>
Date: Sun May 8 20:52:57 2011 +0200
batman-adv: move neigh_node->if_incoming->if_status check in find_router()
Every time that find_router() is invoked, if_status has to be compared with
IF_ACTIVE. Moving this comparison inside find_router() will avoid to write it
each time.
Signed-off-by: Antonio Quartulli <ordex(a)autistici.org>
diff --git a/routing.c b/routing.c
index bb1c3ec..8c403ce 100644
--- a/routing.c
+++ b/routing.c
@@ -1240,6 +1240,9 @@ struct neigh_node *find_router(struct bat_priv *bat_priv,
router = find_ifalter_router(primary_orig_node, recv_if);
return_router:
+ if (router && router->if_incoming->if_status != IF_ACTIVE)
+ goto err_unlock;
+
rcu_read_unlock();
return router;
err_unlock:
diff --git a/unicast.c b/unicast.c
index 19c3daf..bab6076 100644
--- a/unicast.c
+++ b/unicast.c
@@ -314,9 +314,6 @@ find_router:
if (!neigh_node)
goto out;
- if (neigh_node->if_incoming->if_status != IF_ACTIVE)
- goto out;
-
if (my_skb_head_push(skb, sizeof(struct unicast_packet)) < 0)
goto out;
--
batman-adv
The following commit has been merged in the master branch:
commit ef0df12cf3921e110e934f73ce756beb2db9de2d
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Mon May 9 10:15:32 2011 +0200
batman-adv: Fix build with linux 2.6.25-2.6.27
We must prevent that IPPROTO_UDP gets redefined using compat.h.
Otherwise the build will fail when including things like net/addrconf.h
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/compat.c b/compat.c
index 70de376..586898f 100644
--- a/compat.c
+++ b/compat.c
@@ -1,3 +1,4 @@
+#include <linux/in.h>
#include <linux/version.h>
#include "main.h"
--
batman-adv
The following commit has been merged in the next branch:
commit be706a4ba1a0679c53a382f771a8c313b296b1ac
Merge: 2e8bad33846faecd76e5abfa010f964dbccdd77e fea56a5a21183df396a77dc559ba6e5a70d8f7fa
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sun May 8 15:09:00 2011 +0200
Merge branch 'master' into next
diff --combined main.h
index e939913,3ca3941..6259acb
--- a/main.h
+++ b/main.h
@@@ -27,23 -27,25 +27,25 @@@
#define DRIVER_DESC "B.A.T.M.A.N. advanced"
#define DRIVER_DEVICE "batman-adv"
-#define SOURCE_VERSION "devel"
+#define SOURCE_VERSION "next"
/* B.A.T.M.A.N. parameters */
#define TQ_MAX_VALUE 255
#define JITTER 20
- #define TTL 50 /* Time To Live of broadcast messages */
- #define PURGE_TIMEOUT 200 /* purge originators after time in seconds if no
- * valid packet comes in -> TODO: check
- * influence on TQ_LOCAL_WINDOW_SIZE */
- #define LOCAL_HNA_TIMEOUT 3600 /* in seconds */
+ /* Time To Live of broadcast messages */
+ #define TTL 50
- #define TQ_LOCAL_WINDOW_SIZE 64 /* sliding packet range of received originator
- * messages in squence numbers (should be a
- * multiple of our word size) */
+ /* purge originators after time in seconds if no valid packet comes in
+ * -> TODO: check influence on TQ_LOCAL_WINDOW_SIZE */
+ #define PURGE_TIMEOUT 200
+ #define TT_LOCAL_TIMEOUT 3600 /* in seconds */
+
+ /* sliding packet range of received originator messages in squence numbers
+ * (should be a multiple of our word size) */
+ #define TQ_LOCAL_WINDOW_SIZE 64
#define TQ_GLOBAL_WINDOW_SIZE 5
#define TQ_LOCAL_BIDRECT_SEND_MINIMUM 1
#define TQ_LOCAL_BIDRECT_RECV_MINIMUM 1
@@@ -55,21 -57,20 +57,20 @@@
#define VIS_INTERVAL 5000 /* 5 seconds */
- /* how much worse secondary interfaces may be to
- * to be considered as bonding candidates */
-
+ /* how much worse secondary interfaces may be to be considered as bonding
+ * candidates */
#define BONDING_TQ_THRESHOLD 50
- #define MAX_AGGREGATION_BYTES 512 /* should not be bigger than 512 bytes or
- * change the size of
- * forw_packet->direct_link_flags */
+ /* should not be bigger than 512 bytes or change the size of
+ * forw_packet->direct_link_flags */
+ #define MAX_AGGREGATION_BYTES 512
#define MAX_AGGREGATION_MS 100
#define SOFTIF_NEIGH_TIMEOUT 180000 /* 3 minutes */
+ /* don't reset again within 30 seconds */
#define RESET_PROTECTION_MS 30000
#define EXPECTED_SEQNO_RANGE 65536
- /* don't reset again within 30 seconds */
#define MESH_INACTIVE 0
#define MESH_ACTIVE 1
@@@ -84,12 -85,13 +85,13 @@@
#ifdef pr_fmt
#undef pr_fmt
#endif
- #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt /* Append 'batman-adv: ' before
- * kernel messages */
+ /* Append 'batman-adv: ' before kernel messages */
+ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
- #define DBG_BATMAN 1 /* all messages related to routing / flooding /
- * broadcasting / etc */
- #define DBG_ROUTES 2 /* route or hna added / changed / deleted */
+ /* all messages related to routing / flooding / broadcasting / etc */
+ #define DBG_BATMAN 1
+ /* route or tt entry added / changed / deleted */
+ #define DBG_ROUTES 2
#define DBG_ALL 3
--
batman-adv
The following commit has been merged in the next branch:
commit 96a3e817e2d9818c1698eae9ef772a204f4505f2
Merge: 3d7670d0745cd58108bc5516d0d5b525927c6cdf 701e35aaefdb351cbb0ccae70339903c4bea5e83
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sun May 8 14:45:34 2011 +0200
Merge branch 'master' into next
Conflicts:
main.h
vis.c
--
batctl
The following commit has been merged in the master branch:
commit 701e35aaefdb351cbb0ccae70339903c4bea5e83
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sun May 8 12:45:46 2011 +0200
batctl: Remove multiline comments from line ending
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/packet.h b/packet.h
index c225c3a..eda9965 100644
--- a/packet.h
+++ b/packet.h
@@ -128,8 +128,7 @@ struct vis_packet {
uint8_t entries; /* number of entries behind this struct */
uint32_t seqno; /* sequence number */
uint8_t ttl; /* TTL */
- uint8_t vis_orig[6]; /* originator that informs about its
- * neighbors */
+ uint8_t vis_orig[6]; /* originator that announces its neighbors */
uint8_t target_orig[6]; /* who should receive this packet */
uint8_t sender_orig[6]; /* who sent or rebroadcasted this packet */
} __packed;
--
batctl
The following commit has been merged in the master branch:
commit 4d910ca11fccfcaffde1c24450e7b7d3750df0b3
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sun May 8 12:45:45 2011 +0200
batman-adv: Remove multiline comments from line ending
It is slightly irritating that comments after a long line span over
multiple lines without any code. It is easier to put them before the
actual code and reduce the number of lines which the eye has to read.
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/main.h b/main.h
index 4832f32..3ca3941 100644
--- a/main.h
+++ b/main.h
@@ -34,16 +34,18 @@
#define TQ_MAX_VALUE 255
#define JITTER 20
-#define TTL 50 /* Time To Live of broadcast messages */
-#define PURGE_TIMEOUT 200 /* purge originators after time in seconds if no
- * valid packet comes in -> TODO: check
- * influence on TQ_LOCAL_WINDOW_SIZE */
+ /* Time To Live of broadcast messages */
+#define TTL 50
+
+/* purge originators after time in seconds if no valid packet comes in
+ * -> TODO: check influence on TQ_LOCAL_WINDOW_SIZE */
+#define PURGE_TIMEOUT 200
#define TT_LOCAL_TIMEOUT 3600 /* in seconds */
-#define TQ_LOCAL_WINDOW_SIZE 64 /* sliding packet range of received originator
- * messages in squence numbers (should be a
- * multiple of our word size) */
+/* sliding packet range of received originator messages in squence numbers
+ * (should be a multiple of our word size) */
+#define TQ_LOCAL_WINDOW_SIZE 64
#define TQ_GLOBAL_WINDOW_SIZE 5
#define TQ_LOCAL_BIDRECT_SEND_MINIMUM 1
#define TQ_LOCAL_BIDRECT_RECV_MINIMUM 1
@@ -55,21 +57,20 @@
#define VIS_INTERVAL 5000 /* 5 seconds */
-/* how much worse secondary interfaces may be to
- * to be considered as bonding candidates */
-
+/* how much worse secondary interfaces may be to be considered as bonding
+ * candidates */
#define BONDING_TQ_THRESHOLD 50
-#define MAX_AGGREGATION_BYTES 512 /* should not be bigger than 512 bytes or
- * change the size of
- * forw_packet->direct_link_flags */
+/* should not be bigger than 512 bytes or change the size of
+ * forw_packet->direct_link_flags */
+#define MAX_AGGREGATION_BYTES 512
#define MAX_AGGREGATION_MS 100
#define SOFTIF_NEIGH_TIMEOUT 180000 /* 3 minutes */
+/* don't reset again within 30 seconds */
#define RESET_PROTECTION_MS 30000
#define EXPECTED_SEQNO_RANGE 65536
-/* don't reset again within 30 seconds */
#define MESH_INACTIVE 0
#define MESH_ACTIVE 1
@@ -84,12 +85,13 @@
#ifdef pr_fmt
#undef pr_fmt
#endif
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt /* Append 'batman-adv: ' before
- * kernel messages */
+/* Append 'batman-adv: ' before kernel messages */
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-#define DBG_BATMAN 1 /* all messages related to routing / flooding /
- * broadcasting / etc */
-#define DBG_ROUTES 2 /* route or tt entry added / changed / deleted */
+/* all messages related to routing / flooding / broadcasting / etc */
+#define DBG_BATMAN 1
+/* route or tt entry added / changed / deleted */
+#define DBG_ROUTES 2
#define DBG_ALL 3
diff --git a/packet.h b/packet.h
index c225c3a..eda9965 100644
--- a/packet.h
+++ b/packet.h
@@ -128,8 +128,7 @@ struct vis_packet {
uint8_t entries; /* number of entries behind this struct */
uint32_t seqno; /* sequence number */
uint8_t ttl; /* TTL */
- uint8_t vis_orig[6]; /* originator that informs about its
- * neighbors */
+ uint8_t vis_orig[6]; /* originator that announces its neighbors */
uint8_t target_orig[6]; /* who should receive this packet */
uint8_t sender_orig[6]; /* who sent or rebroadcasted this packet */
} __packed;
diff --git a/soft-interface.c b/soft-interface.c
index ae10ecc..c76a33e 100644
--- a/soft-interface.c
+++ b/soft-interface.c
@@ -789,8 +789,8 @@ static void interface_setup(struct net_device *dev)
* have not been initialized yet
*/
dev->mtu = ETH_DATA_LEN;
- dev->hard_header_len = BAT_HEADER_LEN; /* reserve more space in the
- * skbuff for our header */
+ /* reserve more space in the skbuff for our header */
+ dev->hard_header_len = BAT_HEADER_LEN;
/* generate random address */
random_ether_addr(dev_addr);
diff --git a/types.h b/types.h
index 6b6c32e..fab70e8 100644
--- a/types.h
+++ b/types.h
@@ -89,11 +89,11 @@ struct orig_node {
struct hlist_node hash_entry;
struct bat_priv *bat_priv;
unsigned long last_frag_packet;
- spinlock_t ogm_cnt_lock; /* protects: bcast_own, bcast_own_sum,
- * neigh_node->real_bits,
- * neigh_node->real_packet_count */
- spinlock_t bcast_seqno_lock; /* protects bcast_bits,
- * last_bcast_seqno */
+ /* ogm_cnt_lock protects: bcast_own, bcast_own_sum,
+ * neigh_node->real_bits, neigh_node->real_packet_count */
+ spinlock_t ogm_cnt_lock;
+ /* bcast_seqno_lock protects bcast_bits, last_bcast_seqno */
+ spinlock_t bcast_seqno_lock;
atomic_t bond_candidates;
struct list_head bond_list;
};
--
batman-adv