static void update_session_state(struct connman_session *session) { enum connman_service_state service_state; enum connman_session_state state = CONNMAN_SESSION_STATE_DISCONNECTED; if (session->service) { service_state = connman_service_get_state(session->service); state = service_to_session_state(service_state); session->info->state = state; } session->info->state = state; DBG("session %p state %s", session, state2string(state)); update_firewall(session); del_nat_rules(session); update_routing_table(session); add_nat_rules(session); if (policy && policy->update_session_state) policy->update_session_state(session, state); session_notify(session); }
static void update_nat_rules(struct connman_session *session) { del_nat_rules(session); add_nat_rules(session); }