diff options
Diffstat (limited to 'net/batman-adv/soft-interface.c')
-rw-r--r-- | net/batman-adv/soft-interface.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index dd189e6bf05a..18b1fd915d1f 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c | |||
@@ -442,6 +442,7 @@ static void batadv_softif_destroy_finish(struct work_struct *work) | |||
442 | static int batadv_softif_init_late(struct net_device *dev) | 442 | static int batadv_softif_init_late(struct net_device *dev) |
443 | { | 443 | { |
444 | struct batadv_priv *bat_priv; | 444 | struct batadv_priv *bat_priv; |
445 | uint32_t random_seqno; | ||
445 | int ret; | 446 | int ret; |
446 | size_t cnt_len = sizeof(uint64_t) * BATADV_CNT_NUM; | 447 | size_t cnt_len = sizeof(uint64_t) * BATADV_CNT_NUM; |
447 | 448 | ||
@@ -491,6 +492,10 @@ static int batadv_softif_init_late(struct net_device *dev) | |||
491 | bat_priv->tt.last_changeset = NULL; | 492 | bat_priv->tt.last_changeset = NULL; |
492 | bat_priv->tt.last_changeset_len = 0; | 493 | bat_priv->tt.last_changeset_len = 0; |
493 | 494 | ||
495 | /* randomize initial seqno to avoid collision */ | ||
496 | get_random_bytes(&random_seqno, sizeof(random_seqno)); | ||
497 | atomic_set(&bat_priv->frag_seqno, random_seqno); | ||
498 | |||
494 | bat_priv->primary_if = NULL; | 499 | bat_priv->primary_if = NULL; |
495 | bat_priv->num_ifaces = 0; | 500 | bat_priv->num_ifaces = 0; |
496 | 501 | ||
@@ -758,6 +763,8 @@ static const struct { | |||
758 | { "mgmt_tx_bytes" }, | 763 | { "mgmt_tx_bytes" }, |
759 | { "mgmt_rx" }, | 764 | { "mgmt_rx" }, |
760 | { "mgmt_rx_bytes" }, | 765 | { "mgmt_rx_bytes" }, |
766 | { "frag_tx" }, | ||
767 | { "frag_tx_bytes" }, | ||
761 | { "frag_rx" }, | 768 | { "frag_rx" }, |
762 | { "frag_rx_bytes" }, | 769 | { "frag_rx_bytes" }, |
763 | { "frag_fwd" }, | 770 | { "frag_fwd" }, |