summaryrefslogtreecommitdiffstats
path: root/eigrpd
diff options
context:
space:
mode:
authorJafar Al-Gharaibeh <Jafaral@users.noreply.github.com>2017-07-14 19:55:28 +0200
committerGitHub <noreply@github.com>2017-07-14 19:55:28 +0200
commit13c2f50cd5b6c584d91b9d10693c620ae090907b (patch)
tree22f863f83f7c71f477d780ca038ec3776cf065be /eigrpd
parentMerge pull request #820 from opensourcerouting/gcc7 (diff)
parenteigrpd: Fix up some redistribution issues (diff)
downloadfrr-13c2f50cd5b6c584d91b9d10693c620ae090907b.tar.xz
frr-13c2f50cd5b6c584d91b9d10693c620ae090907b.zip
Merge pull request #818 from donaldsharp/eigrp_afi
Eigrp afi
Diffstat (limited to 'eigrpd')
-rw-r--r--eigrpd/eigrp_network.c4
-rw-r--r--eigrpd/eigrp_query.c2
-rw-r--r--eigrpd/eigrp_reply.c2
-rw-r--r--eigrpd/eigrp_update.c2
-rw-r--r--eigrpd/eigrp_vty.c6
-rw-r--r--eigrpd/eigrp_zebra.c17
-rw-r--r--eigrpd/eigrp_zebra.h2
7 files changed, 16 insertions, 19 deletions
diff --git a/eigrpd/eigrp_network.c b/eigrpd/eigrp_network.c
index c4e0b8435..74cb6de18 100644
--- a/eigrpd/eigrp_network.c
+++ b/eigrpd/eigrp_network.c
@@ -243,8 +243,8 @@ eigrp_network_set(struct eigrp *eigrp, struct prefix_ipv4 *p)
rn->info = (void *) pref;
/* Schedule Router ID Update. */
- // if (eigrp->router_id == 0)
- // eigrp_router_id_update(eigrp);
+ if (eigrp->router_id == 0)
+ eigrp_router_id_update(eigrp);
/* Run network config now. */
/* Get target interface. */
for (ALL_LIST_ELEMENTS_RO(vrf_iflist(VRF_DEFAULT), node, ifp))
diff --git a/eigrpd/eigrp_query.c b/eigrpd/eigrp_query.c
index 3ef8f9a97..1d308d2be 100644
--- a/eigrpd/eigrp_query.c
+++ b/eigrpd/eigrp_query.c
@@ -119,7 +119,7 @@ eigrp_query_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header *e
tlv = eigrp_read_ipv4_tlv(s);
- dest_addr.family = AFI_IP;
+ dest_addr.family = AF_INET;
dest_addr.prefix = tlv->destination;
dest_addr.prefixlen = tlv->prefix_length;
struct eigrp_prefix_entry *dest =
diff --git a/eigrpd/eigrp_reply.c b/eigrpd/eigrp_reply.c
index e64a3d022..4e3ed66a0 100644
--- a/eigrpd/eigrp_reply.c
+++ b/eigrpd/eigrp_reply.c
@@ -187,7 +187,7 @@ eigrp_reply_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header *e
tlv = eigrp_read_ipv4_tlv(s);
- dest_addr.family = AFI_IP;
+ dest_addr.family = AF_INET;
dest_addr.prefix = tlv->destination;
dest_addr.prefixlen = tlv->prefix_length;
struct eigrp_prefix_entry *dest =
diff --git a/eigrpd/eigrp_update.c b/eigrpd/eigrp_update.c
index 93b2ceb9d..c37bf4bbc 100644
--- a/eigrpd/eigrp_update.c
+++ b/eigrpd/eigrp_update.c
@@ -297,7 +297,7 @@ eigrp_update_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header *
tlv = eigrp_read_ipv4_tlv(s);
/*searching if destination exists */
- dest_addr.family = AFI_IP;
+ dest_addr.family = AF_INET;
dest_addr.prefix = tlv->destination;
dest_addr.prefixlen = tlv->prefix_length;
struct eigrp_prefix_entry *dest =
diff --git a/eigrpd/eigrp_vty.c b/eigrpd/eigrp_vty.c
index 49fb729ca..293b7e0ef 100644
--- a/eigrpd/eigrp_vty.c
+++ b/eigrpd/eigrp_vty.c
@@ -59,6 +59,7 @@ static int
config_write_network (struct vty *vty, struct eigrp *eigrp)
{
struct route_node *rn;
+ int i;
/* `network area' print. */
for (rn = route_top (eigrp->networks); rn; rn = route_next (rn))
@@ -75,6 +76,11 @@ config_write_network (struct vty *vty, struct eigrp *eigrp)
if (eigrp->variance != EIGRP_VARIANCE_DEFAULT)
vty_out (vty, " variance %d\n", eigrp->variance);
+ for (i = 0; i < ZEBRA_ROUTE_MAX; i++)
+ if (i != zclient->redist_default &&
+ vrf_bitmap_check (zclient->redist[AFI_IP][i], VRF_DEFAULT))
+ vty_outln (vty, " redistribute %s", zebra_route_string(i));
+
/*Separate EIGRP configuration from the rest of the config*/
vty_out (vty, "!\n");
diff --git a/eigrpd/eigrp_zebra.c b/eigrpd/eigrp_zebra.c
index 2baad7526..38ce757cd 100644
--- a/eigrpd/eigrp_zebra.c
+++ b/eigrpd/eigrp_zebra.c
@@ -496,11 +496,12 @@ eigrp_zebra_route_delete (struct prefix_ipv4 *p)
return;
}
-vrf_bitmap_t
+int
eigrp_is_type_redistributed (int type)
{
- return (DEFAULT_ROUTE_TYPE (type)) ?
- zclient->default_information : zclient->redist[AFI_IP][type];
+ return ((DEFAULT_ROUTE_TYPE (type)) ?
+ vrf_bitmap_check (zclient->default_information, VRF_DEFAULT) :
+ vrf_bitmap_check (zclient->redist[AFI_IP][type], VRF_DEFAULT));
}
int
@@ -528,11 +529,6 @@ eigrp_redistribute_set (struct eigrp *eigrp, int type, struct eigrp_metrics metr
zclient_redistribute (ZEBRA_REDISTRIBUTE_ADD, zclient,
AFI_IP, type, 0, VRF_DEFAULT);
- // if (IS_DEBUG_EIGRP (zebra, ZEBRA_REDISTRIBUTE))
- // zlog_debug ("Redistribute[%s]: Start Type[%d], Metric[%d]",
- // ospf_redist_string(type),
- // metric_type (ospf, type), metric_value (ospf, type));
-
++eigrp->redistribute;
return CMD_SUCCESS;
@@ -550,11 +546,6 @@ eigrp_redistribute_unset (struct eigrp *eigrp, int type)
--eigrp->redistribute;
}
- // if (IS_DEBUG_EIGRP (zebra, ZEBRA_REDISTRIBUTE))
- // zlog_debug ("Redistribute[%s]: Start Type[%d], Metric[%d]",
- // ospf_redist_string(type),
- // metric_type (ospf, type), metric_value (ospf, type));
-
return CMD_SUCCESS;
}
diff --git a/eigrpd/eigrp_zebra.h b/eigrpd/eigrp_zebra.h
index 0991d35ab..6151e3272 100644
--- a/eigrpd/eigrp_zebra.h
+++ b/eigrpd/eigrp_zebra.h
@@ -37,6 +37,6 @@ extern void eigrp_zebra_route_add (struct prefix_ipv4 *, struct list *);
extern void eigrp_zebra_route_delete (struct prefix_ipv4 *);
extern int eigrp_redistribute_set (struct eigrp *, int, struct eigrp_metrics);
extern int eigrp_redistribute_unset (struct eigrp *, int);
-extern vrf_bitmap_t eigrp_is_type_redistributed (int);
+extern int eigrp_is_type_redistributed (int);
#endif /* _ZEBRA_EIGRP_ZEBRA_H_ */