summaryrefslogtreecommitdiff
path: root/pimd/pim_static.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-03-02 15:00:46 -0300
committerRenato Westphal <renatowestphal@gmail.com>2019-03-29 11:32:21 -0300
commit8f88441d717c0ded412543cceabf0ddd93ee9f09 (patch)
tree0a460d2da46a5b910535529c92e8db2fa5ff2a74 /pimd/pim_static.c
parent6a534dcafcb623f1b85b5ee2a13c74faab227ced (diff)
parent700e9faa28bbdc3460e1d7aa109b6e4acaf347b3 (diff)
Merge remote-tracking branch 'frr/master' into rip-vrf
Merge commit to solve a bunch of conflicts with other PRs that were merged in the previous weeks. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'pimd/pim_static.c')
-rw-r--r--pimd/pim_static.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pimd/pim_static.c b/pimd/pim_static.c
index 9569b7dcac..442b22e06f 100644
--- a/pimd/pim_static.c
+++ b/pimd/pim_static.c
@@ -37,12 +37,12 @@ void pim_static_route_free(struct static_route *s_route)
XFREE(MTYPE_PIM_STATIC_ROUTE, s_route);
}
-static struct static_route *static_route_alloc()
+static struct static_route *static_route_alloc(void)
{
return XCALLOC(MTYPE_PIM_STATIC_ROUTE, sizeof(struct static_route));
}
-static struct static_route *static_route_new(unsigned int iif, unsigned int oif,
+static struct static_route *static_route_new(ifindex_t iif, ifindex_t oif,
struct in_addr group,
struct in_addr source)
{
@@ -76,7 +76,7 @@ int pim_static_add(struct pim_instance *pim, struct interface *iif,
ifindex_t iif_index = pim_iif ? pim_iif->mroute_vif_index : 0;
ifindex_t oif_index = pim_oif ? pim_oif->mroute_vif_index : 0;
- if (!iif_index || !oif_index) {
+ if (!iif_index || !oif_index || iif_index == -1 || oif_index == -1) {
zlog_warn(
"%s %s: Unable to add static route: Invalid interface index(iif=%d,oif=%d)",
__FILE__, __PRETTY_FUNCTION__, iif_index, oif_index);