Skip to content
Snippets Groups Projects
  • Sven Eckelmann's avatar
    e1a741be
    batman-adv: Fix best gw refcnt after netlink dump (#1411) · e1a741be
    Sven Eckelmann authored
    
    A reference to the best gateway is taken when the list of gateways in the
    mesh is sent via netlink. This is necessary to check whether the currently
    dumped entry is the currently selected gateway or not. This information is
    then transferred as flag BATADV_ATTR_FLAG_BEST.
    
    After the comparison of the current entry is done,
    batadv_*_gw_dump_entry() has to decrease the reference counter again.
    Otherwise the reference will be held and thus prevents a proper shutdown of
    the batman-adv interfaces (and some of the interfaces enslaved in it).
    
    Fixes: 899235a4a637 ("Merge pull request #241 from ecsv/batman-adv-2016.4-maint-2016-10-29")
    Reported-by: default avatarAndreas Ziegler <dev@andreas-ziegler.de>
    Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
    e1a741be
    History
    batman-adv: Fix best gw refcnt after netlink dump (#1411)
    Sven Eckelmann authored
    
    A reference to the best gateway is taken when the list of gateways in the
    mesh is sent via netlink. This is necessary to check whether the currently
    dumped entry is the currently selected gateway or not. This information is
    then transferred as flag BATADV_ATTR_FLAG_BEST.
    
    After the comparison of the current entry is done,
    batadv_*_gw_dump_entry() has to decrease the reference counter again.
    Otherwise the reference will be held and thus prevents a proper shutdown of
    the batman-adv interfaces (and some of the interfaces enslaved in it).
    
    Fixes: 899235a4a637 ("Merge pull request #241 from ecsv/batman-adv-2016.4-maint-2016-10-29")
    Reported-by: default avatarAndreas Ziegler <dev@andreas-ziegler.de>
    Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
contrib NaN GiB