]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/command_py.c
Merge pull request #5793 from ton31337/fix/formatting_show_bgp_summary_failed
[mirror_frr.git] / lib / command_py.c
index 785d2ffa70ae86db85c5e32e5bf1665fc0e93b1f..4ec116df330f38043c427a7d4ca2383780536a59 100644 (file)
  * memory leak or SEGV for things that haven't been well-tested.
  */
 
+/* This file is "exempt" from having
+#include "config.h"
+ * as the first include statement because Python.h also does environment
+ * setup & these trample over each other.
+ */
+
 #include <Python.h>
 #include "structmember.h"
 #include <string.h>
@@ -199,6 +205,8 @@ static PyObject *graph_to_pyobj(struct wrap_graph *wgraph,
                                item(IPV4_PREFIX_TKN) // IPV4 network prefixes
                                item(IPV6_TKN)  // IPV6 prefixes
                                item(IPV6_PREFIX_TKN) // IPV6 network prefixes
+                               item(MAC_TKN)    // MAC address
+                               item(MAC_PREFIX_TKN)  // MAC address with mask
 
                                /* plumbing types */
                                item(FORK_TKN) item(JOIN_TKN) item(START_TKN)
@@ -248,6 +256,8 @@ static PyObject *graph_parse(PyTypeObject *type, PyObject *args,
 static void graph_wrap_free(void *arg)
 {
        struct wrap_graph *wgraph = arg;
+
+       graph_delete_graph(wgraph->graph);
        free(wgraph->nodewrappers);
        free(wgraph->definition);
 }
@@ -317,6 +327,7 @@ static struct PyModuleDef pymoddef_clippy = {
        } while (0)
 #endif
 
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
 PyMODINIT_FUNC command_py_init(void)
 {
        PyObject *pymod;