Ejemplo n.º 1
0
void mp_bundle_terminated()
{
	TDB_DATA key;

	bundle_terminating = 1;
	upper_layers_down(pcb);
	notice("Connection terminated.");
#if PPP_STATS_SUPPORT
	print_link_stats();
#endif /* PPP_STATS_SUPPORT */
	if (!demand) {
		remove_pidfiles();
		script_unsetenv("IFNAME");
	}

	lock_db();
	destroy_bundle();
	iterate_bundle_links(sendhup);
	key.dptr = blinks_id;
	key.dsize = strlen(blinks_id);
	tdb_delete(pppdb, key);
	unlock_db();

	new_phase(PPP_PHASE_DEAD);

	doing_multilink = 0;
	multilink_master = 0;
}
Ejemplo n.º 2
0
static void notifier_ipup(void *data, int arg)
{
	ipcp_options opts = ipcp_gotoptions[0];
	ipcp_options peer = ipcp_hisoptions[0];
	struct in_addr ouraddr, hisaddr;

	printf("ipup: data %p arg %d\n", data, arg);

	memcpy(&ouraddr, &opts.ouraddr, sizeof(ouraddr));
	memcpy(&hisaddr, &peer.hisaddr, sizeof(hisaddr));

	printf("%s: %s -> %s\n",
			ifname, inet_ntoa(ouraddr), inet_ntoa(hisaddr));

	script_unsetenv("USEPEERDNS");
	script_unsetenv("DNS1");
	script_unsetenv("DNS2");
}