]> git.proxmox.com Git - mirror_frr.git/blobdiff - pimd/pim_routemap.c
lib: enforce vrf_name_to_id by returning default_vrf when name is null
[mirror_frr.git] / pimd / pim_routemap.c
index f65f35ba5ef5d916dd2143471670cdf1c0663f38..4230c127ad31031f89ef4784ad3fd395bd847391 100644 (file)
  * 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 Quagga; see the file COPYING.  If not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * 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
  */
 #include <zebra.h>
 
 #include "if.h"
+#include "vty.h"
 #include "routemap.h"
 
 #include "pimd.h"
 
-
-static void
-pim_route_map_mark_update (const char *rmap_name)
+static void pim_route_map_add(const char *rmap_name)
 {
-  // placeholder
-  return;
+       route_map_notify_dependencies(rmap_name, RMAP_EVENT_MATCH_ADDED);
 }
 
-static void
-pim_route_map_add (const char *rmap_name)
+static void pim_route_map_delete(const char *rmap_name)
 {
-  if (route_map_mark_updated(rmap_name, 0) == 0)
-    pim_route_map_mark_update(rmap_name);
-
-  route_map_notify_dependencies(rmap_name, RMAP_EVENT_MATCH_ADDED);
+       route_map_notify_dependencies(rmap_name, RMAP_EVENT_MATCH_DELETED);
 }
 
-static void
-pim_route_map_delete (const char *rmap_name)
+static void pim_route_map_event(route_map_event_t event, const char *rmap_name)
 {
-  if (route_map_mark_updated(rmap_name, 1) == 0)
-    pim_route_map_mark_update(rmap_name);
-
-  route_map_notify_dependencies(rmap_name, RMAP_EVENT_MATCH_DELETED);
-}
-
-static void
-pim_route_map_event (route_map_event_t event, const char *rmap_name)
-{
-  if (route_map_mark_updated(rmap_name, 0) == 0)
-    pim_route_map_mark_update(rmap_name);
-
-  route_map_notify_dependencies(rmap_name, RMAP_EVENT_MATCH_ADDED);
+       route_map_notify_dependencies(rmap_name, RMAP_EVENT_MATCH_ADDED);
 }
 
-void
-pim_route_map_init (void)
+void pim_route_map_init(void)
 {
-  route_map_init ();
+       route_map_init();
 
-  route_map_add_hook (pim_route_map_add);
-  route_map_delete_hook (pim_route_map_delete);
-  route_map_event_hook (pim_route_map_event);
+       route_map_add_hook(pim_route_map_add);
+       route_map_delete_hook(pim_route_map_delete);
+       route_map_event_hook(pim_route_map_event);
 }
 
-void
-pim_route_map_terminate (void)
+void pim_route_map_terminate(void)
 {
-  route_map_add_hook (NULL);
-  route_map_delete_hook (NULL);
-  route_map_event_hook (NULL);
-  route_map_finish();
+       route_map_finish();
 }