summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-08-04 13:58:09 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-08-04 13:58:09 +0200
commit7efd6c82cb359b5220134f5e65828a671f4e8b1c (patch)
treeb3d9887166f6695683eedd045ed1557404d977b5 /src
parentef586cf976550dd7877180be0c3b3368db820031 (diff)
downloadbabel-7efd6c82cb359b5220134f5e65828a671f4e8b1c.tar
babel-7efd6c82cb359b5220134f5e65828a671f4e8b1c.zip
There is no reason to keep a hello seqno for each interface separately
Diffstat (limited to 'src')
-rw-r--r--src/babel.h3
-rw-r--r--src/send.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/src/babel.h b/src/babel.h
index c55a3a8..334ee57 100644
--- a/src/babel.h
+++ b/src/babel.h
@@ -56,6 +56,7 @@ struct gmrf_context {
gmrf_t *gmrf;
gp_babel_node_id_t self;
+ uint16_t hello_seqno;
gmrf_iface_state_t *interfaces;
gp_babel_neigh_t *neighbours;
@@ -68,8 +69,6 @@ struct gmrf_iface_state {
gmrf_iface_t *gmrf_iface;
- uint16_t seqno;
-
gp_babel_neigh_t *neighbours;
};
diff --git a/src/send.c b/src/send.c
index e1c582f..f649a34 100644
--- a/src/send.c
+++ b/src/send.c
@@ -104,13 +104,15 @@ void gp_babel_send_hellos(gmrf_context_t *ctx) {
gmrf_iface_state_t *iface;
for (iface = ctx->interfaces; iface; iface = iface->next) {
- hello->seqno = htons(iface->seqno++);
+ hello->seqno = htons(ctx->hello_seqno);
buf->packet.len = len;
add_ihus(ctx, buf, iface);
send_iface(ctx, iface, &buf->packet);
}
+
+ ctx->hello_seqno++;
}
/*static inline bool add_node_id_tlv(gp_babel_packet_buf_t *buf, const gp_babel_node_id_t *node_id) {