diff options
author | ajs <ajs> | 2004-12-29 20:41:26 +0000 |
---|---|---|
committer | ajs <ajs> | 2004-12-29 20:41:26 +0000 |
commit | b87f772abe45b24f3aeefc807d0a2e4344ec0754 (patch) | |
tree | 0a18d319acddbaa7a759e760a460e0751e03ac73 | |
parent | be21024692560b48a77e691fe31c16bb854376de (diff) |
2004-12-29 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* ospf_packet.c: (ospf_read) Always look up the interface if
ospf_recv_packet returns NULL ifp, since some platforms such
as Solaris 8 appear to support ifindex retrieval but don't.
-rw-r--r-- | ospfd/ChangeLog | 6 | ||||
-rw-r--r-- | ospfd/ospf_packet.c | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog index e4519a81..d0d40120 100644 --- a/ospfd/ChangeLog +++ b/ospfd/ChangeLog @@ -1,3 +1,9 @@ +2004-12-29 Andrew J. Schorr <ajschorr@alumni.princeton.edu> + + * ospf_packet.c: (ospf_read) Always look up the interface if + ospf_recv_packet returns NULL ifp, since some platforms such + as Solaris 8 appear to support ifindex retrieval but don't. + 2004-12-22 Hasso Tepper <hasso at quagga.net> * ospf_dump.c: Show debug configuration in vtysh. diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index ea79ee79..0a6572d0 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -2341,11 +2341,11 @@ ospf_read (struct thread *thread) iph = (struct ip *) STREAM_DATA (ibuf); sockopt_iphdrincl_swab_systoh (iph); - /* openbsd lacks IP_RECVIF */ -#if !(defined(IP_PKTINFO) || defined(IP_RECVIF)) if (ifp == NULL) + /* Handle cases where the platform does not support retrieving the ifindex, + and also platforms (such as Solaris 8) that claim to support ifindex + retrieval but do not. */ ifp = if_lookup_address (iph->ip_src); -#endif /* !((defined(IP_PKTINFO) || defined(IP_RECVIF)) */ if (ifp == NULL) { |