diff options
author | paul <paul> | 2004-10-22 12:05:17 +0000 |
---|---|---|
committer | paul <paul> | 2004-10-22 12:05:17 +0000 |
commit | ac1912327ea078f1336d54fdb1177592f94a7980 (patch) | |
tree | 0c1f6707631855387c9babee1ebe7e92e3fa4cf0 /ospfd/ospf_packet.c | |
parent | 23b9c61e5bb60d557b07dc1d7c4d7614f63dc009 (diff) |
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.
Diffstat (limited to 'ospfd/ospf_packet.c')
-rw-r--r-- | ospfd/ospf_packet.c | 6 |
1 files changed, 6 insertions, 0 deletions
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); |