[quagga-dev,15454] pimd: Add ability to safely ignore route-maps

Message ID 1464849472-24284-1-git-send-email-sharpd@cumulusnetworks.com
State Under Review
Headers show

Commit Message

Donald Sharp June 2, 2016, 6:37 a.m.
pim was not parsing route-map code and causing issues
using vtysh because of this.  Add code to safely
ignore the route-map code and set us up for future
expansion into route-maps if neeeded.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
---
 pimd/Makefile.am    |  3 ++-
 pimd/pim_main.c     |  4 ++++
 pimd/pim_routemap.c | 32 ++++++++++++++++++++++++++++++++
 pimd/pimd.h         |  2 ++
 4 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100644 pimd/pim_routemap.c

Comments

cisystem@netdef.org June 7, 2016, 2:20 a.m. | #1
Continous Integration Result: FAILED

See below for issues.
This is an EXPERIMENTAL automated CI system.
For questions and feedback, feel free to email
Martin Winter <mwinter@opensourcerouting.org>.

Patches applied :
  Patchwork 1965: http://patchwork.quagga.net/patch/1965
       [quagga-dev,15454] pimd: Add ability to safely ignore route-maps
Tested on top of Git : 86c5d2e (as of 20160315.231717 UTC)
CI System Testrun URL: https://ci1.netdef.org/browse/QUAGGA-QPWORK-304/


Get source and apply patch from patchwork: Successful
----------------

Building Stage: Successful
----------------

Basic Tests: Failed
----------------
Ipv6 protocols on ubuntu 14.04: Successful
Static analyzer (clang): Successful


Regards,
  NetDEF/OpenSourceRouting Continous Integration (CI) System

---
OpenSourceRouting.org is a project of the Network Device Education Foundation,
For more information, see www.netdef.org and www.opensourcerouting.org
For questions in regards to this CI System, contact Martin Winter, mwinter@netdef.org
cisystem@netdef.org June 7, 2016, 4 a.m. | #2
Continous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF CI System <cisystem@netdef.org>

This is an EXPERIMENTAL automated CI system.
For questions and feedback, feel free to email
Martin Winter <mwinter@opensourcerouting.org>.

Patches applied :
  Patchwork 1965: http://patchwork.quagga.net/patch/1965
       [quagga-dev,15454] pimd: Add ability to safely ignore route-maps
Tested on top of Git : 86c5d2e (as of 20160315.231717 UTC)
CI System Testrun URL: https://ci1.netdef.org/browse/QUAGGA-QPWORK-304/


Regards,
  NetDEF/OpenSourceRouting Continous Integration (CI) System

---
OpenSourceRouting.org is a project of the Network Device Education Foundation,
For more information, see www.netdef.org and www.opensourcerouting.org
For questions in regards to this CI System, contact Martin Winter, mwinter@netdef.org
Jafar Al-Gharaibeh June 7, 2016, 2:43 p.m. | #3
Acked-by: Jafar Al-Gharaibeh <jafar@atcorp.com>

On 6/2/2016 1:37 AM, Donald Sharp wrote:
> pim was not parsing route-map code and causing issues
> using vtysh because of this.  Add code to safely
> ignore the route-map code and set us up for future
> expansion into route-maps if neeeded.
>
> Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
> ---
>   pimd/Makefile.am    |  3 ++-
>   pimd/pim_main.c     |  4 ++++
>   pimd/pim_routemap.c | 32 ++++++++++++++++++++++++++++++++
>   pimd/pimd.h         |  2 ++
>   4 files changed, 40 insertions(+), 1 deletion(-)
>   create mode 100644 pimd/pim_routemap.c
>
> diff --git a/pimd/Makefile.am b/pimd/Makefile.am
> index f57c4c2..d045436 100644
> --- a/pimd/Makefile.am
> +++ b/pimd/Makefile.am
> @@ -52,7 +52,8 @@ libpim_a_SOURCES = \
>   	pim_oil.c pim_zlookup.c pim_pim.c pim_tlv.c pim_neighbor.c \
>   	pim_hello.c pim_ifchannel.c pim_join.c pim_assert.c \
>   	pim_msg.c pim_upstream.c pim_rpf.c pim_macro.c \
> -	pim_igmp_join.c pim_ssmpingd.c pim_int.c pim_static.c
> +	pim_igmp_join.c pim_ssmpingd.c pim_int.c pim_static.c \
> +        pim_routemap.c
>   
>   noinst_HEADERS = \
>   	pimd.h pim_version.h pim_cmd.h pim_signals.h pim_iface.h \
> diff --git a/pimd/pim_main.c b/pimd/pim_main.c
> index 5f4711e..ea70a8f 100644
> --- a/pimd/pim_main.c
> +++ b/pimd/pim_main.c
> @@ -36,6 +36,8 @@
>   #include "vty.h"
>   #include "sigevent.h"
>   #include "version.h"
> +#include "prefix.h"
> +#include "plist.h"
>   
>   #include "pimd.h"
>   #include "pim_version.h"
> @@ -200,6 +202,8 @@ int main(int argc, char** argv, char** envp) {
>     memory_init();
>     vrf_init();
>     access_list_init();
> +  prefix_list_init ();
> +  pim_route_map_init ();
>     pim_init();
>   
>     /*
> diff --git a/pimd/pim_routemap.c b/pimd/pim_routemap.c
> new file mode 100644
> index 0000000..9cc13be
> --- /dev/null
> +++ b/pimd/pim_routemap.c
> @@ -0,0 +1,32 @@
> +/* PIM Route-map Code
> + * Copyright (C) 2016 Cumulus Networks <sharpd@cumulusnetworks.com>
> + *
> + * This file is part of Quagga
> + *
> + * Quagga is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License as published by the
> + * Free Software Foundation; either version 2, or (at your option) any
> + * later version.
> + *
> + * Quagga is distributed in the hope that it will be useful, but
> + * WITHOUT ANY WARRANTY; without even the implied warranty of
> + * 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.
> + */
> +#include <zebra.h>
> +
> +#include "routemap.h"
> +
> +#include "pimd.h"
> +
> +void
> +pim_route_map_init (void)
> +{
> +  route_map_init ();
> +  route_map_init_vty ();
> +}
> diff --git a/pimd/pimd.h b/pimd/pimd.h
> index aed26be..9a7e605 100644
> --- a/pimd/pimd.h
> +++ b/pimd/pimd.h
> @@ -159,4 +159,6 @@ struct list              *qpim_static_route_list; /* list of routes added static
>   void pim_init(void);
>   void pim_terminate(void);
>   
> +extern void pim_route_map_init (void);
> +
>   #endif /* PIMD_H */

Patch hide | download patch | download mbox

diff --git a/pimd/Makefile.am b/pimd/Makefile.am
index f57c4c2..d045436 100644
--- a/pimd/Makefile.am
+++ b/pimd/Makefile.am
@@ -52,7 +52,8 @@  libpim_a_SOURCES = \
 	pim_oil.c pim_zlookup.c pim_pim.c pim_tlv.c pim_neighbor.c \
 	pim_hello.c pim_ifchannel.c pim_join.c pim_assert.c \
 	pim_msg.c pim_upstream.c pim_rpf.c pim_macro.c \
-	pim_igmp_join.c pim_ssmpingd.c pim_int.c pim_static.c
+	pim_igmp_join.c pim_ssmpingd.c pim_int.c pim_static.c \
+        pim_routemap.c
 
 noinst_HEADERS = \
 	pimd.h pim_version.h pim_cmd.h pim_signals.h pim_iface.h \
diff --git a/pimd/pim_main.c b/pimd/pim_main.c
index 5f4711e..ea70a8f 100644
--- a/pimd/pim_main.c
+++ b/pimd/pim_main.c
@@ -36,6 +36,8 @@ 
 #include "vty.h"
 #include "sigevent.h"
 #include "version.h"
+#include "prefix.h"
+#include "plist.h"
 
 #include "pimd.h"
 #include "pim_version.h"
@@ -200,6 +202,8 @@  int main(int argc, char** argv, char** envp) {
   memory_init();
   vrf_init();
   access_list_init();
+  prefix_list_init ();
+  pim_route_map_init ();
   pim_init();
 
   /*
diff --git a/pimd/pim_routemap.c b/pimd/pim_routemap.c
new file mode 100644
index 0000000..9cc13be
--- /dev/null
+++ b/pimd/pim_routemap.c
@@ -0,0 +1,32 @@ 
+/* PIM Route-map Code
+ * Copyright (C) 2016 Cumulus Networks <sharpd@cumulusnetworks.com>
+ *
+ * This file is part of Quagga
+ *
+ * Quagga is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * Quagga is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * 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.
+ */
+#include <zebra.h>
+
+#include "routemap.h"
+
+#include "pimd.h"
+
+void
+pim_route_map_init (void)
+{
+  route_map_init ();
+  route_map_init_vty ();
+}
diff --git a/pimd/pimd.h b/pimd/pimd.h
index aed26be..9a7e605 100644
--- a/pimd/pimd.h
+++ b/pimd/pimd.h
@@ -159,4 +159,6 @@  struct list              *qpim_static_route_list; /* list of routes added static
 void pim_init(void);
 void pim_terminate(void);
 
+extern void pim_route_map_init (void);
+
 #endif /* PIMD_H */