* 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 GNU Zebra; see the file COPYING. If not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
nh_data = object;
if (!nh_data || !nh_data->nexthop)
return RMAP_NOMATCH;
- ifindex = ifname2ifindex_vrf (ifname, nh_data->vrf_id);
+ ifindex = ifname2ifindex (ifname, nh_data->vrf_id);
if (ifindex == 0)
return RMAP_NOMATCH;
if (nh_data->nexthop->ifindex == ifindex)
RB_FOREACH (vrf, vrf_id_head, &vrfs_by_id)
{
if (family == AF_INET)
- pif = if_lookup_exact_address_vrf ((void *)&src.ipv4, AF_INET,
- vrf->vrf_id);
+ pif = if_lookup_exact_address ((void *)&src.ipv4, AF_INET,
+ vrf->vrf_id);
else if (family == AF_INET6)
- pif = if_lookup_exact_address_vrf ((void *)&src.ipv6, AF_INET6,
- vrf->vrf_id);
+ pif = if_lookup_exact_address ((void *)&src.ipv6, AF_INET6,
+ vrf->vrf_id);
if (pif != NULL)
break;
DEFUN (ip_protocol,
ip_protocol_cmd,
- "ip protocol <kernel|connected|static|rip|ospf|isis|bgp|pim|table|any> route-map ROUTE-MAP",
+ "ip protocol " FRR_IP_PROTOCOL_MAP_STR_ZEBRA " route-map ROUTE-MAP",
IP_STR
"Filter routing info exchanged between zebra and protocol\n"
- QUAGGA_IP_PROTOCOL_MAP_HELP_STR_ZEBRA
+ FRR_IP_PROTOCOL_MAP_HELP_STR_ZEBRA
"Specify route-map\n"
"Route map name\n")
{
DEFUN (no_ip_protocol,
no_ip_protocol_cmd,
- "no ip protocol <kernel|connected|static|rip|ospf|isis|bgp|pim|table|any> [route-map ROUTE-MAP]",
+ "no ip protocol " FRR_IP_PROTOCOL_MAP_STR_ZEBRA " [route-map ROUTE-MAP]",
NO_STR
IP_STR
"Stop filtering routing info between zebra and protocol\n"
- QUAGGA_IP_PROTOCOL_MAP_HELP_STR_ZEBRA
+ FRR_IP_PROTOCOL_MAP_HELP_STR_ZEBRA
"Specify route map\n"
"Route map name\n")
{
return CMD_SUCCESS;
}
-
DEFUN (show_ip_protocol,
show_ip_protocol_cmd,
"show ip protocol",
DEFUN (ipv6_protocol,
ipv6_protocol_cmd,
- "ipv6 protocol <kernel|connected|static|ripng|ospf6|isis|bgp|table|any> route-map ROUTE-MAP",
+ "ipv6 protocol " FRR_IP6_PROTOCOL_MAP_STR_ZEBRA " route-map ROUTE-MAP",
IP6_STR
"Filter IPv6 routing info exchanged between zebra and protocol\n"
- QUAGGA_IP6_PROTOCOL_MAP_HELP_STR_ZEBRA
+ FRR_IP6_PROTOCOL_MAP_HELP_STR_ZEBRA
"Specify route map\n"
"Route map name\n")
{
DEFUN (no_ipv6_protocol,
no_ipv6_protocol_cmd,
- "no ipv6 protocol <kernel|connected|static|ripng|ospf6|isis|bgp|table|any> [route-map ROUTE-MAP]",
+ "no ipv6 protocol " FRR_IP6_PROTOCOL_MAP_STR_ZEBRA " [route-map ROUTE-MAP]",
NO_STR
IP6_STR
"Stop filtering IPv6 routing info between zebra and protocol\n"
- QUAGGA_IP6_PROTOCOL_MAP_HELP_STR_ZEBRA
+ FRR_IP6_PROTOCOL_MAP_HELP_STR_ZEBRA
"Specify route map\n"
"Route map name\n")
{
return CMD_SUCCESS;
}
-
DEFUN (show_ipv6_protocol,
show_ipv6_protocol_cmd,
"show ipv6 protocol",
DEFUN (ip_protocol_nht_rmap,
ip_protocol_nht_rmap_cmd,
- "ip nht <kernel|connected|static|rip|ospf|isis|bgp|pim|table|any> route-map ROUTE-MAP",
+ "ip nht " FRR_IP_PROTOCOL_MAP_STR_ZEBRA " route-map ROUTE-MAP",
IP_STR
"Filter Next Hop tracking route resolution\n"
- QUAGGA_IP_PROTOCOL_MAP_HELP_STR_ZEBRA
+ FRR_IP_PROTOCOL_MAP_HELP_STR_ZEBRA
"Specify route map\n"
"Route map name\n")
{
DEFUN (no_ip_protocol_nht_rmap,
no_ip_protocol_nht_rmap_cmd,
- "no ip nht <kernel|connected|static|rip|ospf|isis|bgp|pim|table|any> [route-map ROUTE-MAP]",
+ "no ip nht " FRR_IP_PROTOCOL_MAP_STR_ZEBRA " [route-map ROUTE-MAP]",
NO_STR
IP_STR
"Filter Next Hop tracking route resolution\n"
- QUAGGA_IP_PROTOCOL_MAP_HELP_STR_ZEBRA
+ FRR_IP_PROTOCOL_MAP_HELP_STR_ZEBRA
"Specify route map\n"
"Route map name\n")
{
return CMD_SUCCESS;
}
-
DEFUN (show_ip_protocol_nht,
show_ip_protocol_nht_cmd,
"show ip nht route-map",
DEFUN (ipv6_protocol_nht_rmap,
ipv6_protocol_nht_rmap_cmd,
- "ipv6 nht <kernel|connected|static|ripng|ospf6|isis|bgp|table|any> route-map ROUTE-MAP",
+ "ipv6 nht " FRR_IP6_PROTOCOL_MAP_STR_ZEBRA " route-map ROUTE-MAP",
IP6_STR
"Filter Next Hop tracking route resolution\n"
- QUAGGA_IP6_PROTOCOL_MAP_HELP_STR_ZEBRA
+ FRR_IP6_PROTOCOL_MAP_HELP_STR_ZEBRA
"Specify route map\n"
"Route map name\n")
{
DEFUN (no_ipv6_protocol_nht_rmap,
no_ipv6_protocol_nht_rmap_cmd,
- "no ipv6 nht <kernel|connected|static|ripng|ospf6|isis|bgp|table|any> [route-map ROUTE-MAP]",
+ "no ipv6 nht " FRR_IP6_PROTOCOL_MAP_STR_ZEBRA " [route-map ROUTE-MAP]",
NO_STR
IP6_STR
"Filter Next Hop tracking route resolution\n"
- QUAGGA_IP6_PROTOCOL_MAP_HELP_STR_ZEBRA
+ FRR_IP6_PROTOCOL_MAP_HELP_STR_ZEBRA
"Specify route map\n"
"Route map name\n")
{
return CMD_SUCCESS;
}
-
DEFUN (show_ipv6_protocol_nht,
show_ipv6_protocol_nht_cmd,
"show ipv6 nht route-map",
{
union g_addr src, *psrc;
- if (
-#ifdef HAVE_IPV6
- (inet_pton(AF_INET6, arg, &src.ipv6) == 1) ||
-#endif /* HAVE_IPV6 */
+ if ((inet_pton(AF_INET6, arg, &src.ipv6) == 1) ||
(src.ipv4.s_addr && (inet_pton(AF_INET, arg, &src.ipv4) == 1)))
{
psrc = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (union g_addr));
zebra_route_map_mark_update (const char *rmap_name)
{
/* rmap_update_timer of 0 means don't do route updates */
- if (zebra_rmap_update_timer && !zebra_t_rmap_update)
- zebra_t_rmap_update =
- thread_add_timer(zebrad.master, zebra_route_map_update_timer, NULL,
- zebra_rmap_update_timer);
+ if (zebra_rmap_update_timer && !zebra_t_rmap_update) {
+ zebra_t_rmap_update = NULL;
+ thread_add_timer(zebrad.master, zebra_route_map_update_timer, NULL, zebra_rmap_update_timer,
+ &zebra_t_rmap_update);
+ }
}
static void