+// SPDX-License-Identifier: GPL-2.0-or-later
/* RIPng peer support
* Copyright (C) 2000 Kunihiro Ishiguro <kunihiro@zebra.org>
- *
- * This file is part of GNU Zebra.
- *
- * GNU Zebra is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2, or (at your option) any
- * later version.
- *
- * GNU Zebra is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/* RIPng support added by Vincent Jardin <vincent.jardin@6wind.com>
static void ripng_peer_free(struct ripng_peer *peer)
{
- RIPNG_TIMER_OFF(peer->t_timeout);
+ THREAD_OFF(peer->t_timeout);
XFREE(MTYPE_RIPNG_PEER, peer);
}
/* RIPng peer is timeout.
* Garbage collector.
**/
-static int ripng_peer_timeout(struct thread *t)
+static void ripng_peer_timeout(struct thread *t)
{
struct ripng_peer *peer;
peer = THREAD_ARG(t);
listnode_delete(peer->ripng->peer_list, peer);
ripng_peer_free(peer);
-
- return 0;
}
/* Get RIPng peer. At the same time update timeout thread. */
peer = ripng_peer_lookup(ripng, addr);
if (peer) {
- thread_cancel(&peer->t_timeout);
+ THREAD_OFF(peer->t_timeout);
} else {
peer = ripng_peer_new();
peer->ripng = ripng;