From 3bec29ac951ab9b3a49fa874b9862bb5404088c1 Mon Sep 17 00:00:00 2001 From: Don Slice Date: Wed, 28 Jun 2017 14:53:27 -0400 Subject: lib/ospf/eigrp: enable ospf and eigrp to use more specific network statements Issue reported that a configuration commonly used on other routing implementations fails in frr. If under ospf, "network 172.16.1.1/32 area 0" or under eigrp, "network 172.16.1.1/32" is entered, the appropriate interfaces are not included in the routing protocol. This was because the code was calling prefix_match, which did not match if the network statement had a longer mask than the interface being matched. This fix takes away that restriction by creating a "lib/prefix_match_network_statement" function which doesn't care about the mask of the interface. Manual testing shows both ospf and eigrp now can be defined with more specific network statements. Signed-off-by: Don Slice --- eigrpd/eigrp_network.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'eigrpd/eigrp_network.c') diff --git a/eigrpd/eigrp_network.c b/eigrpd/eigrp_network.c index cfed11a9e..c4e0b8435 100644 --- a/eigrpd/eigrp_network.c +++ b/eigrpd/eigrp_network.c @@ -262,7 +262,7 @@ static int eigrp_network_match_iface(const struct connected *co, const struct prefix *net) { /* new approach: more elegant and conceptually clean */ - return prefix_match(net, CONNECTED_PREFIX (co)); + return prefix_match_network_statement(net, CONNECTED_PREFIX (co)); } static void -- cgit v1.2.3