summaryrefslogtreecommitdiff
path: root/ospfd
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ChangeLog7
-rw-r--r--ospfd/ospf_network.c3
-rw-r--r--ospfd/ospf_packet.c6
3 files changed, 15 insertions, 1 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index 31ee303d..2b77ed46 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -1,3 +1,10 @@
+2004-10-22 Paul Jakma <paul@dishone.st>
+
+ * ospf_network.c: (ospf_sock_init) call neutral setsock_ifindex()
+ function.
+ * ospf_packet.c: (ospf_read) manually look up ifindex
+ if system could not have returned one, eg openbsd.
+
2004-10-19 Andrew J. Schorr <aschorr@telemetry-investments.com>
* ospf_snmp.c: (ospf_snmp_if_update) Fix logic to handle PtP links
diff --git a/ospfd/ospf_network.c b/ospfd/ospf_network.c
index 63851879..266f775a 100644
--- a/ospfd/ospf_network.c
+++ b/ospfd/ospf_network.c
@@ -201,7 +201,8 @@ ospf_sock_init (void)
zlog_warn ("IP_HDRINCL option not available");
#endif /* IP_HDRINCL */
- ret = setsockopt_pktinfo (AF_INET, ospf_sock, 1);
+ ret = setsockopt_ifindex (AF_INET, ospf_sock, 1);
+
if (ret < 0)
zlog_warn ("Can't set pktinfo option");
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index dc1ee0ba..84f790ac 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -2303,6 +2303,12 @@ ospf_read (struct thread *thread)
if (ibuf == NULL)
return -1;
+ /* openbsd lacks IP_RECVIF */
+#if !(defined(IP_PKTINFO) || defined(IP_RECVIF))
+ if (ifp == NULL)
+ ifp = if_lookup_address (iph->ip_src);
+#endif /* !((defined(IP_PKTINFO) || defined(IP_RECVIF)) */
+
if (ifp == NULL)
{
stream_free (ibuf);