summaryrefslogtreecommitdiff
path: root/ospfd/ospf_network.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_network.c')
-rw-r--r--ospfd/ospf_network.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/ospfd/ospf_network.c b/ospfd/ospf_network.c
index 2f167a50a5..6caa38d68b 100644
--- a/ospfd/ospf_network.c
+++ b/ospfd/ospf_network.c
@@ -48,12 +48,12 @@ extern struct zebra_privs_t ospfd_privs;
/* Join to the OSPF ALL SPF ROUTERS multicast group. */
int
ospf_if_add_allspfrouters (struct ospf *top, struct prefix *p,
- unsigned int ifindex)
+ ifindex_t ifindex)
{
int ret;
ret = setsockopt_ipv4_multicast (top->fd, IP_ADD_MEMBERSHIP,
- htonl (OSPF_ALLSPFROUTERS),
+ p->u.prefix4, htonl (OSPF_ALLSPFROUTERS),
ifindex);
if (ret < 0)
zlog_warn ("can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %s, "
@@ -69,12 +69,12 @@ ospf_if_add_allspfrouters (struct ospf *top, struct prefix *p,
int
ospf_if_drop_allspfrouters (struct ospf *top, struct prefix *p,
- unsigned int ifindex)
+ ifindex_t ifindex)
{
int ret;
ret = setsockopt_ipv4_multicast (top->fd, IP_DROP_MEMBERSHIP,
- htonl (OSPF_ALLSPFROUTERS),
+ p->u.prefix4, htonl (OSPF_ALLSPFROUTERS),
ifindex);
if (ret < 0)
zlog_warn ("can't setsockopt IP_DROP_MEMBERSHIP (fd %d, addr %s, "
@@ -89,13 +89,12 @@ ospf_if_drop_allspfrouters (struct ospf *top, struct prefix *p,
/* Join to the OSPF ALL Designated ROUTERS multicast group. */
int
-ospf_if_add_alldrouters (struct ospf *top, struct prefix *p, unsigned int
- ifindex)
+ospf_if_add_alldrouters (struct ospf *top, struct prefix *p, ifindex_t ifindex)
{
int ret;
ret = setsockopt_ipv4_multicast (top->fd, IP_ADD_MEMBERSHIP,
- htonl (OSPF_ALLDROUTERS),
+ p->u.prefix4, htonl (OSPF_ALLDROUTERS),
ifindex);
if (ret < 0)
zlog_warn ("can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %s, "
@@ -110,13 +109,12 @@ ospf_if_add_alldrouters (struct ospf *top, struct prefix *p, unsigned int
}
int
-ospf_if_drop_alldrouters (struct ospf *top, struct prefix *p, unsigned int
- ifindex)
+ospf_if_drop_alldrouters (struct ospf *top, struct prefix *p, ifindex_t ifindex)
{
int ret;
ret = setsockopt_ipv4_multicast (top->fd, IP_DROP_MEMBERSHIP,
- htonl (OSPF_ALLDROUTERS),
+ p->u.prefix4, htonl (OSPF_ALLDROUTERS),
ifindex);
if (ret < 0)
zlog_warn ("can't setsockopt IP_DROP_MEMBERSHIP (fd %d, addr %s, "
@@ -130,7 +128,7 @@ ospf_if_drop_alldrouters (struct ospf *top, struct prefix *p, unsigned int
}
int
-ospf_if_ipmulticast (struct ospf *top, struct prefix *p, unsigned int ifindex)
+ospf_if_ipmulticast (struct ospf *top, struct prefix *p, ifindex_t ifindex)
{
u_char val;
int ret, len;
@@ -151,7 +149,7 @@ ospf_if_ipmulticast (struct ospf *top, struct prefix *p, unsigned int ifindex)
zlog_warn ("can't setsockopt IP_MULTICAST_TTL(1) for fd %d: %s",
top->fd, safe_strerror (errno));
- ret = setsockopt_ipv4_multicast_if (top->fd, ifindex);
+ ret = setsockopt_ipv4_multicast_if (top->fd, p->u.prefix4, ifindex);
if (ret < 0)
zlog_warn("can't setsockopt IP_MULTICAST_IF(fd %d, addr %s, "
"ifindex %u): %s",