summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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) {