Committer: Miika Komu <miika@xxxxxx> Date: 18/03/2010 at 19:59:29 Revision: 4016 Revision-id: miika@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Branch nick: trunk Log: Placed hip_empty_oppipdb_old() to a more suitable file and removed an obsolete doxygen comment. Modified: M hipd/update.c M hipd/update_legacy.c M hipd/update_legacy.h === modified file 'hipd/update.c' --- hipd/update.c 2010-03-18 17:56:49 +0000 +++ hipd/update.c 2010-03-18 17:59:27 +0000 @@ -691,36 +691,6 @@ } /** - * Flush the opportunistic mode blacklist at the firewall. It is required - * when the host moves e.g. from one private address realm to another and - * the IP-address based blacklist becomes unreliable - */ -static void hip_empty_oppipdb_old(void) -{ -#ifdef CONFIG_HIP_OPPORTUNISTIC - hip_for_each_oppip(hip_oppipdb_del_entry_by_entry, NULL); -#endif - if (hip_firewall_is_alive()) { - int err; - struct hip_common *msg; - - msg = hip_msg_alloc(); - HIP_IFEL(!msg, -1, "msg alloc failed\n"); - HIP_IFEL(hip_build_user_hdr(msg, HIP_MSG_FW_FLUSH_SYS_OPP_HIP, 0), - -1, "build hdr failed\n"); - - err = hip_sendto_firewall(msg); - err = err > 0 ? 0 : -1; - -out_err: - HIP_FREE(msg); - if (err) { - HIP_ERROR("Couldn't flush firewall chains\n"); - } - } -} - -/** * process any UPDATE packet * * @param received_update_packet the received UPDATE packet === modified file 'hipd/update_legacy.c' --- hipd/update_legacy.c 2010-03-18 17:23:37 +0000 +++ hipd/update_legacy.c 2010-03-18 17:59:27 +0000 @@ -78,3 +78,33 @@ return err; } + +/** + * Flush the opportunistic mode blacklist at the firewall. It is required + * when the host moves e.g. from one private address realm to another and + * the IP-address based blacklist becomes unreliable + */ +void hip_empty_oppipdb_old(void) +{ +#ifdef CONFIG_HIP_OPPORTUNISTIC + hip_for_each_oppip(hip_oppipdb_del_entry_by_entry, NULL); +#endif + if (hip_firewall_is_alive()) { + int err; + struct hip_common *msg; + + msg = hip_msg_alloc(); + HIP_IFEL(!msg, -1, "msg alloc failed\n"); + HIP_IFEL(hip_build_user_hdr(msg, HIP_MSG_FW_FLUSH_SYS_OPP_HIP, 0), + -1, "build hdr failed\n"); + + err = hip_sendto_firewall(msg); + err = err > 0 ? 0 : -1; + +out_err: + HIP_FREE(msg); + if (err) { + HIP_ERROR("Couldn't flush firewall chains\n"); + } + } +} === modified file 'hipd/update_legacy.h' --- hipd/update_legacy.h 2010-02-17 13:08:39 +0000 +++ hipd/update_legacy.h 2010-03-18 17:59:27 +0000 @@ -3,14 +3,8 @@ #include "update.h" -/** - * Builds udp and raw locator items into locator list to msg - * this is the extension of hip_build_locators in output.c - * type2 locators are collected also - * - * @param msg a pointer to hip_common to append the LOCATORS - * @return len of LOCATOR2 on success, or negative error value on error - */ int hip_build_locators_old(struct hip_common *msg, uint32_t spi); +void hip_empty_oppipdb_old(void); + #endif /* HIP_HIPD_UPDATE_LEGACY_H */