#define IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP
#endif
-DEFINE_MTYPE_STATIC(RIPNGD, RIPNG_IF, "ripng interface")
+DEFINE_MTYPE_STATIC(RIPNGD, RIPNG_IF, "ripng interface");
/* Static utility function. */
static void ripng_enable_apply(struct interface *);
ripng_if_down(ifp);
}
- zlog_info(
- "interface delete %s vrf %s(%u) index %d flags %#llx metric %d mtu %d",
- ifp->name, VRF_LOGNAME(vrf), ifp->vrf_id, ifp->ifindex,
- (unsigned long long)ifp->flags, ifp->metric, ifp->mtu6);
+ if (IS_RIPNG_DEBUG_ZEBRA)
+ zlog_debug(
+ "interface delete %s vrf %s(%u) index %d flags %#llx metric %d mtu %d",
+ ifp->name, VRF_LOGNAME(vrf), ifp->vrf_id, ifp->ifindex,
+ (unsigned long long)ifp->flags, ifp->metric, ifp->mtu6);
return 0;
}
ri->enable_interface = 0;
ri->running = 0;
- if (ri->t_wakeup) {
- thread_cancel(ri->t_wakeup);
- ri->t_wakeup = NULL;
- }
+ thread_cancel(&ri->t_wakeup);
}
}
struct ripng_interface *ri = c->ifp->info;
if (IS_RIPNG_DEBUG_ZEBRA)
- zlog_debug("RIPng connected address %s/%d add",
- inet6_ntoa(p->u.prefix6), p->prefixlen);
+ zlog_debug("RIPng connected address %pFX add", p);
/* Check is this prefix needs to be redistributed. */
ripng_apply_address_add(c);
{
struct connected *ifc;
struct prefix *p;
- char buf[INET6_ADDRSTRLEN];
ifc = zebra_interface_address_read(ZEBRA_INTERFACE_ADDRESS_DELETE,
zclient->ibuf, vrf_id);
if (p->family == AF_INET6) {
if (IS_RIPNG_DEBUG_ZEBRA)
zlog_debug(
- "RIPng connected address %s/%d delete",
- inet_ntop(AF_INET6, &p->u.prefix6, buf,
- INET6_ADDRSTRLEN),
- p->prefixlen);
+ "RIPng connected address %pFX delete",
+ p);
/* Check wether this prefix needs to be removed. */
ripng_apply_address_del(ifc);
return write;
}
+static int interface_config_write(struct vty *vty);
/* ripngd's interface node. */
static struct cmd_node interface_node = {
+ .name = "interface",
.node = INTERFACE_NODE,
+ .parent_node = CONFIG_NODE,
.prompt = "%s(config-if)# ",
+ .config_write = interface_config_write,
};
/* Initialization of interface. */
hook_register_prio(if_del, 0, ripng_if_delete_hook);
/* Install interface node. */
- install_node(&interface_node, interface_config_write);
+ install_node(&interface_node);
if_cmd_init();
if_zapi_callbacks(ripng_ifp_create, ripng_ifp_up,
ripng_ifp_down, ripng_ifp_destroy);