]> git.puffer.fish Git - mirror/frr.git/commitdiff
2004-10-22 Paul Jakma <paul@dishone.st>
authorpaul <paul>
Fri, 22 Oct 2004 12:05:17 +0000 (12:05 +0000)
committerpaul <paul>
Fri, 22 Oct 2004 12:05:17 +0000 (12:05 +0000)
* 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.

ospfd/ChangeLog
ospfd/ospf_network.c
ospfd/ospf_packet.c

index 31ee303d8cfab5c25d9320ad86dc68c115bd1093..2b77ed4682656a9bc09a91b8b9d51fb26b2e1f1f 100644 (file)
@@ -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
index 63851879e7bc637ffa330eb0f0fd4569fd3e4015..266f775a81bfa8a2e5e3c4604867918bcd0d7bcd 100644 (file)
@@ -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");
 
index dc1ee0ba0fb3547d9054bf6219028251e5783aca..84f790ac3b7a104f19515b3495eda31768e7c274 100644 (file)
@@ -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);