summaryrefslogtreecommitdiff
path: root/zebra/rt_netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/rt_netlink.c')
-rw-r--r--zebra/rt_netlink.c78
1 files changed, 4 insertions, 74 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index c9a6335277..e8333ef0cf 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -23,6 +23,10 @@
#ifdef HAVE_NETLINK
#include <net/if_arp.h>
+#include <linux/lwtunnel.h>
+#include <linux/mpls_iptunnel.h>
+#include <linux/neighbour.h>
+#include <linux/rtnetlink.h>
/* Hack for GNU libc version 2. */
#ifndef MSG_TRUNC
@@ -61,65 +65,10 @@
#include "zebra/zebra_mroute.h"
#include "zebra/zebra_vxlan.h"
-
-/* TODO - Temporary definitions, need to refine. */
#ifndef AF_MPLS
#define AF_MPLS 28
#endif
-#ifndef RTA_VIA
-#define RTA_VIA 18
-#endif
-
-#ifndef RTA_NEWDST
-#define RTA_NEWDST 19
-#endif
-
-#ifndef RTA_ENCAP_TYPE
-#define RTA_ENCAP_TYPE 21
-#endif
-
-#ifndef RTA_ENCAP
-#define RTA_ENCAP 22
-#endif
-
-#ifndef RTA_EXPIRES
-#define RTA_EXPIRES 23
-#endif
-
-#ifndef LWTUNNEL_ENCAP_MPLS
-#define LWTUNNEL_ENCAP_MPLS 1
-#endif
-
-#ifndef MPLS_IPTUNNEL_DST
-#define MPLS_IPTUNNEL_DST 1
-#endif
-
-#ifndef NDA_MASTER
-#define NDA_MASTER 9
-#endif
-
-#ifndef NTF_MASTER
-#define NTF_MASTER 0x04
-#endif
-
-#ifndef NTF_SELF
-#define NTF_SELF 0x02
-#endif
-
-#ifndef NTF_EXT_LEARNED
-#define NTF_EXT_LEARNED 0x10
-#endif
-
-#ifndef NDA_IFINDEX
-#define NDA_IFINDEX 8
-#endif
-
-#ifndef NDA_VLAN
-#define NDA_VLAN 5
-#endif
-/* End of temporary definitions */
-
static vlanid_t filter_vlan = 0;
struct gw_family_t {
@@ -2525,23 +2474,4 @@ int netlink_mpls_multipath(int cmd, zebra_lsp_t *lsp)
return netlink_talk(netlink_talk_filter, &req.n, &zns->netlink_cmd, zns,
0);
}
-
-/*
- * Handle failure in LSP install, clear flags for NHLFE.
- */
-void clear_nhlfe_installed(zebra_lsp_t *lsp)
-{
- zebra_nhlfe_t *nhlfe;
- struct nexthop *nexthop;
-
- for (nhlfe = lsp->nhlfe_list; nhlfe; nhlfe = nhlfe->next) {
- nexthop = nhlfe->nexthop;
- if (!nexthop)
- continue;
-
- UNSET_FLAG(nhlfe->flags, NHLFE_FLAG_INSTALLED);
- UNSET_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB);
- }
-}
-
#endif /* HAVE_NETLINK */