From 5956c781b055f1c4e79a56666bf0668e1565feb0 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 17:48:26 +0000 Subject: keepalived-2.0.10 base --- diff --git a/AUTHOR b/AUTHOR new file mode 100644 index 0000000..66010a5 --- /dev/null +++ b/AUTHOR @@ -0,0 +1 @@ +Alexandre Cassen, diff --git a/CONTRIBUTORS b/CONTRIBUTORS new file mode 100644 index 0000000..0dff03f --- /dev/null +++ b/CONTRIBUTORS @@ -0,0 +1,29 @@ +Jan Holmberg, : + o Memory framework + o HTTP/SSL checkers + +Bradley Baetz, : + o MISC checker redesign + o Scheduler framework extension to support + child process handling. + o Daemon framework extension to block SIGCHLD + to only receive it when its unblocked in the + scheduling select loop. + +Jeremy Rumpf, : + o Added SMTP checker + +Chris Caputo, : + o Added dont_track_primary, nopreempt, + preempt_delay, and misc_dynamic. + +Kevin Lindsay, : + o Fixed shadowed declaration reported by -Wshadow. + o Redesigned signal handling. + +Nick Couchman, : + o Patch for u_threshold and l_threshold support. + +Willy Tarreau, : + o Extended VRRP framework to support floating + priority. diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..e792c82 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,7208 @@ +2018-11-12 Alexandre Cassen + * keepalived-2.0.10 + * Fix compiling on Alpine Linux. + * Stop printf compiler warning on Alpine Linux due to rlim_t. + * manpage cosmetic. + * Fix removing snmpd read threads when snmpd becomes unavailable. + * Update to support libipset version 7. + * Use ipset_printf for ipset messages so can go to log. + * When opening files for write, ensure files can only be read by root. + Issue #1048 referred to CVE-2018-19046 regarding files used for + debugging purposes could potentially be read by non root users. + This commit ensures that such log files cannot be opened by non root + users. + * Disable fopen_safe() append mode by default + If a non privileged user creates /tmp/keepalived.log and has it open + for read (e.g. tail -f), then even though keepalived will change the + owner to root and remove all read/write permissions from non owners, + the application which already has the file open will be able to read + the added log entries. + Accordingly, opening a file in append mode is disabled by default, and + only enabled if --enable-smtp-alert-debug or --enable-log-file (which + are debugging options and unset by default) are enabled. + This should further alleviate security concerns related to CVE-2018-19046. + * vrrp: add support to constant time memcmp. + Just an update to use best practise security design pattern. While + comparing password or hmac you need to ensure comparison function + is time constant in order to figth against any timing attacks. We + turn off potential compiler optimizations for this particular + function to avoid any short circuit. + * Make sure a non privileged user cannot read keepalived file output + Ensure that when a file such as /tmp/keepalived.data is wriiten, + no non privileged can have a previous version of that file already + open, thereby allowing them to read the data. + This should fully resolve CVE-2018-19046. + +2018-11-08 Alexandre Cassen + * keepalived-2.0.9 + * Fix updating a timer thread's timeout. + Issue #1042 identified that the BFD process could segfault. This + was tracked down to a timer thread which had already expired having + its timeout updated by timer_thread_update_timeout(). + The sands timer should only be updated if the thread is on a waiting + queue, and not if it has already timed out or it is unused. + * Don't requeue read thread if it is not waiting. + This update matches commit 09a2a37 - Fix updating a timer thread's + timeout should. + * Allow BFD instance to recover after send error. + If sendto failed in bfd_send_packet(), the bfd instance was put into + admin down state, but there was no means for the bfd instance to + transition out of admin down state. + This commit makes keepalived log the first instance of a sequence of + failures to send a bfd packet, but does not bring the bfd instance down + in case the error is a transient error. If the error is longer lasting, + the remote system will timeout, transition to down state, and send a message + saying it is down. + Once the bfd instance can start sending again the bfd instance can now + transition again to up state. + * Make DGB definition use log_message() rather than syslog(). + * Fix building with --enable-debug configure option. + * Start list of required kernel features in INSTALL file. + Issue #1024 asked what kernel features are needed to support keepalived. + The simple answer was that it isn't recorded anywhere, so this is a + start of making a list of the features required. + * Make list_remove() call list free function and add list_transfer(). + If an element is being removed from a list, the free function should + be called. + list_transfer() allows a list element to be moved from one list to + another without freeing and reallocating the list element control + information. + * Add mem_check diagnostics re calling functions of list functions. + When using mem_check, mallocs and frees were recorded against the + list functions, and the originating functions weren't identified. + This patch adds recording of the functions calling the list + functions so that the originating function is identified. + * Simplify the processing of comments in configuration files. + This commit moves the handling (and removal) of comments to a + single function (called from read_line()) which simplifies the + processing of config files. + * Add ~SEQ(start, step, end) config functionality + Where a configuration has repeated blocks of configuration where + the only thing that changes is a numeric value (e.g. for VRIDs + from 1 to 255) this allows the block to be defined once, and a + single line using ~SEQ can then generate all the blocks. + * Use REALLOC when building a multiline definition. + The code used to use MALLOC, strcpy() and FREE, but REALLOC can do + all this for us. + * Improve mem-check diagnostics. + When using an allocation list of over 50,000 entries, it was quite slow + searching thtough all the entries to find the matching memory allocation, + and to find free entries. This commit changes to using malloc() to create + entries, and a red-black tree to hold the entries. It also has a separate + list of free entries. + This commit also adds 4 more types of memory allocation error, and + improves the consistency of the entries in the log files. + * Don't attempt to delete VMAC when underlying interface is deleted. + If the underlying interface of one of our vmacs is deleted, and we + know the vmac has been deleted, don't attempt to delete it again. + * Include master state in determining if vmacs are up or down + Netlink doesn't send messages for a state change of a macvlan when + the master device changes state, so we have to track that for + ourselves. + * Turn off parser debugging. + * Make test/mk_if create iptables chains. + * Handle interfaces not existing when keepalived terminates. + If the underlying interface of a vmac we created has been deleted, + the vmac will not exist so don't attempt to delete it again. Also, + don't attempt to reset the configuration of the underlying interface. + * Handle the underlying interface of a macvlan interface going up/down. + The kernel doesn't send netlink messages for macvlans going up or + down when the underlying interface transitions (it doesn't even + update their status to say they are up/down), but the interfaces + don't work. We need to track the state of the underlying interfaces + and propagate that to the macvlan interfaces. + * Fix duplicate value in track_t enum. + * Fix check for matching track types. + * Treat macvtap interfaces in the same way as macvlan interfaces. + * Improve handling of interfaces not existing when keepalived starts. + * Fix handling interface deletion and creation of vmacs on macvlan i/fs. + * When interface created, open sockets on it if used by VRRP directly + If an interface is created that has vrrp instances configured on it + that don't use VMACs, or use vmac_xmit_base, then the raw sockets + must be opened. + * Force seeing a transition to up state when an interface is created. + * Fix netlink remnant data error. + * Add command line and configuration option to set umask. + Issue #1048 identified that files created by keepalived are created + with mode 0666. This commit changes the default to 0644, and also + allows the umask to be specified in the configuration or as a command + line option. + * Fix compile warning introduced in commit c6247a9. + Commit c6247a9 - "Add command line and configuration option to set umask" + introduced a compile warning, although the code would have worked OK. + * When opening files for write, ensure they aren't symbolic links. + Issue #1048 identified that if, for example, a non privileged user + created a symbolic link from /etc/keepalvied.data to /etc/passwd, + writing to /etc/keepalived.data (which could be invoked via DBus) + would cause /etc/passwd to be overwritten. + This commit stops keepalived writing to pathnames where the ultimate + component is a symbolic link, by setting O_NOFOLLOW whenever opening + a file for writing. + This might break some setups, where, for example, /etc/keepalived.data + was a symbolic link to /home/fred/keepalived.data. If this was the case, + instead create a symbolic link from /home/fred/keepalived.data to + /tmp/keepalived.data, so that the file is still accessible via + /home/fred/keepalived.data. + There doesn't appear to be a way around this backward incompatibility, + since even checking if the pathname is a symbolic link prior to opening + for writing would create a race condition. + * Make netlink error messages more meaningful. + * Fix compiling without support for macvlans. + * fix uninitialized structure. + The linkinfo and linkattr structures were not initialized, + so we should not expect that unexistant attributes are set + to NULL. Add the missing memset(). + * fix socket allocation with dynamic interfaces. + When there are several vrrp instance binding different interfaces that + don't exist at startup, their ifindex is set to 0 in the sock. The + function already_exist_sock() that lookup for an existing socket will + always return the first sock because the ifindex is the same. + Later, when an interface appears, the fd will be created for one + instance, and all instances will wrongly use this fd to send the + advertisments. + Fix this by using the interface structure pointer instead of the + ifindex as the key for sock lookup. + The problem was identified by Olivier Matz + who also provided a patch fixing the problem. This patch is a slight + rework of Olivier's patch, better using the existing data structures + that keepalived already holds. + * When creating a macvlan interface, use AF_UNSPEC rather than AF_INET. + * Stop using libnl for configuring interfaces. + Since there is code to configure the interfaces using netlink without + using libnl, there is no point in having code to do it using libnl. + * Fix building on Centos 6.5. + * Stop including some files not needed after libnl removal for i/fs. + * Fix some compilation issues when building without vrrp support. + * Stop using linbl for mcast group membership and setting rx buf sizes. + Since there is code to handle multicast group membership and + setting kernel netlink receive buffer sizes without using libnl, + there is no point in having code to do it using libnl. + This now means that the vrrp functionality no longer uses libnl. + * Add some sanity checking of configure options. + Certain invalid combinations of configure options could cause compile + errors, e.g. --disable-vrrp --enable-vrrp-fd-debug. This commit ensures + that invalid combinations aren't allowed, in order to stop the compile + errors. + * Fix invalid configuration combination caught by previous commit. + * Use netlink to set/clear rp_filter on interfaces. + * Fix configure for building without vrrp. + * Actually update the .travis.yml file to fix the problem. + * Fix conditional compilation re epoll-thread-dump debugging. + * Update INSTALL file now no longer use libnl-route-3. + * Stop cast to incompatible function type warnings from gcc 8.1. + * Update snapcraft.yaml not to include libnl-route-3. + * keepalived exit with non-zero exit code if config file not readable. + * Allow specifying default config file at configure time. + * Use keepalived define for exit code when malloc failure. + * Fix configuring fixed interface type. + * Add configuring keepalived default configuration file. + * Fix return value in get_time_rtt() error path. + * Update generation of git-commit.h. + * snapcraft.yaml: Enable all sensible build options. Preserve build time + version in the snap version. Expose genhash. + * snapcraft.yaml: Build keepalived with Linux 3.13 headers. + * snap: Add an install hook to make sure a keepalived configuration exists. + * snap: Move the hooks to the correct location. + * snap: Make sure /etc/keepalived exists. + * Fix building with IP_MULTICAST_ALL in linux/in.h but not netinet/in.h + Issue #1054 identified that configure was checking the definition of + IP_MULTICAST_ALL in linux/in.h but including netinet/in.h, which also + has the definition, but only from glibc 2.17. + This commit creates a local definition (in lib/config.h) of IP_MULTICAST_ALL + if it is defined in linux/in.h but not in netinet/in.h. The reason for + this is that compiles using linux/in.h fail due to conflicting definitions. + * Fix creating iptables tables in mk_if. + * Update .travis.yml to use xenial. + * Update .travis.yml to add --enable-regex option. + * Tidy up .travis.yml file. + * snap: Build multiple keepalived binaries. + * Updated snapcraft builds to support multiple kernel versions. + +2018-10-21 Alexandre Cassen + * keepalived-2.0.8 + * Improve identifing interface as macvlan when reading interface details + * Enslave a VMAC to the VRF master of the underlying interface. + * Use addattr32 rather than addattr_l for if_index. + * Only include VRF support if kernel headers support it. + * Fix --enable-timer-debug configure option. + * Fix some configure.ac enable option tests. + * Include stdbool.h in process.c. + * Fix diagnostic message re ignoring weight of tracked interface. + * Fix track_bfds with weights. + * Correct conditional compilation definition name. + * Fix memory leak in HTTP_GET/SSL_GET. + * Fix two memory leaks in DNS_CHECK. + * Don't consider retries for BFD_CHECK. The BFD_CHECKer doesn't support + retries, and the check was causing the checker not to transition to + down state. + * Fix memory leak with BFD_CHECK. + * Restart global notify FIFO handler after reload. + * modify @WITH_REGEX@ to @WITH_REGEX_TRUE@ + * Fix compiling without BFD support. + * Stop bfd process sending double the number of packets. + If a bfd process received an initial bfd packet, it scheduled a + second bfd_sender_thread thereby causing two packets to be sent + in every interval. + * Use timerfd for select timeouts rather than select timeout parameter + This is a precursor to moving to using epoll. + * Use epoll rather than select. + epoll is both more efficient than select and also doesn't have a + file descriptor limit of 1024, which limited the number of vrrp + instances that could be managed. + This commit also introduces read-black trees and the list_head + list type. + * Add --enable-timer-check option for logging calls for getting time + Calls to update the current time from the kernel are made too + frequently, and this patch logs when the calls are made, and how + long since the previous call, so unnecessary calls can be removed. + * Add debug option for monitoring epoll queues. + This is enabled by --enable-epoll-debug and replaces + --enable-timer-debug. + * Use system monotonic clock to generate a monotonic clock. + Rather than have our own code for creating a monotonic clock, use + the kernel's monotonic clock. + * Make some functions in timer.c inline. + The functions had one line of code so inlining them is more + efficient. + * Fix requeueing read and write threads after read/write timeouts. + * Fix initial allocating and final freeing of thread_master epoll_events. + * When cleaning up threads, also clean up their thread_events. + * Add thread_close_fd() function to release thread_event_t on close + When a file descriptor that has been monitored by epoll is closed + the thread_event_t structure used for managing epoll for that fd + has to be release. Therefore calls to close() and replace by calls + to thread_close_fd(). + * Make parent process write log entry when it is reloading. + * Move checking for thread timeouts to timerfd_handler + There is no point in checking for thread timeouts if the timerfd + isn't readable; in other words only check for thread timeouts if + the timer has expired. + * Make bfd reschuling timer threads more efficient. + * Streamline DNS_CHECK code. + * Fix buffer overrun with track file path names. + * Add timestamp when writing mem_check entries to file. + * Ensure thread_event_t released for ready threads at termination. + * Increase open file limit if large number of VRRP instances. + Each VRRP instance can use up to 2 file descriptors, and so if there + are more than 500 ish VRRP instances the number of open files + can exceed the default per process limit (1024 on my system). + The commit allows 2 file descriptors per vrrp instance plus a few more, + and if the RLIMIT_NOFILE value returned by getrlimit isn't high enough, + keepalived will increase the limit. + * Ensure that child processes run with standard priorities/limits. + When child processes such as notify scripts, track_scripts and + MISC_CHECK scripts are run, they should not inherit any elevated + priorities, system limits etc from the parent keepalived process. + * Change multiple spaces to tabs in scheduler.h. + * Add family to sockpool listing. + * Fix a multiline definition expansion issue. + * Free allocated cache when closing/freeing netlink socket. + When running on a system with 500+ interfaces configured and adding + 1000 VMAC interfaces, the heap was growing by 340Mb due the netlink + cahce not being freed after creating each VMAC interface. With this + patch the heap only grow by 3.7Mb (if creating 1000 VMAC interfaces + the heap grep by 905Mb now reduced to 6.1Mb). + * Stop using netlink cache when adding and configuring VMAC interfaces. + When running on a system with 500+ interfaces configured and adding + 1000 VMAC interfaces, it was taking 2.3 seconds to add the interfaces. + Without populating a netlink cache each time a VMAC interface is created + it now takes 0.38 seconds to add the interfaces (if creating 1000 VMAC + interfaces it was taking 6.1 seconds, now reduced to 0.89 seconds, and + the heap growth is reduced from 6.1Mb to 3.9Mb). + * Add function rtnk_link_get_kernel for dynamic linking. + * Fix compiling without JSON support. + * Add support for recording perf profiling data for vrrp process. + * Add comment re usage of MAX_ALLOC_LIST. + * Some streamlining of scheduler.c. + * Merge --enable-epoll-debug and --enable-dump-threads functionality. + * Let thread_add_unuse() set thread type, and use thread_add_unuse() more. + * Use break rather than return in process_threads(). + * Fix segfault when reloading with HTTP_GET and no regex configured. + * Merge the next-generation scheduler. + * Make all debug options need enabling at runtime. + Previously if configure enabled a debug option its output was always + recorded, which meant that if one didn't want the output, configure/ + compile was needed. This commit adds command line options that need to + be set in order to turn the debugging on. + * Remove unwanted debug message. + * Fix parsing --debug options. + * Fix rb tree insertion with timers. + * Add missing functions for thread debugging. + * Add vrrp instance VMAC flags when dumping configuration. + * Ensure parent thread terminates if child has permanant config error. + * Ensure don't delete VMAC interface if keepalived didn't create it. + and sundry fixes. + * If receive lower priority advert, send GARP messages for sync group. + A recent update to issue #542 identified that following recovery + from a split brain situation, GARP messages weren't being sent. It + transpired that, if a member of a sync group in master state received + a lower priority advert and vrrp_higher_prio_send_advert is set, a + further (lower priority) advert is sent, and the instance and all the + members of the sync group transition to backup (the other members of + the sync group don't send a further advert since they haven't received + a higher priority advert). This meant that the other members of the + sync group on the keepalived instance that remained master didn't + receive a lower priority advert, and so didn't send further GARP + messages. + This commit changes keepalived's behaviour, so that if a vrrp instance + is sending GARP messages due to receiving a lower priority advert + and it is a member of a sync group, keepalived will also send GARP + messages for any other member of the sync group that have + garp_lower_prio_rep set. + * Allow 0.0.0.0 and default/default6 for rule/route to/from addresses. + * Check return value of SSL_CTX_new(). + * Check return values of SSL_new() and BIO_new_socket(). + * Only allow subnet masks with routes or virtual IP addresses. + For example, if specifying a via address or preferred source address + for a route, it isn't valid to specify a subnet mask. + * Add inet/inet6 to specify ip route/rule family if ambiguous. + * Remove superfluous parameter from parse_route(). + * Add "any" and "all" as synonyms for "default". + * Fix memory leak if route destination address is wrong address family. + * Add ttl-propagate route option. + * Fix checking return status of kill(). + * Fix building with --enable-debug configure option. + * Stop delay in reload when using network namespaces. + If running in a network namespace, getaddrinfo() could take over + 30 seconds before timing out while trying to contact a name + server. To alleviate this, the hostname is remembered from when + keepalived started. + * Fix spelling of propagate in propagate_signal(). + * Fix effective_priority after reload if tracked interface down. + * Cosmetic grammatical changes. + * Add debug option for dumping vrrp fd lists. + * Fix calculation for vrrp fd timers. + Starting or reloading keepalived when an interface that was tracked + interface was failed was stopping other vrrp instances that were on + the same interface but not using VMACs coming up. + * Move code for initialising tracking priorities to vrrp_track.c. + * Don't overwrite track file on reload. + * Don't attempt to write track file if path not specified. + * Fix compiling when not using --enable-vrrp-fd-debug. + * Fix compiling with configure --enable-vrrp-fd-debug. + * Add sync group track_bfds and track file status to config dump. + * Move initialisation of track_files. + * Don't alter effective_priority if track_file take vrrp instance down. + * Don't log vrrp instance in fault state at reload if already fault. + * Fix calculating fd timer if all vrrp sands are set to TIMER_DISABLED. + * Don't make all sync groups transition to backup on reload + If a sync group was in master state, and can still be after a reload + then allow it to stay in master state. + * Don't have track_bfd list in vrrp_sgroup_t in BFD not enabled. + * Fix memory leak re vrrp_sgroup_t track lists. + * Tidy up some freeing of MALLOC'd memory. + Use FREE_PTR if it is not known if the pointer is valid, and don't + clear the pointer afterr FREE/FREE_PTR since FREE does it anyway. + * Add memory.c list size definition and move definition from memory.h. + * Increase size of checksum value for MEM_CHECK. + * Don't store checksum of memory allocation block. It can be calculated + from the size, so do so. + * Make the checksum for memory allocation blocks unsigned. + * Use an enum for memory allocation block types. + * Update comment re debug bit for memory detect error. + * In memory alloc debug code report free or realloc for not alloc'd. + * Allow for PIDs up to 2^22 (7 decimal digits). + * Add function for dumping memory allocation while running. + * Fix max memory allocation size calculations. + * Fix reporting original and new file/line/func for realloc. + * Check matching block for realloc is allocated. + The same memory block may have been previously allocated and freed, + so we need to make sure that the block we find is currently marked + as allocated. + * Use a new MEMCHECK struct for realloc overrun detected + It was marking the allocated block as an overrun block, whereas it + needs to be an allocated block, so use a new block to mark the + overrun. + * Tidy up working of a couple of memory allocation messages. + * Use for loops rather than while blocks in memory allocation code. + * Report number of mallocs and reallocs with MEMCHECK. + * Attempt to log first free after double free in MEMCHECK. + * Streamline use of buf/buffer in memory.c. + * Always use first free entry in alloc_list for MEMCHECK. + * Define MEMCHECK alloc_list size via configure. + * Align keepalived_free() and keepalived_realloc(). + * Make char * const where possible for MEMCHECK. + * Merge MEMCHECK keepalived_free() and keepalived_realloc(). + Most of the code was common between the two (or should have been), + so it makes sense for them to use common code. + * Ensure only relevant thread types run during shutdown. + * Fix building without --enable-mem-check. + * Use rbtree search for finding child thread on child termination. + It was doing a linear search of the rbtree in timeout order. This + commit adds another rbtree for child processes (vrrp track scripts + and check_misc scripts), sorted by PID, to make the search by PID + more efficient. + * Make rbtree compare function thread_timer_cmp() more efficient. + * Remove child_remover functionality - it was superfluous. + * Fix checking that there are no duplicate vrrp instances configured + The tuple {interface, family, vrid} must be unique. The check for + this was being made completely incorrectly. + * Delay creating vrrp notify FIFO. + * Remove struct sockaddr_storage saddr from sock_t. + * Use an rbtree for finding vrrp instance for received advert. + Previously the code search a list of pointers to vrrp instances and + looked for a matching fd and vrid. In order to optimise this, it was + implemented using an mlist whose index was a hash of the fd and vrid. + This commit changes the approach and uses an rbtree for each sock_t. + Since the sock_t that the advert was received on is known, the rbtree + search is only searching for a match on the vrid. + Not only is this more efficient, but it is simpler, uses standard code, + and reduces the code by over 60 lines. + * Use an rbtree for finding vrrp instance for socket timeout. + Previously the code search a list of pointers to vrrp instances and + looked for matching file descriptor and sands < time_now. In order to + optimise this, it was implemented using an mlist whose index was a hash + of the fd. + This commit changes the approach and uses a second rbtree for each sock_t. + Since the sock_t that the timeout occurred on is known, the rbtree + search is only searching for a match of the sands. + Not only is this more efficient, but it is simpler, uses standard code, + and reduces the code by over 220 lines. + * Remove superfluous checks of rbtree node != NULL in rb_move(). + * Remove superfluous check of node != NULL in rb_next(). + * Update rbtree code to Linux 4.18.10. + * Fix debug logging of sands timers before time_now. + * Update rb_for_each_entry etc and rb_move to use rb_entry_safe. + With the added definition of rb_entry_safe in the rbtree code + updated to Linux 4.18.10, the refinition of rb_entry was reverted + to the kernel definition. That meant that rb_for_each_entry, + rb_for_eacn_entry_safe and rb_move neded to be updated to use + rb_entry_safe rather than rb_entry. + * Add support functions for rbtree rb_root_cached. + This is in preparation for the use of rb_root_cached in the next + patch. + * Use cached rbtrees where the key is a timeval_t sands + When the key of an rbtree is a timeval_t sands keepalived will frequently + need to access the first node of the tree in order to calculate the next + timeout. This applies to the read, write, child and timer threads queues, + and also the vrrp queues on a sock_t. + The use of cached rbtrees for these is ideal since it gives direct access + to the first node of the queue. + * Add thread_add_read_sands to avoid introducing timer errors. + When using thread_add_read and the timeout was held as timeval_t, + it was converted to and offset from time_now, and then converted + back to a timeval_t, but time_now was updated, resulting in a + slightly different value being used as the timeout. Using + thread_add_read_sands() avoids the double conversion and results in the + timeout being more accurate. + * Replace NETLINK_TIMER with TIMER_NEVER. + It makes the code easier to read, and since NETLINK_TIMER was defined + to be TIMER_NEVER it doesn't change the functionality. + * Handle preempt delays not expiring at same time on sync group + If different vrrp instances in a sync group had preempt delays + that expired at different times keepalived looped with very small + to epoll_wait() until all preempt delays had expired, causing high + CPU utilisation. + Keepalived now reschedules vrrp instances with a delay of + 3 * advert_int + skew time while waiting for all vrrp instances in + the sync group to expire their preempt delays. + * Fix segfault when receive netlink message for default route added. + * Move vrf_master_index into conditional compilation block. + * Store interface macvlan type. + * Make vrp_master_ifp point to self for VRF master interfaces. + * Log if cannot create a VMAC due to existing interface with same name. + * Handle delete/create of macvlan i/fs which aren't keepalived's. + * Tidying up keepalived_netlink.c. + * Handle VRFs changing on macvlan i/fs which have VMACs configured on them. + * Fix recreating our VMACs if they are deleted. + * Fix detecting address add/deletion from underlying i/f of our vmacs. + * Don't use configured_ifp or base_ifp if not _HAVE_VRRP_VMAC_. + * Distinguish between VMAC on real i/f and no VMAC on macvlan i/f + If keepalived is configured to have a non VMAC interface on a macvlan + interface, we want to use the macvlan interface rather than the + underlying interface, whereas if we have a VMAC interface on a macvlan + interface, we create the VMAC on the underlying interface of the macvlan. + * Update duplicate VRID check where vrrp instance configured on macvlan. + If a VRRP instance is configured on a macvlan interface, the duplicate + VRID check needs to be done on the underlying interface. + * Check for VRID conflicts when changeable interfaces are added + For example, a vrrp instance could be configured on a macvlan, and + that macvlan could be deleted and recreated with another base interface. + The VRIDs in this case need to be checked for duplicates against the + base interface, and so the VRID check needs to be done dynamically. + In order to allow VRID conflicts to produce config errors at startup, + by default keepalived assumes that there won't be interface movements + as described above, and will only handle it if the global_defs option + 'dynamic_interfaces' is used along with the option 'allow_if_changes'. + * Remove some comments inserted for tracking changes to code. + * Fix building with --enable-debug configure option. + * Check that '{'s and '}'s are balanced in the configuration file. + * Allow more flexibility re placing of { and }. + * Improve reporting additional '}'s in configuration. + * Minor improvements re thread handling and cancellation. + * Remove unused THREAD_IF_UP and THREAD_IF_DOWN. + * Replace getpagesize() with sysconf(_SC_PAGESIZE). + * Increase netlink receive buffer for dumps to 16KiB. + * Dynamically set the netlink receive buffer size. + * Sort out setting netlink receive buffer size. + +2018-08-23 Alexandre Cassen + * keepalived-2.0.7 + * Fix buffer overflow in extract_status_code(). + Issue #960 identified that the buffer allocated for copying the + HTTP status code could overflow if the http response was corrupted. + This commit changes the way the status code is read, avoids copying + data, and also ensures that the status code is three digits long, + is non-negative and occurs on the first line of the response. + * Some fixes for config-test. + * Change ka_config_error() to report_config_error(). + * Read interface addresses when doing config-test. + * Update documentation re garp_lower_prio_repeat. + * Add comment re tracking routes with nexthops doesn't work. + * Fix handling of default_interface + Issue #963 identified that default_interface wasn't being set + correctly. The problem was that the configuration was read by the + parent process, but the parent process doesn't know about the + system interfaces. + Fix commit makes the vrrp process set the default interface when + it starts. + * Fix a segfault in checker process on reload + Issue #955 identified a segfault when keepalived reloads. This + was caused by attempting to set the receive buffer size on a + netlink socket that was not open. It now only attempts to set + buffer sizes on the netlink sockets that are open. + * Use report_config_error() in check_parser.c. + * Don't run a sublevel close handler on a skipped configuration block + If a configuration block was skipped due to an error, the configuration + read won't be valid and may not even exist, so make sure the sublevel + end handler isn't run. + An example is if a virtual_server block is skipped, then the sublevel + end handler would have run against the previous (if any) virtual_server, + and if there hadn't been a previous virtual_server block it could + segfault. + * Tidy up use of inet_stosockaddr. + * Add more error checking to read_timer() and its uses. + * Add validation of lvs_sched. + * Use report_config_error() in checker parsers + Thwese should have been included in commit ead70947 - + "Update config-test". + * Add stronger validation of numeric fields + Issue #955 identified that invalid parameters in advert_int, delay_loop, + lb_algo/lvs_sched, lb_kind/lvs_method, quorum, ip_family, virtual_server + and real_server ports, weights and connect_timeout were not being reported. + This commit will now report any errors in those fields, and a number of + other fields. + * Improve parsing of virtual_router_id. + * Allow virtual server ports not to be specified + If the service is persistent, a "wild-card" port can be used. + * Prepend WARNING to read_int/unsigned/double messages if not rejecting + read_int()/read_unsigned()/read_double() can output log messages if + the syntax is invalid but the configuration is being accepted, e.g. + parsing 12zyx will return 12 if _STRICT_CONFIG_ is not defined. In + this case we want to indicate that the entry is not valid, but we + are still processing it, so prepend the error message with WARNING. + * Improve parsing of virtual server group address ranges + An address range of 10.9.8.7-10.9.8.15 was parsed as 10.9.8.7-10 + and no error was reported, although someone might have expected + that this would mean 10.9.8.7-15. + keepalived will now report a configuration warning, and if + keepalived is configured with --enable-strict-config-checks the + configuration will be rejected. + * Restore original string in inet_stosockaddr() + If there was a '-' or a '/' after the address, the string was modified + to terminate at that point. This commit now restores the original string. + * Allow keepalived to run with --config-test when live instance running. + * Report errors for invalid smtp_server. + * Remove inet_stom() - it was not used + inet_stom used atoi which is unsafe. Since the function was not used, + it has been simply removed. + * Rename read_(int|unsigned|double) read_(int|unsigned|double)_strvec + Want to be able to have equivalent functions just being passed a string, + so rename the functions using strvec to be explicit about that. + * Fix config dump for vrrp_garp_lower_prio_delay. + * Fix config dump of vrrp garp_refresh. + * Make config dump write fraction part of vrrp preempt delay. + * Simplify config dump of garp/gna_interval. + * dd config dump for VRRP/checker/BFD realtime_priority/limit. + * Ensure structure fully initialised for sched_setscheduler. + * Make set_process_dont_swap() and set_process_priority() static functions. + * Minimise time when keepalived runs with realtime priority + keepalived shouldn't use realtime priority when it is loading or + reloading configurations, so delay setting realtime priorities, and + revert to stardard scheduling when terminating or reloading. + * Report user/system CPU time used when exit with detailed logging. + * Make default rlimit_rtime 10000 microseconds + The previous default of 1000 microseconds was insufficient + * Stop using atoi for readong configuration weight. + * Make read_unsigned, read_int, read_double for parsing strings + These functions are analogous to read_unsigned_strvec, read_int_strvec + and read_double_strvec, but take strings as the parameter rather than + a strvec. + * Stop using atoi for parsing mask of ip addresses. + * Stop using atoi for reading VRID in Dbus code. + * Stop using atoi for reading vrrp debug level, and add to conf dump. + * Stop using atoi for parsing garp_refresh. + * Stop using atoi for parsing preempt_delay. + * Stop using atoi for parsing garp_lower_prio_repeat. + * Stop using atoi for parsing vrrp script rise. + * Stop using atoi for parsing vrrp script fall. + * Stop using atoi for parsing garp_interval/gna_interval + * Stop using atoi for parsing smtp status code + * Stop using atoi for parsing realtime scheduling priority + * Stop using atoi for parsing process priorities + * Stop using atoi for parsing global garp/gna_interval + * top using atoi for parsing genhash port number + * Stop using atoi for parsing tcp_server port number + * Stop using atoi for parsing command line log facility. + * update documentation to show range of bfd weights + * Ensure read_unsigned() detects negative numbers. + * Stop using atoi to parse HTTP_GET status code. + * Stop using atoi to parse checker port numbers. + * Use read_unsigned() for domain/inet_stosockaddr port. + * Make read_unsigned_strvec() recognise minus sign after spaces + It is possible have a word read from the configuration start with + spaces it is is enclosed in quotes, which are then removed, but + the leading spaces aren't removed. + * Make get_u8()/get_u16()/get_u32() use read_unsigned(). + * Make get_u64() properly detect -ve numbers. + * Make get_time_rtt() properly detect -ve numbers. + * Make get_addr64() handle whitespace properly and disallow '-' signs + Skip leading whitespace, don't allow embedded whitespace, and don't + allow minus signs. + * Make get_addr64() and parse_mpls_address handle whitespace + * Change more log_message() to report_config_error() in vrrp_iproute.c. + * Improve use of strtoul() in rttables.c. + * Implement get_u64() in same way as get_u8() etc. + * Fix print format specifier in read_unsigned_base + * Correct error message for garp_master_refresh + * Remove \n from error message. + * Allow round trip time to be UINT32_MAX + * Change mix_rx to min_rx for bfd_instance in documentation. + * Make bfd_parser use read_unsigned_strvec() etc rather than strtoul(). + * Fix config dump for BFD instance timers. + * Fix handling of ip rule ipproto option. + * Add read_unsigned_base_strvec() to allow number base to be specified + This requires renaming static functions read_int_int() etc to + read_int_base() etc. + * Minimise and improve use of strtoul() etc in parsing ip rules. + * Use read_int_strvec() for vrrp_version. + * Use read_int_strvec() instead of strtol() in vrrp_parser.c. + * Use read_int_strvec() instead of strtol() etc in check_parser.c. + * Use read_int_strvec() instead of strtol() etc in check_data.c. + * Improve strtoul handling for '--log_facility' command line option. + * Add documentation for lvs_timeouts config option. + * Allow vrrp garp_delay to be 0 in accordance with documentation. + * Use read_int_strvec() instead of strtol() etc in global_parser.c. + * Corret end of line detection in genhash. + * Improve genhash command line parsing use of strtoul. + * Replace CHECKER_VALUE_INT with read_unsigned_strvec due to use of strtoul. + * Remove CHECKER_VALUE_UINT definition since no longer used. + * Add conditional compilation around variable not always used. + * Only read interfaces in VRRP process. + * Enable --config-test to work with BFD configuration. + * Only add garp_delay_t's to interfaces used by VRRP instances + There is no point allocating a garp_delay_t to an interface that + isn't used by a VRRP instance, so this commit make keepalived only + allocate garp_delay_t scructures to the used interfaces. + In addition, when the configuration is dumped, list the interfaces + relevant to each garp_delay_t. + * Add logging command line options if keepalived segfaults. + * Don't free tcp checker data field on exit, since not used. + * Report configuration file line numbers when errors + Following the recent series of commits for better validation of + the configuration, and the move to reporting all configuration + errors through report_config_error(), it is now feasible to report + the configuration file line number on when the error occurs. + * Rationalise error messages when reading configuration + Now that configuration file line numbers are reported, the error + messages can be simplified since the context doesn't need to be + given in the detail as before. + * Return NULL rather than false as a pointer in parser.c + * Fix an infinite loop when parsing certain parameter substitutions + If a multiline definition had text after the '=' sign, keepalived + would loop. + * Fix a multiline parameter substitution having a replacement on 1st line + If a multiline parameter definition had a replaceable parameter or a + definition on the first non-blank line, it wasn't being handled. This commit + ensures that replaceable parameters/definitions on the first line are + handled correctly. + * Add logging command line options when keepalived starts. + * Change some log_message() to report_config_error() in vrrp_sync.c. + * Improve handling of select() returning an error + If select returned an error, the code was processing the returned + timeout and fds as though they were valid. This commits logs an + error the first time, sleeps for 1 second if it is a programming + error, and then sets up the select call again. + * Remove DBG() statement left over in previous commit. + * improve doc spelling. + * Add mh scheduler for LVS + This is similar to the sh scheduler. Options are the same but we + duplicate everything. An alternative would have been to reuse the + names for the sh scheduler. + The mh scheduler is supported starting from Linux 4.18. It's a + consistent hash scheduler. + * manpage update and re-visited. + keepalived.conf.5 be considered as THE exhaustive source of information + in order to configure Keepalived. This documenation is supported and + maintained by Keepalived Core-Team. + * Fix errors in KEEPALIVED-MIB.txt + Commit 181858d - "Add mh scheduler for LVS" introduced a couple + of formatting errors, and didn't update the revision date. + * Some SNMP library handling improvements. + * Stop bfd -- vrrp pipe read timing out + There is no need for a timeout on reading the pipe, so set the + timeout to TIMER_NEVER. + * manpage updates + Update manpage to make html convertion easy. This manpage is now + sitting in documentation tab of Keepalived website. + * Update libnl_link.c + SegFault when launch with dynamic LIBNL because of loading symbol + from wrong library. + * Fix building rpm package and instructions + Issue #977 identified that the instructions in the INSTALL file + were incorrect. + * Adds regex pattern matching for HTTP_GET and SSL_GET. + * Remove pcre build tests from Travis-CI + Travis-CI environments are too old to support libpcre2, so we have + to remove it. + * Fix #980: coredump on start when logfile cannot be accessed. + * Don't loop forever if configuration has unknown replaceable parameter. + +2018-07-23 Quentin Armitage + * keepalived-2.0.6 + * Fix genhash digest calculation. The bracketting in HASH_UPDATE was wrong. + * Bring keepalived(8) man page up to date. + * Fix segfault when IPVS_DEST_ATTR_ADDR_FAMILY not defined. + Issue #938 identified a segfault on the checker process when using + CentOS/RHEL 6. It turned out that conditional compilation check + for IPVS_DEST_ATTR_ADDR_FAMILY was not being handled correctly. + * Don't create a link-local address for vmac when vmac_xmit_base is set + Since commit 18ec95add483 ("Make vmac_xmit_base work for IPv6 + instances") VRRP advertisements are sent from the base interface and not + from the vmac interface when vmac_xmit_base is set. + Therefore, there is no need to configure a link-local address on the + vmac interface. This also means that we don't need to regenerate a + link-local address for the vmac if the link-local address was removed + from the base interface, or inherit a link-local address in case one was + configured on the base interface. + * Fix setting i/f params on a bridge underlying i/f of a VMAC + Issue #944 identified that when the underlying interface of a VMAC + interface was a bridge, keepalived was failing to set arp_ignore and + arp_filter in the underlying bridge interface. The problem appears to + lie in the libnl3 library. The description of the problem given in the + issue report was: + Problem is that ifi_family is set to AF_BRIDGE, whereas it should be set + to AF_UNSPEC. The kernel function that handles RTM_SETLINK messages for + AF_BRIDGE doesn't know how to process the IFLA_AF_SPEC attribute. + This commit stops using libnl3 for setting/clearing arp_ignore and + arp_filter, and directly constructs the netlink messages in keepalived. + * Use RTM_NEWLINK rather than RTM_SETLINK for setting i/f options + libnl3 uses RTM_NEWLINK rather than RTM_SETLINK for setting + interface options when ifi_family is AF_UNSPEC, so update commit + 9b2b2c9 - "Fix setting i/f params on a bridge underlying i/f of + a VMAC" to do likewise. + * Fix creating VMACs on 2.6.32 and earlier kernels + RTM_NEWLINK didn't support specifying interface by name until + Linux 2.6.33, and if using an earlier kernel, the netlink call + failed. This meant that the VMAC was not enabled. + * Fix setting arp_ignore and arp_filter on bridge interfaces. + * Add diagnostic message if vrrp script time out and kill fails. + * Fix compile errors and warnings when building with --enable-debug. + * Don't do md5 check unless configured. + * In http_handle_response() combine fetched_url and url + fetched_url and url always pointed to the same url, so only use + one variable. + * Store and handle HTTP_GET digest in binary form + Configured digests were being stored in character string form, and + the calculated digests were converted to strings. This commit now + handles digests as fixed length binary data, and validates the + configured digests to make sure they are valid hex strings with + the correct length. + * Add support for quote and escape handling of notify and other scripts. + Notify and other scripts need to be able to be configured with embedded + spaces, quotes and special characters for the command and the parameters. + This commit adds that ability. + * When checking script file path, only replace name part if same file. + Some executables are in the filesystem as symbolic links, and alter + their functionality based on the file part of the name. This was being + incorrectly handled by keepalived, which now checks whether a file exists + using the original name, and it it does whether it is the same file. + * Remove cmd_str from notify_script_t + The cmd_str string (sort of) duplicated what was in the args array + of a notify_script_t, but was not always accurate. With the removal + of cmd_str, whenever it needs to be output, the string is now + generated from the args array, so accurately reflects what is + actually executed. + * Add quoting and escaping for script configuration, and other minor changes. + * Use vsyslog() if available instead of syslog(). + * Report virtual server as well as real server when config dump checker. + * Only report IP_MULTICAST_ALL unset for IPv4 sockets + Commit 6fb5980 - "Stop receive message queues not being read on send + sockets" added a warning if data was received on vrrp send sockets, since + setting IP_MULTICAST_ALL should stop packets being received, but older + kernels still queued packets. + It has now been discovered the IP_MULTICAST_ALL (of course) only applies + to IPv4 and so the warning only makes sense for IPv4 sockets. + I haven't been able to find a way to stop IPv6 multicast packets being + received on the send socket. It appears that if any socket adds an IPv6 + multicast group on an interface, then any raw socket using that interface + will recieve all enabled multicast packets, and the receive socket has to + add the multicast group. + * Properly stop packets being queued on vrrp send sockets + Commit 6fb5980 - "Stop receive message queues not being read on + send sockets" did stop messages building up on the receive queue + of vrrp send sockets, but it wasn't an ideal solution, and it also + made the assumption that the problem was only occurring due to + multicast packets not being filtered when IP_MULTICAST_ALL was set, + which appears not to work properly between at least Linux 3.6.11 and + 3.16. In fact the problem also occurred when using IPv4 unicast and + IPv6 in any form, and so has been a long term issue in keepalived. + The original solution was to listen on the send socket and discard any + packets that were received. This commit takes a completely different + solution (many thanks to Simon Kirby for the suggestion) and sets a + BPF filter on send sockets that filter out all received packets on the + sockets. + This commit effectively reverts commit 6fb5980, and the subsequent + commits 88c698d8 - "Cancel read thread on send sockets when closing", + f981b55d - "Only allow vrrp_rx_bufs_policy NO_SEND_RX if have + IP_MULTICAST_ALL", 7ff7ea1f - "Another fix to listening on send socket", + and 77d947f7 - "Only report IP_MULTICAST_ALL unset for IPv4 sockets" + and partially reverts 4297f0a - "Add options to set vrrp socket receive + buffer sizes". + This commit removes the configuration option NO_SEND_RX from + vrrp_tx_bufs_policy introduced in commit 4297f0a since it is now + no longer relevant, because no packets are queued to the send socket. + * Add newlines to the keepalived.stats output for better readability. + * Add notify_master_rx_lower_pri script option and FIFO output. + If a lower priority router has transitioned to master, there has presumably + been an intermittent communications break between the master and backup. It + appears that servers in an Amazon AWS environment can experience this. + The problem then occurs if a notify_master script is executed on the backup + that has just transitioned to master and the script executes something like + a `aws ec2 assign-private-ip-addresses` command, thereby removing the address + from the 'proper' master. Executing notify_master_rx_lower_pri notification + allows the 'proper' master to recover the secondary addresses. + * Fix malloc'd memory length in open_log_file(). + +2018-06-29 Quentin Armitage + * keepalived-2.0.5 + * Update config-test option so keepalived exits with status 1 on failure. + * Fix config write of virtual server group ip addresses. + * Document default and default6 for virtual/static route destinations. + * Cancel read thread on send sockets when closing. + Commit 4297f0a - "Add options to set vrrp socket receive buffer sizes" + added reading on vrrp send sockets to stop receive queues building up + on some 3.x kernels. The commit didn't cancel the read thread on the + send sockets when the socket was closed, causing several thousand + log writes. This commit cancels the read thread. + * Exit with status 1 if config check fails, and fix terminating when + reading send sockets. + * Stop segfaulting when receive a packet (fixing commit 97aec76). + Commit 97aec76 - "Update config-test option so keepalived exits + with status 1 on failure" had a test for __test_bit(CONFIG_TEST_BIT) + the wrong way round. This commit fixes that. + * Don't assume rpm is available. + * Only allow vrrp_rx_bufs_policy NO_SEND_RX if have IP_MULTICAST_ALL. + * Improve setting up virtual/real servers with virtual server groups. + When setting up virtual servers defined by virtual server groups, + keepalived was getting confused between fwmarks and ip addresses. + This still needs further work, but the setting up of virtual/real + servers now works. + * Fix setting up and deletion of virtual servers with groups + Virtual server entries in virtual server groups can be used + by multiple virtual_server entries. This commit ensures that + virtual servers are not deleted until the last virtual_server + instance using the virtual server is removed. + * Allocate vrrp send buffer during vrrp_complete_instance() + Issue #926 identified a segfault. The vrrp send buffer was not being + allocated early enough, and was being accessed before being allocated + if the checksum algorithm needed updating. + * Fix vrrp v3 with unicast and IPv4. + The checksum calculations were happening in the wrong way, with the + wrong data. This commit sorts all that out. + * Don't set effective priority to 254 when specify dont_track_primary. + * Make csum_incremental_update16/32 inline. + * Add --enable-optimise=LEVEL configure option. + * Remove debug message left in configure.ac from adding --enable-optimise. + * Fix compiling on CentOS 6. + Issue #932 identified that keepalived would not compile on CentOS 6. + The problem is that kernel header file linux/rtnetlink.h needs + sys/socket.h to be included before linux/rtnetlink.h when using old + (e.g. 2.6) kernel headers. + * Another fix to listening on send socket. + Commit 4297f0a - "Add options to set vrrp socket receive buffer sizes" + added reading on vrrp send sockets to stop receive queues building up + on some 3.x kernels. The commit didn't save the new thread in + sock->thread_out when it was added for reading in vrrp_write_fd_read_thread. + It now does so. + +2018-06-17 Quentin Armitage + * keepalived-2.0.4 + * Make vmac_xmit_base work for IPv6 instances. + Issue #917 identified that for IPv6 even when vmac_xmit_base was + configured, the adverts were being sent from the vmac interface. + This commit makes the packets be sent from the underlying interface + when vmac_xmit_base is configured. + * Handle vmac_xmit_base when interfaces are recreated. + * Add -t config-test option. + Issue #389 has received increasing support to add a configuration + validation option. This commit adds the -t/--commit-test option + to report any detected configururation errors and exit. + Errors are logged to the system log by default, but use of the -g + and -G options can make the errors be logged to files. + +2018-06-15 Quentin Armitage + * keepalived-2.0.3 + * Fix building with --disables-routes configure option. + * Fix some compiler warnings on Travis-CI. + * Fix setting vrrp effective priority on reload. + * Add tracking of static addresses, routes and rules + By default a static address, route or rule will now be reinstated + if it is deleted, unless the no_track option is specified. + In addition, if a track_group is specified for an address/route/rule + then if the address/route/rule cannot be reinstated (e.g. if the + specified interface is down or has been deleted), then the vrrp + instances specified in the track group will transition to fault state + until the interface comes back up. + This commit completes the monitoring and reinstatement of addresses + routes and rules and means that keepalived should now fully support + hot-swap devices. + * Log when restoring static addresses, routes or rules. + * Allow static addresses/routes/rules to be configured on VMACs. + When VMACs were using an interface name generated by keepalived, + if static address/routes/rules had beeon configured on a VMAC + interface name, then a different name would be generated for + the vrrp instance. This commit now allows the same name to be used. + * Fix configure when pkg-config --libs returns -L entries. + * Add log message for advert receive timeout when using log detail (-D). + * Stop receive message queues not being read on send sockets. + We shouldn't receive anything on vrrp send sockets since IP_MULTICAST_ALL is + cleared, and no multicast groups are subscribed to on the socket. However, + Debian Jessie with a 3.16.0 kernel, CentOS 7 with a 3.10.0 kernel, + and Fedora 16 with a 3.6.11 kernel all exhibit the problem of multicast + packets being queued on the send socket. Whether this was a kernel problem + that has been subsequently resolved, or a system default configuration + problem isn't yet known. + The workaround to the problem is to read on the send sockets, and to discard + any received data. + If anyone can provide more information about this issue it would be + very helpful. + * Ensure sorry server/virtual server same address family unless tunnelled. + A real server and a virtual server can only be of the same address family + if the forwarding method is tunnelled, and also must have a kernel that + supports IPVS_DEST_ATTR_ADDR_FAMILY. + * Add options to set vrrp socket receive buffer sizes. + Some systems have very large settings for net.core.rmem_default + allowing very large receive queues to build if the sockets aren't + read. keepalived doesn't need large buffers for receive queues, + so this commit allows options for setting the maximum buffer sizes + to be much smaller. It also adds the option of setting the receive + buffer size on the vrrp send sockets to be as small as possible, + since we shouldn't be receiving anything on those. + Following commit 6fb5980 - "Stop receive message queues not being + read on send sockets", this commit also adds the option not to + read the send sockets, which can be used where it is known that the + kernel will not queue unwanted multicasts to the send socket. + * Consider eVIPs when determining if need GARP/NDISC send buffers. + * Fix sending IPv6 unicast vrrp adverts. + +2018-06-06 Quentin Armitage + * keepalived-2.0.2 + * Only compile code in rttables.c that is needed by the + configuration. + * Set default preferences for ip rules if not specified. + Since different vrrp instances can become master in different + orders, if preferences (priorities) are not specified for + ip rules, the order in which they are specified will be + indeterminate. In order to give some consistency, keepalived + will not allocate a default preference to each rule, and will + also warn that this is probably not going to work as intended. + The solution is to specify a preference for each rule. + * Require preference if an ip rule specifies goto. + Since preferences are now auto-generated if not specified, a + rule with a goto must now specify a preference. + * Add tracking of virtual rules. + If a virtual rule is deleted, the vrrp instance will transition + to backup. When it becomes master again the rule will be re-added. + * Fix compilation failure found by Travis-CI. + * In configure.ac check if SHA1_Init() needs -fpic. + * Fix make rpm when rpmbuild doesn't support --build-in-place. + * Update INSTALL file to describe how to build rpm files. + * Fix instructions for building rpm packages. + +2018-06-04 Quentin Armitage + * keepalived-2.0.1 + * Remove '\n' characters from log_message() text. + * Allow IPv6 ip rules to be specified using fwmarks. + * Fix configure generation of keepalived.spec file. + * Stop rebuilding scheduler.o every make. + * Remove ' characters from configure args in keepalived -v output. + * Remove duplicate reporting of network namespace in config dumps + * Add ${_INSTANCE} config parameter. + * Remove debugging log message. + * Recalculate max_fd used for select if it should reduce. + * Add tracking of virtual routes. + If a virtual route is deleted, by default to vrrp instance will + now transition to backup mode, and if it transitions to master + again the route will be re-added. If an interface on which a + route is configured is down, then the instance will go to fault + state, since the route cannot be added. + This commit also adds a no-track option for routes, which means + that deletion of the route will not cause the vrrp instance to + transition to backup. + * Handle interface down at startup with tracked route configured on it + If a virtual route which is tracked is configured on an interface that + is down at startup, then the vrrp instance needs to start in fault + state. + * Rename netlink_reflect_filter() to netlink_link_filter() + The function only handles RTM_NEWLINK/RTM_DELLINK messages and there + are other functions to handle other message types. + * Fix compilation warning. + * Make recreating deleted VMACs work. + * Fix Travis-CI compilation failure and warning. + * Stop duplicate definition and duplicate include in vrrp_iproute.c. + * Add new ip rule options for Linux 4.17 + FRA_PROTOCOL, FRA_IP_PROTO, FRA_SPORT_RANGE and FRA_DPORT_RANGE have + been added in Linux 4.17. + +2018-05-26 Quentin Armitage + * keepalived-2.0.0 + * Beta branch merge into master branch ! 2years of dev here ! + * Transition to master as soon as decision is made to do so + Previously keepalived waited one further advert interval before + transitioning. + This meant that previously if a master went down and sent priority + 0 message, there was one extra advert interval before the highest + priority backup configured the VIP addresses. + Now if vrrp instances have high priorities (i.e. close to 255), + then the transition to master and configuration of addresses will + now occur in a small multiple of advert_interval/256. + * Process interface state changes immediately. + Previously keepalived waited for advert timer expiry. The problem + was that if an interface went down and came back up before the + next timer expiry, and addresses, routes and VMACs that we had + configured on that interface would be removed, but we wouldn't + know about it. + * Add support for hot-swappable NICs + This also handles interfaces being deleted and restored. + * Add vrrp_track_file option. + This allows track_scripts, which are run on a frequent scheduled + basis, to be replaced with a vrrp_track_file, which contains a + number as a text string which is used in the same way as the exit + status from a track script. The track_files are only read if they + are changed, so external events can update a track file, rather + than their status needing to be detected by polling by track + scripts. + * Add notify fifos. + Rather than sending notifications via notify scripts it is now + possible to send notify messages via fifos. Not only does this + mean that the overhead of executing script for each notification + is removed, but it also guarantees the delivery of notifications + in the correct order, whereas if the notification is via scripts, + there is no guarantee that the scripts will execute in the desired + order if two or more notifications are sent in quick succession. + There can be a global fifo to process all notifies, and also + separate fifos for vrrp and checkers. It is possible to specify a + script for keepalived to execute to process the messages on the + fifo(s). + * Stop logging address addition/deletions if addresses not ours + The -a option can be used to override this behaviour and log all + address changes. + * Transition to fault state if source address for adverts is deleted + from interface + * Transition to backup state if a VIP or eVIP is removed + When we next transition to master the addresses will be restored. + If nopreempt is not set, that will be almost immediately. + * Make address owner (priority 255) transition to master immediately + * Don't process a received advert if the authentication fails + * Ignore invalid received adverts totally + Previously the master down timer was being updated, which meant + that a backup could be stuck in backup state even if the only + received adverts were invalid. + * Don't reset timer before sending next advert if receive a lower + priority advert. + This was stopping a higher priority backup instance to stay in + backup state. + * Log if receive invalid authentication header + * Ignore lower priority adverts when backup (to comply with RFCs) + This also means that the master down timer wasn't reset, which + was causing a delay to becoming master + * Fix first advert interval of vrrp instances in a sync group. + * Stop two vrrp instances with preempt delay and equal priorities + flip-flopping between master and backup state + * Make sync group members transition state at same time + When first instance makes transition (i.e. when the trigger event + occurs) rather than wait for next timer expiry + * Process vrrp track script returning a new status code immediately + For all instances (and their sync group members), rather than + waiting for the next timer expiry on each instance, the instance + will transition update it's state immediately. + * On reload, make track scripts inherit the state from before reload + This stops vrrp instances transitioning to down and coming back up + once the script has run. + * Correct the use of adver_int and master_adver_int + * Ensure when leaving fault state that a vrrp instance transitions + to backup unless it has priority 255 + * Remove quick_sync functionality since no longer needed. + * Improved code efficiency: + * Finding vrrp instance after read timeout + * When getting interface information for a new vmac, only request + information for that i/f. + * Directly update effective priority of vrrp instances when scripts + return new status rather than scheduling a thread to do it + * Don't run a read timeout on vrrp instance in fault state + * Don't run a track script if no vrrp instance is tracking it + * Stop checking interface status after every timer expiry since + processing interface state changes is now done synchronously + * The timeout for the select call had a maximum timeout of 1 second, + it now times out only when something needs to happen + * The timeout on netlink reads was 500 seconds and this has been + extended to 1 day. + * Streamline signal handling between main process and child process + by using signalfd if available, rather than using a pipe + * Minimise searching for an interface struct based on its index by + using pointers to the interface structures + * Stop opening and closing vrrp scripts before running them. We can + detect they are missing from the return of the exec call. + * Allow threads that don't need a timeout to never timeout + * Calculate the maximum fd number when calling select() rather than + specifying the maximum of 1024. + * Ignore netlink NEWLINK messages that are only wireless state + changes. + * Don't check whether timers have expired after select() returns if + its timeout didn't expire. + * Termination of child processes (scripts) were being handled twice + * Don't generate the IP header checksum since the kernel will always + generate it. + * Maintain pointers to tracking scripts to save seaching a list to + find the relevant script. + * Vrrp instances to have pointer to interface structure to avoid + having to search based in index + * Fix the checksum calculation for VRRPv3 unicast peers. + * Don't regenerate the full advert packet each time an advert is sent + Keepalived now simply updates the necessary fields and calculates + the change needed to the checksum. + * Detect a vmac interface going down, and make the vrrp instance + transition to fault state. + Previously the instance would only go down if the underlying + interface went down. + * Stop weighted track scripts updating priority of sync group members + * Make vrrp instances go straight to fault state at startup if a + relevant interface is down + Previously an instance would start in up state and transition to + fault at next timer expiry + * Ensure that a sync group starts in backup state unless all members + are address owners + * Restore master down timer after leaving fault state + * Use execve() to execute scripts rather than system(). + This saves a fork and an extra process, and also allows the + parameters to be parsed once only at startup, rather than each + time the script is invoked. + * Don't treat a failure to execute a script as a failure of the script + * Ensure all scripts receive TERM signal when keepalived terminates + * If keepalived is running with an elevated priority, stop running + scripts with that elevated priority. + * Enable an unweighted tracking script make a vrrp instance which is + an address owner transition to fault state + * Delay bringing vrrp instances up at startup until after the first + completion of the tracking scripts + This stops an instance coming up an then being brought back down + again after the script completes with a failure. + * Reduce number of error messages if a script is not executable + * Add linkbeat option per vrrp instance + * Fix timer addition on 32-bit systems + * Ignore netlink messages for interfaces using linkbeat polling + * If priority of vrrp instance changes when in backup due to a vrrp + script, reschedule the read timeout + * If re-using a VMAC after a reload, ensure it is correctly configured + * Don't send priority 0 adverts when transition to fault state unless + were in master mode + * Identify routes added by keepalived as belonging to keepalived + * Enable vrrp instances to be put into fault state if their routes are + removed + * Add track scripts, track files and track_if to sync groups and + deprecate global_tracking + (use sync_group_tracking_weight instead, but only if necessary). + * Improve AH authentication sequence number handling, and (re)enable + sequence number checking for VMACs and sync groups + * Remove autoconf/automake generated files from git repo. + Script build_setup will create the necessary build environment. + * Improve and standardise notifications + * Fix not sending RS and VS notifies if omega set + * Add no_checker_emails to not send emails every time a checker + changes state, but only if a real server changes state + * Monitor VIP/eVIP deletion and transition to backup if a VIP/eVIP + is removed unloes it is configured with the no-track option. + +2018-05-26 Alexandre Cassen + * keepalived-1.4.5 released. + * Update snapcraft.yaml for 1.4.x+git + * Fix generation of git-commit.h with git commit number. + * Set virtual server address family correctly. + * Set virtual server address family correctly when using tunnelled + real servers. + * Fix handling of virtual servers with no real servers at config time. + * Add warning if virtual and real servers are different address families. + Although normally the virtual server and real servers must have the + same address family, if a real server is tunnelled, the address families + can be different. However, the kernel didn't support that until 3.18, + so add a check that the address families are the same if different + address families are not supported by the kernel. + * Send correct status in Dbus VrrpStatusChange notification. + When an instance transitioned from BACKUP to FAULT, the Dbus + status change message reported the old status (BACKUP) rather than + the new status (FAULT). This commit attempts to resolved that. + +2018-05-08 Alexandre Cassen + * keepalived-1.4.4 released. + * doc: ipvs schedulers update + * Fix a couple of typos in configure.ac. + * Fix namespace collision with musl if_ether.h. + * Check if return value from read_value_block() is null before using. + * Fix reporting real server stats via SNMP. + * Make checker process handle RTM_NEWLINK messages with -a option + Even though the checker process doesn't subscribe to RTNLGRP_LINK + messages, it appears that older kernels (certainly 2.6.32) can + send RTM_NEWLINK (but not RTM_DELLINK) messages. This occurs + when the link is set to up state. + Only the VRRP process is interested in link messages, and so the + checker process doesn't do the necessary initialisation to be able + to handle RTM_NEWLINK messages. + This commit makes the checker process simply discard RTM_NEWLINK + and RTM_DELLINK messages, rather than assuming that if it receives + an RTM_NEWLINK message it must be the VRRP process. + This problem was reported in issue #848 since the checker process + was segfaulting when a new interface was added when the -a command + line option was specified. + * Fix handling RTM_NEWLINK when building without VRRP code. + * Fix building on Fedora 28. + net-snmp-config output can include compiler and linker flags that + refer to spec files that were used to build net-snmp but may not + exist on the system building keepalived. That would cause the build + done by configure to test for net-snmp support to fail; in particular + on a Fedora 28 system that doesn't have the redhat-rpm-config package + installed. + This commit checks that any spec files in the compiler and linker + flags returned by net-snmp-config exist on the system building + keepalived, and if not it removes the reference(s) to the spec file(s). + +2018-04-09 Alexandre Cassen + * keepalived-1.4.3 released. + * vrrp: setting '0' as default value for ifa_flags to make gcc happy. + * Add additional libraries when testing for presence of SSL_CTX_new(). + It appears that some systems need -lcrypto when linking with -lssl. + * Sanitise checking of libnl3 in configure.ac. + * Report and handle missing '}'s in config files. + * Add missing '\n' in keepalived.data output. + * Stop backup taking over as master while master reloads. + If a reload was initiated just before an advert, and since it took + one advert interval after a reload before an advert was sent, if the + reload itself took more than one advert interval, the backup could + time out and take over as master. + This commit makes keepalived send adverts for all instances that are + master immediately before a reload, and also sends adverts immediately + after a reload, thereby trippling the time available for the reload + to complete. + * Add route option fastopen_no_cookie and rule option l3mdev. + * Fix errors in KEEPALIVED-MIB.txt. + * Simplify setting on IN6_ADDR_GEN_MODE. + * Cosmetic changes to keepalived(8) man page. + * Don't set ipvs sync daemon to master state before becoming master + If a vrrp instance which was the one specified for the ipvs sync + daemon was configured with initial state master, the sync daemon + was being set to master mode before the vrrp instance transitioned + to master mode. This caused an error message when the vrrp instance + transitioned to master and attempted to make the sync daemon go from + backup to master mode. + This commit stops setting the sync daemon to master mode at initialisation + time, and it is set to master mode when the vrrp instance transitions + to master. + * Fix freeing vector which has not had any entries allocated. + * Add additional mem-check disgnostics + vector_alloc, vectot_alloc_slot, vector_free and alloc_strvec all + call MALLOC/FREE but the functions written in the mem_check log + are vector_alloc etc, not the functions that call them. + This commit adds logging of the originating calling function. + * Fix memory leak in parser.c. + * Improve alignment of new mem-check logging. + * Disable all checkers on a virtual server when ha_suspend set. + Only the first checker was being disabled; this commit now disables + all of them. + Also, make the decision to disable a checker when starting/reloading + when scheduling the checker, so that the existance of the required + address can be checked. + * Stop genhash segfaulting when built with --enable-mem-check. + * Fix memory allocation problems in genhash. + * Properly fix memory allocation problems in genhash. + * Fix persistence_granularity IPv4 netmask validation. + The logic test from inet_aton() appears to be inverted. + * Fix segfault when checker configuration is missing expected parameter + Issue #806 mentioned as an aside that "nb_get_retry" without a parameter + was sigfaulting. Commit be7ae80 - "Stop segfaulting when configuration + keyword is missing its parameter" missed the "hidden" uses of vector_slot() + (i.e. those used via definitions in header files). + This commit now updates those uses of vector_slot() to use strvec_slot() + instead. + * Fix compiling on Linux 2.x kernels. + There were missing checks for HAVE_DECL_CLONE_NEWNET causing + references to an undeclared variable if CLONE_NEWNET wasn't defined. + * Improve parsing of kernel release. + The kernel EXTRAVERSION can start with any character (although + starting with a digit would be daft), so relax the check for it + starting with a '-'. Kernels using both '+' and '.' being the + first character of EXTRAVERSION have been reported. + * Improve grammer. + * add support for SNI in SSL_GET check. + this adds a `enable_sni` parameter to SSL_GET, making sure the check + passes the virtualhost in the SNI extension during SSL handshake. + * Optimise setting host name for SSL_GET requests with SNI. + * Allow SNI to be used with SSL_GET with OpenSSL v1.0.0 and LibreSSL. + * Use configure to check for SSL_set_tlsext_host_name() + Rather than checking for a specific version of the OpenSSL library + (and it would also need checking the version of the LibreSSL library) + let configure check for the presence of SSL_set_tlsext_host_name(). + Also omit all code related to SNI of SSL_set_tlsext_host_name() is + not available. + * Use configure to determine available OpenSSL functionality + Rather than using version numbers of the OpenSSL library to determine + what functions are available, let configure determine whether the + functions are supported. + The also means that the same tests work for LibreSSL. + * Add support for gratuitous ARPs for IP over Infiniband. + * Use system header definition instead of local definition IF_HWADDR_MAX + linux/netdevice.h has definition MAX_ADDR_LEN, which is 32, whereas + IF_HWADDR_MAX was locally defined to be 20. + Unfortunately we end up with more system header file juggling to ensure + we don't have duplicate definitions. + * Fix vrrp_script and check_misc scripts of type + * keepalived-1.4.2 released. + * Make genhash exit with exit code 1 on error. + Issue #766 identified that genhash always exits with exit code 1 + even if an error has occurred. + * Rationalise printing of http header in genhash. + * Use http header Content-Length field in HTTP_CHECK/SSL_CHECK. + If a Content-Length is supplied in the http header, use that as a + limit to the data length (as wget does). If the length of data + received does not match the Content-Length log a warning. + * Optimise parameter passing to fprintf in genhash. + * Don't declare mark variable if don't have MARK socket option. + * Fix sync groups with only one member. + Commit c88744a0 allowed sync groups with only 1 member again, but + didn't stop removing the sync group if there was only 1 member. + This commit now doesn't remove sync groups with only one member. + * Make track scripts work with --enable-debug config option. + * Add warning if --enable-debug configure option is used. + * Allow more flexibility of layout of { and } in config files. + keepalived was a bit fussy about where '{'s and '}'s (braces) could + be placed in terms of after the keyword, or on a line on their own. + It certainly was not possible to have multiple braces on one line. + This commit now provides complete flexibility of where braces are, so + long as they occur in the correct order. + * Make alloc_value_block() report block type if there is an error. + * Simplify alloc_value_block() by using libc string functions. + * Add dumping of garp delay config when using -d option. + * Fix fractions of seconds for garp group garp_interval. + * Make read_value_block() use alloc_value_block(). + This removes quite a bit of duplication of functionality, and + ensures the configuration parsing will be more consistent. + * Fix build with Linux kernel headers v4.15. + Linux kernel version 4.15 changed the libc/kernel headers suppression + logic in a way that introduces collisions. + * Add missing command line options to keepalived(8) man page. + * Fix --dont-release-vrrp. + On github, ushuz reported that commit 62e8455 - "Don't delete vmac + interfaces before dropping multicast membership" broke --dont-release-vrrp. + This commit restores the correct functionality. + * Define _GNU_SOURCE for all compilation units. + Rather than defining _GNU_SOURCE when needed, let configure add + it to the flags passed to the C compiler, so that it is defined + for all compilation units. This ensures consistence. + * Fix new warnings procuded by gcc 8. + * Fix dumping empty lists. + Add a check in dump_list() for an empty list, and don't attempt + to dump it if it is empty. + * Resolve conversion-check compiler warnings. + * Add missing content to installing_keepalived.rst documentation. + Issue #778 identified that there was text missing at the end of + the document, and that is now added. + * Fix systemd service to start after network-online.target. + This fix was merged downstream by RedHat in response to + RHBZ #1413320. + * Update INSTALL file to describe packages needed for building + documentation. + * INSTALL: note linux distro package that provides 'sphinx_rtd_theme' + * Clear /proc/sys/net/ipv6/conf/IF/disable_ipv6 when create VMACs. + An issue was identified where keepalived was reporting permission + denied when attempting to add an IPv6 address to a VMAC interface. + It turned out that this was because + /proc/sys/net/ipv6/conf/default/disable_ipv6 + was set to 1, causing IPv6 to be disables on all interfaces that + keepalived created. + This commit clears disable_ipv6 on any VMAC interfaces that + keepalived creates if the vrrp instance is using IPv6. + +2018-01-27 Alexandre Cassen + * keepalived-1.4.1 released. + * Improve and fix use of getopt_long(). + We musn't use a long option val of 1, since getopt_long() can return + that value. + getopt_long() also returns longindex == 0 when there is no matching + long option, and there needs to be careful checking if there is an + error to work out whether a long or short option was used, which is + needed for meaningful error messages. + * Write assert() messages to syslog. + assert()s are nasty things, but at least let's get the benefit of + them, and write the messages to syslog, rather than losing them down + stderr. + * Enable sorry server at startup if quorum down due to alpha mode + If alpha mode is configured on sufficient checkers so that a + virtual server doesn't have a quorum, we need to add the sorry + server at startup, otherwise it won't be added until a quorum has + been achieved and subsequently lost again. In the case where some + of the checkers remain in the down state at startup, this would have + meant that the sorry server never got added. + * For virtual servers, ensure quorum <= number of real servers + If the quorum were gigher than the number of real servers, the + quorum for the real server to come up could never be achieved, so + if the quorum is greater than the number of real servers, reduce it + to the number of real servers. + * Fix some SNMP keepalived checker integer types and default values. + Some virtual server and real server values were being sent to SNMP + with a signed type whereas the value is unsigned, so set the type + field correctly. + Some virtual server and real server values that apply to checkers + are set to nonsense default values in order to determine if a + value has been specified. Handle these values when reporting them + to SNMP replying with 0 rather than a nonsense value. + * Fix some MALLOC/FREE issues with notify FIFOs. + * Add instance_name/config_id to alert emails' subjects if configured. + If multiple instances of keepalived are running, either different + instance_names and/or config_ids, it is useful to know which + keepalived instance the email relates to. + * Ensure that email body string isn't unterminated. + Using strncpy() needs to ensure that there is a nul termination byte, + so this commits adds always writing a nul byte to the end of the buffer. + * Remove duplicate fault notification. + * Fix problem with scripts found via PATH with a '/' in parameters. + Recent discussions on issue #101 led to discovering that if an + executable without a fully qualified name was specified as a script + and there was a '/' character in the parameters, then the path + resolution would not work. + * Send SNMP traps when go from backup to fault due to sync group. + Commit 020a9ab added executing notify_fault for vrrp instances + transitioning from backup to fault state due to another instance + in the sync group going to fault state. This commit adds sending + SNMP traps in the same circumstance. + * Revert "Add instance_name/config_id to alert emails' subjects if + configured". This should be handled by setting router_id + * Add config option to send smtp-alerts to file rather than send emails + This is useful for debugging purposes. + * Add additional entry to Travis-CI build matrix. + * Fix segfault if no sorry server configured for a virtual server. + Issue #751 identified a segfault in vs_end_handler(), and it + transpires that the forwarding method of the sorry server was being + checked without first testing that a sorry server had been configured. + * Improve the log message when a master receives higher priority advert. + The log message reported in issue #754 + "VRRP_Instance(VI_1) Received advert with higher priority 253, ours 253" + is somewhat misleading since 253 == 253. + This commit improves the log message in this case be reporting that + the sender's IP address is higher and the priority is equal. It also + states the it was a master receiving the advert. + * First stage of making --enable-debug work + Issue #582 identified that compiling with --enable-debug produced + an executable that didn't work. + This commit largely makes that option work, but there needs to be + more work to make signals work. + * Generalise handling of signals. + * Don't assume json header files are in /usr/include/json-c + Use pkg-config to find the location of the json header files + when testing for the presence of the header files in configure. + * Add file updated by configure.ac change. + * Log more helpful message when healthchecker activated or suspended + Include the realserver in the log message + * Fix building with musl libc. + * fix spelling mistakes about keyword promote_secondaries in man page. + +2017-12-29 Alexandre Cassen + * keepalived-1.4.0 released. + * Add Linux build and runtime versions to -v output. + * Log kernel version and build kernel version to log at startup. + * Fix compiling with --enable-debug. + * Don't sleep for 1 send when exiting vrrp process if no vrrp instances. + * Streamline and rationalise use of child_finder function. + The child_finder function is simplified, and also stop using the + parent process' child_finder function in the checker process. + * Don't request bug report if script terminates due to seg fault. + The report_child_status() function would log a message requesting a + bug report if a check_misc script or a vrrp_track script exited due + to a seg fault. + * Handle vrrp track and check_misc scripts being killed by signal. + * Rationalise reporting of child process exit status. + report_child_status() is now only called in the main keepalived + program. The reporting of the exit status of vrrp track scripts + and MISC_CHECK scripts is now handled in the specific code for + those scripts. This means that non 0 exit statuses aren't + repeatedly reported for vrrp track scripts. + * eally fix reporting of child process exit status. + * Log a helpful message i using mem-check and too many allocs. + keepalived simply being terminated by SIGABRT with no diagnostic + message was unhelpful. + * Rename child_finder() to child_finder_name() etc + The function only finds the name of the child process, and not + the thread for the child process, so rename the function accordingly. + * Add log to file and no syslog options. + With large configurations the syslog can get flooded and drop output. + This commit adds options to not log to syslog, and also to log all + output to files. + * Add option to only flush log files before forking. + * Don't poll netlink for all interfaces each time add a VMAC. + We can poll for the individual interface details which significantly + reduces what we have to process. + * Print interface details in keepalived.data output. + * Be consistent with type of size parameter for mlists. + * Fix sign conversion warnings. + * Add high performace child finder code. + The code to find the relevant thread to execute afer a child process + (either a vrrp track script or a misc_check healthchecker) was doing + a linear search for the matching pid, which if there are a large number + of child processes running could become time consuming. + The code now will enable high performance child finding, based on using + mlists hashed by the pid, if there are 32 or more vrrp track scripts or + misc check healthcheckers. The size of the mlist is based on the number + of scripts, with a limit of 256. + * Improve high performance child termination timeout code. + * Fix high performance child finder cleanup code. + * Preserve filename in script path name resolution. + Some executables change their behaviour depending on the name by + which they are invoked (e.g. /usr/sbin/pidof when it is a link to + /usr/sbin/killall5). Using realpath() changes the file name part + if it is a symbolic link. This commit resolves all symbolic links + to directories, but leaves the file name part unaltered. It then + checks the security of both the path to the link and the path to + the real file. + * Handle scripts names that are symbolic links properly. + * Use fstatat() rather than stat() for checking script security. + If we use fstatat() we can discover if a file is a symbolic + link and treat it accordingly. + * Fix building with kernels older than v4.4. + * Fix building with --disable-lipiptc and --enable-dynamic-linking. + * Fix building with --without-vrrp configure option. + * Resolve unused return value warning. + * Fix some RFC SNMP issues. + * Attempt to fix mock builds. + * Fix parsing of broadcast + and broadcast - + * check_http.c: http_get_check_compare crash fixed in case of absense + of digest. + * Add -pie linker option. + Since -fPIE is specified for the compiler, -pie should be specified + for the linker. + * check_http.c: http_get_check_compare crash fixed in case of absense o. + * Fix use S_PATH and fchdir(). + S_PATH wasn't defined until Linux 2.6.39 and fchdir() doesn't work + with S_PATH until Linux 3.5 (according to open(2) man page). + * Fix building with Linux versions between 2.6.39 and 3.3 + Linux 2.6.39 introduced ipsets, but the kernel had some omissions + from linux/netfilter/ipset/ip_set.h header file, so the libipset + provided version needed to be used. + Note: RedHat backported ipsets to at least 2.6.32, so the problem + applied to earlier versions of RedHat Linux and Centos. + * Fix segfault when parsing invalid real server. + If the first real server ip address doesn't match the address + family of the virtual server, then we need to skip parsing the + rest of the real_server block. + * Make when vs_end_handler is executed + Commit 1ba7180b ('ipvs: new service option "ip_family"') added a + sublevel_end_handler vs_end_handler, but this was being executed + at the end of each real_server rather than after the virtual_server. + This commit adds a new parser function install_root_end_handler(), + and vs_end_handler is now installed using that function so that it + is executed at the end of the virtual_server rather than after each + real_server. + * Allow tunnelled rs address family not to match vs family. + The address family of a tunnelled real server does not have to + match the address family of its virtual server, so we need to + delay any setting of the vs address family from an rs address + until the end of the real_server block, so that we know whether + the forwarding method is tunnelling or not. Likewise the check + of the sorry server has to be delayed until the end of the + virtual server configuration (the tunnelling method may be + specified after the address of the real/sorry server). + The address family of a virtual server is only not determined + by the virtual server configuration itself if the virtual server + is defined by a fwmark and all of the real/sorry servers are + tunnelled. In this case the address family cannot properly be + determined from the address family of any tunnelled real servers. + However, to maintain backward compatibility with configurations + used prior to this commit, the address family of the virtual + server will be taken from the address family of the (tunnelled) + real/sorry servers if they are all the same; if they are not all + the same it will default to IPv4 (this is not incompatible since + previously mixed IPv4 and IPv6 real/sorry servers were not allowed, + even if tunnelled). + * Remove bogus warning for fwmark virtual servers. + "Warning: Virtual server FWM 83: protocol specified for fwmark + - protocol will be ignored" should not be given if no protocol has + been specified. + * Fix removing left-over addresses if keepalived aborts. + * Fix use of init_state after a reload. + Issue #627 identified that vrrp->init_state was being incorrectly + used in vrrp_fault(), since it is modified at a reload. + Instead of using init_state, we now use the configured priority + of the vrrp instance, so if the vrrp instance is the address owner + (priority 255) it will transition to master after leaving to fault + state, otherwise it transitions to backup. + * Remove init_state from vrrp structure + init_state is no longer used, so remove it from the vrrp structure. + Since it has been included in keepalived SNMP, it is preserved + solely for reporting in SNMP requests. + * Change conditional compilation _WITH_SNMP_KEEPALIVED_ to + _WITH_SNMP_VRRP_ + The functionality that the conditional compilation enabled was snmp + vrrp functionality, so make the name more relevant. + * Update error message in configure.ac. + * Add more configure options to Travis build matrix. + * Install additional libraries in Travis environment for new options. + * Fix some problem found by Travis-ci. + * Fix configure --disable-checksum-compat option. + * Remove DOS file formatting from .travis.yml. + * Add more configuration option to Travis builds and some build fixes. + * Tidy up some code alignment. + * Update openssl use to stop using deprecated functions + openssl from version 1.1 deprecated certain functions that keepalived + was using. This commit ceases using those functions if the version + of openssl is >= 1.1. + * Fix some issues identified by valgrind. + Some file descriptors weren't being closed at exit, and also one + or two mallocs weren't being freed. + * Set pointer to NULL after FREE_PTR() unless exiting. + * Allow sync groups with only 1 member, but issue a warning. + * Fix building with LibreSSL version of OpenSSL. + Unfortunately LibreSSL updates OPENSSL_VERSION_NUMBER, and its value + is higher that OpenSSL's latest version. When checking the version + number we need to check that we are not using LibreSSL (by checking + whether LIBRESSL_VERSION_NUMBER is defined). + LibreSSL also hasn't implemented the new functions that OpenSSL has + provided to replace functions that are deprecated or it is recommended + should not be used, and so if using LibreSSL the old functions need + to be used. + * Update genhash to stop using deprecated functions openssl functions. + * Remove last few Subversion source file version Id strings. + Some of the genhash source code still had Subversion Id strings, + and these are now removed. + * Add copyright update script. + * Copyright update. + * Remove outdated Version comment. + * Fix update copyright script. + * Include Makefile.in files in copyright update. + * Add replaceable parameters in configuration files. + * Fix some MALLOC/FREE issues with config parameters. + * Add multiline configuration definitions. + * Remove debugging messages left in lib/parser.c. + * Fix a FREE error. + * Fix keepalived.conf(5) man page. + * Fix type in keepalived.conf(5) man page. + * Suppress error message when removing leftover addresses at startup. + +2017-10-21 Alexandre Cassen + * keepalived-1.3.9 released. + * Stop segfault if SSL context cannot be initialised. + * Don't leave point to SSL data after freeing it. + * Fix memory leak if duplicate SSL context values specified. + * Don't initialise an SSL context if it isn't being used. + * Checksum compatibility should refer to v1.3.6. + * Update keepalived.spec.in for differences between Fedora and CentOS. + * change hash to something more even and hash size accordingly. + * also update size of hash in free_list. + +2017-10-15 Alexandre Cassen + * keepalived-1.3.8 released. + * parser: do not exit when glob() doesn't match any files. + * Use nodename as default id for conditional configuration. + If the node name returned by uname() is host123.abc.de, then + lines in the configuration file matching @host123 will match the + conditional configuration test. This means that it is no longer + necessary to specify the -i command line option if the conditional + configuration string used in the configuration is the node name. + * Option --i/--config-id parameter is not optional. + Since the config-id defaults to the hostname, there is no point + in allowing --config-id to be used without a parameter, just to mean + use the hostname. + * Use NULL instead of 0 for pointers in get_longopts struct. + * Some minor tidying up of the new JSON output code. + 1. Use SIGRTMIN+2 rather than (_SIGRTMIN + 4) + 2. Don't include JSON code if not building with VRRP + 3. Some code alignment fixes + 4. Some conditional compilation additions + * Add --signum command line option to report signal numbers. + Since keepalived is starting to use real time signals, and those + signal numbers are not fixes, this commit introduces a way to + ask keepalived to report those signal numbers. + * Stop command line option -i segfaulting. + * Fix config include files when file has no directory par. + When an include file name has no directory part, there is no + directory to change to, so don't try to do so. + * Use getcwd() malloc functionality if available. + * Add support for csh brace globs in config file names. + * Update documentation for config file include directive. + * Use fchdir() when changing direcories while reading include files. + The getcwd(3) man page recommends using open()/fchdir() rather than + getcwd()/chdir() since fchdir() is guarantee to return to the previous + directory even if directories have been renamed in between the first + chdir and the second. It also suggests that it is faster, and saves + mallocs or allocation of arrays on the stack of size PATH_MAX. + * Use alloc_value_block() for vrrp_vip_handler(). + * Fix whitespace error introduced in commit 9458c9b9. + * Reinforce that '@' conditional config character must be 1st on line. + The '@' conditional configuration character must be the very first + on a configuration, meaning that there cannot even by whitespace + before the '@' character. + * Check whether GLOB_BRACE is supported (it is not part of POSIX.2). + * When building a docker image, it appears that autoheader is required. + * Fix IPVS virtual server setup with persistence. + * Remove a merge conflict .rej file accidentally added to git. + This commit also updates the .gitconfig file to ensure that .rej + files will not be added in the future. + * config synopsis - cleanup line endings and comment alignment. + * conf examples - clean eol whitespace. + * conf examples - clean triple line breaks. + * add pair of config options used in misc_check. + * clean surprise tab character. + * many whitespace fixes; some missing docu added to synopsis. + * config docs - apply code review markups. + * Trivial updates to latest format cleaning patches. + * Allow conditional configuration to work with include statements. + * Allow '@' conditional configuration to be preceeded by whitespace. + +2017-10-01 Alexandre Cassen + * keepalived-1.3.7 released. + * Allow broadcast address to be specified as '-' or '+' + When configuring an ip address with a broadcast address, allow the + use of - and + (like ip(8)) to clear or set the host specfic bits of + the address, i.e. + 10.6.23.254/16 broadcast + result in a broadcast address of 10.6.255.255 + 10.6.23.254/16 broadcast - results in a broadcast address of 10.6.0.0 + * Change some code layout and macro/variable names + * Print unicast peer addresses in /tmp/keepalived.data + * Add negative conditional configuration. + A configuration line starting @main will only be included if + keepalived is started with option -i main. + This commit adds configuration option @^main, meaning that the + remainder of the configuration line will only be included if + -i main was NOT specified. + * Fix calculation of checksum for VRRPv3 IPv4 unicast peers. + Alternate unicast peers were being sent adverts with the checksum + set to 0. The reason for this was that the checksum field was not + being set to 0 before the checksum calculation, hence causing the + calculated checksum to be 0 for the second, fourth, sixth etc + unicast peer. + * Generate README from README.md. + * Only declare (and use) auth variables if compiling with authentication. + authtype_mismatch and auth_failure are only used if authentication is + enabled. + * The vrrp_t vmac flag should be a bool. + * Add include guard for vrrp_print.h. + * Log some additional vrrp variables. + * Make checksum change backwards compatible. + This commits adds the ability of keepalived to revert to using the old + checksum calculation if it sees an advert that has an old checksum. This + means that if an old and a new version of keepalived are working + together, once the new version has seen an advert from an old version, + it will drop back to using the old style checksum, and so the two + keepalived instances will work together. + There is a slight problem with this, though. If the old version starts + when a new version is master, if will report bad checksums. This should + be fine, since keepalived should discard the adverts, time out and send + an advert which would make the new keepalived revert to old checksums. + Unfortunately, keepalived does not completely ignore bad adverts, since + it resets its master down timer, even for bad adverts, and so it never + times out. However, in this scenario, there will still remain one master + and all the other keepalived instances will be in backup state, and so + VRRP functionality is preserved. + As identified in commit bcf2936 until commit 67275d2 keepalived did not + work with VRRPv3 and more than one other unicast peer, so for migration + we only need to consider two unicast peers. To upgrade, first upgrade + the keepalived instance that is in backup mode. This will see old + checksums when it starts, and so start using old checksums. The other + keepalived instance can then be upgraded and it will also see old + checksums when it starts up. In order to switch to using new checksums, + temporarily add the following line in the configuration of each vrrp + instance that is in master state: + old_unicast_checksum never + and then reload the keepalived instance by sending it SIGHUP. After the + master has restarted, restart the backup with a SIGHUP, and they will + then be using new checksums. The temporary old_unicast_checksum never + lines can now be removed from the configuration. + * Add checker bind_if keyword. + If a checker binds to a link local IPv6 address, the interface has + to be specified. + * Make DBus service name configurable. + * Make --config-id option default to hostname. + This is the equivalent of specifying --config-id `hostname -s`, and + makes it more straightforward to deploy the same configuration to + multiple hosts. + * Issue warning if more than 1 dynamic misc_checker per real server. + If different scripts return different exit statuses, the priority + of the real server will keep changing. The solution is to combine + the functionality into 1 script. + * Improve DBus error handling. + . Always clear errors to avoid leaks + . Check for errors when emitting signals + . Check for errors when registering objects + * Stop test tcp_server leaving zombie processes. + * Fix persistence_granularity handling + 1. vs->addr.ss_family should never be used to check address family of + vs since there may not be an address is using fwmark. + 2. If using fwmark, the address family may not be known when parsing + persistence_granularity + 3. Set address family from format of persistence_granularity if not + already set + 4. Ensure entire string is a number and is between 1 and 128 for IPv6 + 5. Ensure netmask specified for IPv4 is solid + * Ensure always check return from inet_stosockaddr when parsing config. + * Add lthreshold and uthreshold to keepalived.SYNOPSIS. + * Merge virtual server group addresses and ranges into one list. + A single address can be treated as a range with only 1 address, so + this reduces the number of lists that need to be processed when + handling a virtual server group. + A number of corrections were also made re hton/ntoh(s|l). + * Remove redundant setting of real server weight. + * Don't use vs->addr.ss_family for address family of virtual server. + A virtual server won't use vs->addr if it is defined by a fwmark or + it is uses a firtual server group. vs->af is the correct field to use. + * Make ipvs_update_stats() little/big endian aware. + * Simplify ipvs_update_stats(). + Don't run a state machine to collect all the stats, simple iterate + through the entries. + * Move fetching ipvs stats into ipvs_update_vs_stats(). + * Remove some #defines in ipvs_update_stats(). + * Streamline setup for changing ipvs configuration. + * Fix updating resolved notify script path names with parameters. + * Add silent option to test/tcp_server. + * Document default checker connect ip/port. + * Remove duplicate setting up of file name. + * Validate HTTP_GET and SSL_GET checkers. + Unsure that urls have a path specified, and that the checkers have + at least one url specified. + * Fix memory leak if SMTP_CHECK helo_name specified. + * Fix dumping of SMTP_CHECK host list. + * Don't allocate and copy default SMTP_CHECK helo name unless needed. + * Tidy up dumping SMTP checkers. + * Remove smtp_host_t typedef. + If is passed to functions that take a conn_opts_t parameter, so + we need to explicitly use the correct type. + * Simplify handling of host{} block in SMTP_CHECK. + This also allows specifying connect_ip, connect_port as well as + unsing host blocks. + * Add DNS_CHECK RRSIG and DNSKEY query types. + * Fix documentation re MISC_CHECK. + * Detect if no misc_path specified for MISC_CHECK. + If no path was specified, keepalived was segfaulting. + * Add some more error messages to socket_bind_connect(). + * Checker connections aren't always TCP. + * Report if checker bind_if is missing + If a link local IPv6 address is specified for a checker to + connect to, then a bind interface must also be specified, + otherwise the connect() call fails. + * If a real server has inhibit_on_failure, configure it at start up + If a real server had inhibit_on_failure set, but it also had an + alpha mode checker, then the real server should be installed at + startup with weight 0 to be consistent with what would happen if + the checker had been successful but then failed. + * Improve handling of virtual server groups. + If multiple virtual servers use the same virtual server group, and + the virtual servers have different protocols, or the virtual server + groups are defined using only fwmarks and the virtual servers have + different address families, then multiple versions of the entries + in the virtual server groups will need to be created as IPVS + virtual servers. + This patch handles the creation and removal of the necessary different + virtual servers for the virtual server groups. + * Add virtual server protocol types SCTP and none for SNMP. + * Handle virtual server with no protocol specified + This is valid if fwmarks are being used. + * Warn if a protocol is set on a virtual server using firewall marks. + * Don't check !LIST_ISEMPTY(vs->rs) after config is validated + In validate_check_config() any virtual server without any real + servers is removed, so there is no need to check subsequently. + * Don't allow virtual server groups without any addresses for fwmarks. + * Fix and optimise handling of promote_secondaries. + The promote_secondaries flag was being cleared by the first vrrp + instance that stopped using an interface, rather than by the last + instance. + * Fix the setting of mcast address for checksum compatibility + It was using INADDR_VRRP_GROUP rather than vrrp_mcast_group4. + +2017-09-15 Alexandre Cassen + * keepalived-1.3.6 released. + * Ensure locations of pid files is consistent + Issue #563 identified that the generated keepalived.service has the + wrong location for the pid file. On investigating this it was discovered + that keepalived isn't following the GNU coding standards for location of + pid files; however, we can't now move the default location of pid files. + This commit ensures that the keepalived.service file's location for pid + files is consistent with where keepalived is placing them, but also adds + a configure option --enable-gnu-std-paths, which means that keepalived + will use ${localstatedir} for the location of pid files, while the default + remains /var/run + * Stop logging that preferred_lft has been set to 0. + Some users are interpreting the message as a warning, and hence are + unnecessarily avoiding using a /128 netmask for IPv6 addresses. The + message doesn't really tell us anything useful, so remove it. + * Handle not being able to load ip_tables or ip6_tables modules. + When running in a docker container it isn't possible to load kernel + modules, so we need to cleanly handle a failure to load the modules. + * Don't segfault if unable to load ip_vs module. + In a docker container it isn't possible to load a kernel module. The + check code was detecting that it couldn't load the module, but the + checker process, when cleaning up prior to exiting, was assuming that + certain pointers had been initialised which hadn't been when an error + was detected so early in the initialisation. + This commit adds testing for uninitialised pointers during the exit + sequence. + * Fix releasing malloc'd memory for saved core pattern. + * Fix memory leak when adding iptables entries. + * Handle missing virtual server configuration. + keepalived was segfaulting if a virtual server had no real servers + configured. There were also issues of checkers running even if there + was missing essential configuration from a virtual server which meant + it could be set up. The problems were a virtual server group specified + but it didn't exist, a virtual server group with no configuration, and + a virtual server address family not match the address family of a virtual + server group. + * Don't attempt to remove ipsets if ipset handling not initialised. + * Delay initialising IPVS until affter processing configuration. + If IPVS isn't configured, there is not point in loading the ip_vs + module. + * Fix conditional compilation tests for _HAVE_LIBNL3_ + * Make dynamic flag bool. + * Don't report exit status of misc_check scripts. + The result of a change in status from a misc_check script is reported + by the code anyway, so to log any non-zero exit code is superfluous and + annoying. + * Work around conflict between kernel and libipset header files. + ipset copies linux/netfilter/ipset/ip_set.h (and other) header + files, producing local copies that are installed as + libipset/linux_ip_set.h etc as part of the libipset development + package. Unfortunately although the kernel changes the include + guards when processing its source code, ipset does not, and so + the duplicated header files have different include guards. + This patch detects if the include guards don't match, and if so + if linux/netfilter/ipset/ip_set.h is included, it defines the + include guard used by libipset/linux_ip_set.h before the latter is + indirectly included. + * add Dockerfile. + * Fix detecting default script uid/gid. + * Stop segfault when keepalived can't load ip_vs module. + * Add some additional docker support files and add make target docker. + The configuration file installed by make install isn't ideal to run + keepalived with, so add a simple keepalived.conf that will be + installed into the container. + Add make target docker, to build the docker image. + Add docker/README to give some information about building and using + containers (this is mainly so that I don't forget how to the details). + * Remove a line of debugging code. + * Don't complain about keepalived_script user if not needed. + keepalived logged a warning every time if the keepalived_script user + didn't exist. We only need that warning if there is a script that uses + the default user, and an alternative defult user isn't specified. + * Fix relative script path names with embedded spaces. + The space wasn't being restored after resolving the path name. + * Fix memory leak if notify scripts specified multiple times. + * Remove some residual debugging messages. + * Fix memory leak if quorum up/down scripts specified multiple times. + * Use realpath() to canonicalize script names. + * Fix missing PARAMETER_UNSET, which caused the global value of + vrrp_higher_prio_send_advert not to be used for each VRRP instance. + * Remove unused variable introduced in commit 1c5bfa29. + * Fix using virtual server groups following commit 5ca36cb. + * Set address port to be sequence number for virtual server group. + The format_vs() function uses the virtual server address port as + the sequence number of the virtual server instance using the virtual + server group, so we need to set it up. + * Warn if real server has no checkers when alpha mode. + If a virtual server is configured with alpha mode, and a real server + has no checkers, the real server will never be able to be activated, + so generate an appropriate warning. + * Only delete virtual server once if using a virtual server group. + If multiple virtual servers are using a virtual server group, the + virtual servers are defined by the virtual server group, and so they + should only be deleted for the first virtual server using the group. + There is still an issue that the configuration of all virtual servers + using the virtual server group needs to be consistent. + * Add further checks for LVS configuration. + * Document additional scheduling algorithms for IPVS. + * Change virtual_server_t loadbalancing_kind to forwarding_method. + The variable name loadbalancing_kind didn't represent the meaning of + the parameter, so change it to forwarding_method. + * Add fo and ovf scheduling types to SNMP. + * Only check one packet scheduling if supported. + * Add lvs_method per real server. + The lvs_method should be settable for each real server within a + virtual server. This commit maintains existing default behaviour + by using the lvs_method set against the virtual server as the default + for the real servers, but adds the option to configure the lvs_method + individually for each real server. + * Fix type in printing config of scripts. + * Convert some spaces to tabs. + * logger: output timestamps to console logs. + * Optimise handling of config_id in parser. + * Fix some typos. + * prog_type variable doesn't make sense when building a DEBUG version. + The DEBUG version runs everything in a single process, and to the + prog_type variable is meaningless in this case. This commit excludes + the prog_type variable by conditional compilation when building a + DEBUG version. + * Add home, -nodad, mngtmpaddr, noprefixroute, and autojoin address flags. + * Update documentation for commit cc67476. + * Add notify FIFO. + pull requests #568 and #587 and issue #584 have all identified that if + notify scripts are run in close succession, then order if processing of + those scripts is indeterminate, and this is causing systems that are + monitoring the state of vrrp instances to have the wrong state. + There have been various suggestions about how this should be resolved, + principally along the lines that the notify scripts should be run + synchronously, i.e. a notify script should not be run until the previous + notify script completed. While this would work, it adds some overhead to + keepalived, which currently does not monitor the exit status of notify + scripts. + There is a further issue with notify scripts that if a large number of + events occur in rapid succession (e.g. due to an interface flapping), this + can cause a large number of child processes to be created very rapidly. + This commit adds an alternative method for external processes receiving + notification of events. Instead of forking a script for each event, keepalived + will write to a named pipe. An external process can then read the pipe to + receive notification of events, and process them appropriately. This is + guaranteed to deliver events in the correct order. It also has the benefit + that there isn't the overhead of forking a child process for each event. + * If can't get local host name, set default router_id to "[unknown]". + Issue #588 reported that keepalived was segfaulting when generating + an SNMP trap in strlen(global_data->router_id), which presumable is + due to global_data->router_id being NULL. As a precaution set + router_id to "[unknown]" if get_local_name() fails". + * Implement SNMP reporting smtpServerPort. + Commit 128cd24 added functionality for specifying smtp server port + and commit bcb09b8a added smtpServerPort to the keepalived MIB, but + no code was added to report the port. This commit adds that functionality. + * Don't use PATH when executing FIFO script. + The path has already been resolved as part of checking the script + security, so there is no need to search the path. + * Log error if unable to execute FIFO notify script. + * Pass FIFO name to notify_fifo_script as parameter. + * Add FIFO notify for LVS notifies. + To match the FIFO notifies for VRRP, this commit adds FIFO notifies + for LVS. There are now three FIFOs available, a global one that + will send output for VRRP and LVS, one for VRRP only and one for + LVS only. + * Fix conditional compilation for --enable-debug + Commit 7947247 attempted to sort out making keepalived work with + --enable-debug, but unfortunately it used the wrong conditional + compilation variable (DEBUG instead of _DEBUG_). This commit + corrects the conditional compilation tests. + * Include protocol in virtual and real server output. + * Stop segfaulting if no script given for a vrrp_script. + * Fix a _DEBUG_ conditional compilation test. + * Fix incorrect expression in clear_services(). + * Fix use htons() instead of ntohs(). + * Fix bad file descriptor error at reload with no virtual servers. + * Delete disabled inhibit servers at reload. + * Add logging to remove sorry server at reload. + * Fix bad file descriptor error at reload with no virtual servers. + * Delete disabled inhibit servers at reload. + * Fix thread_cancel() for timed out threads. + * build: add basic .travis.yml file + * README.md: rename from README. + * build: add build status tag in readme file + All that's needed now, is for user `acassen` to + go to `https://travis-ci.org/` login with the Github + account, import repos from Github, and enable build + for keepalived [a checkbox/button]. + * Set sorry_server's fowarding_method. + * Further fix for thread_cancel() for child timeout threads. + Commit ade3d699 fixed removing read and write timeout threads + from the ready queue when they are cancelled. This commits adds + removing child timeout threads from the ready queue too. + * Fix warnings from ignoring seteuid/setegid return results. + * Fix dynamic linking with early versions of libnl3 without nla_get_s32. + * Updated autoconf files due to autoconf upgrade. + * Fix compiling with namespace collisions in net/if.h and linux.if.h. + * Update travis configuration. + This commit includes the installation of development library + packages, updated kernel header files, using trusty for the builds, + and adding more build options. + * Reinstate distributing (renamed) README.md file. + * More updates for updated automake/autoconf. + * Fix new warnings produced by gcc 7. + * Migrate failed checkers at reload (provisional implementation). + * Implement comparison of checkers. + genhash: libraries to link with should be put in LDADD, not LDFLAGS. + * configure.ac: fixed build on older systems, namely CentOS 6. + Provide AS_VAR_COPY if missing and downgrade autoconf dep to 2.63. + * Fix worng migrate of checker-id. + * Set active if new failed_checkers is empty. + * Fix typo in interface details printing. + * Enable vmacs to work when sysctl net.ipv4.conf.all.rp_filter > 0. + A number of distros now set net.ipv4.conf.all.rp_filter = 1 by default. + This means that when a vrrp instance is in the master state, it cannot + receive adverts sent by a higher priority master, and hence we end up + with 2 masters. + I tried an alternative of receiving on the base interface, but no packets + that have the same source MAC address as an interface on the system + (i.e. the vmac interface) get delivered to the socket. + For distros such as Fedora, RHEL, CentOS, ArchLinux, all.rp_filter = 1 + due to systemd commit + https://github.com/systemd/systemd/commit/1836bf9e1d70240c8079e4db4312309f4f1f91fd + The reason given for the commit is to work around a boot-time race condition + where interfaces created before default.rp_filter is set do not get the + updated default.rp_filter setting, and so the all.rp_filter setting is used + to override the individual interface settings. This doesn't seem the right + solution to the problem, since it prevents any interface running with + rp_filter = 0, and that is what we need for vmacs. I have filed an issue + report for systemd at https://github.com/systemd/systemd/issues/6282, but + in the mean time we need to work around the issue. Ubuntu sets all.rp_filter=1 + in /etc/sysctl.d/10-network-security.conf provided by the procps package. + Debian doesn't set all.rp_filter. + The only solution I have found, and I am not entirely happy with this since + it has effects beyond keepalived and affects the system as a whole, is to set + all.rp_filter = 0. In order to seek not to change the operation of the system, + if default.rp_filter < all.rp_filter, default.rp_filter is set to all.rp_filter, + thereby ensuring that any new interfaces created will take the original value + of all.rp_filter. It then iterates through all existing interfaces, and + {interface}.rp_filter is set to the value of all.rp_filter if + {interface}.rp_filter < all.rp_filter. all.rp_filter is then set to 0. + This means that all interfaces should behave in the same way as before, since + the behaviour of rp_filter is defined by the maximum of + {interface,all}.rp_filter, but we are not able to operate the vmac interfaces + with rp_filter = 0. When keepalived exists, it restores the original settings + of rp_filter if they are the same as what we set them to. + * Only restore rp_filter on interfaces if same as we set them to. + If rp_filter has been altered since we set it, then do not restore + it to the original value. + * Update files for build fix commits. + Commits 2cccc97 and a932cf2 provided fixes for building on CentOS6. + This commit updates genhash/Makefile.in in line with + genhash/Makefile.am and adds a comment to autoconf.ac regarding + when autoconf introduced support of AS_VAR_COPY. + * Fix build error at when _HAVE_IPV4_DEVCONF_ was undefined. + * Remove unnecessary parameter compare. + * Resolve compiler warning introduced by commit 8361b11. + * Remove debugging log messages added in commits 99fe626 and 6ec26e0. + * Fix compiler warning and remove unwanted log messages. + * Make a couple of checker variables non global. + * Correct comparison for checker compare in migrate_failed_checkers. + Commit 2ff6b3f changed the sense of the comparisons of checkers, + but didn't make the corresponding change to checking the result. + * Fix keepalived.doc(5) man page. + * Add virtualhost config for real servers. + Different real servers may want different virtualhost config + settings. The real server virtualhost setting overrides the + virtual server virtualhost setting. + * Allow virtualhost to be specified per checker and per url. + * Fix compiling with SNMP enabled. + * Fix compiler warnings when use configure --enable-conversion-checks. + * Fix an unintentional case fall-through. + gcc 7 identified two case statement fall-throughs. One was intentional, + but the other was a bug. The latter is now fixed, a comment is added + for the former so the warning isn't generated. + * Fix commit cc67476 to allow flags for static and virtual ip addresses. + * Fix handling of more recent ip address flags. + Recent ip address flags have exceeded 8 bits, and so the IFA_FLAGS + attribute needs to be used, rather than the ifa_flags field. + * Fix typo in help. + +2017-03-19 Alexandre Cassen + * keepalived-1.3.5 released. + * Ensure nopreempt is not set if address owner. + * Remove hardcoded paths from init files. + * Add configure option to override system init type. + * Fix some configure tests for init type. + * Add support for ip rules uidrange option. + This option was added in Linux 4.10. + * Resolve compiler warning on 32 bit systems. + There were two warnings in lib/timer.c for signed vs. unsigned + comparisons on 32 bit systems. + * Add missing documentation for ip rule uidrange. + * Include snapcraft.yaml tar file. + * Remove extraneous EXTRA_DIST directory. + * Add library requirements for ArchLinux. + * Allow tracking and misc_check scripts time to terminate after + timeout. If a script exceeds the timeout, it is sent a SIGTERM, + and then if it still doesn't terminate, it is sent a SIGKILL. + The problem was that the script was only allowed 2 microseconds + to terminate, whereas it should have been 2 seconds. + * Fix script paths when converted to absolute path names. + If a tracking or misc_check script is not specified by a fully + qualified path name, but rather it is resolved via PATH, the updated + patch name wasn't being saved for tracking or misc_check scripts. + * Remove yet more hardcoded paths. + * Make git ignore keepalived.service file. + * Streamline signal handling initialisation. + * Report track script name if it times out. + keepalived was simply reporting that pid nnnn had timed out, which + didn't give any indication of what script it was that had timed out. + This patch now means that the script name will be logged rather than + the pid. + * Fix conditional configuration for config read via alloc_value_block(). + The code for handling conditional configuration was in the wrong function. + This commit move it to read_line() so all configuration is read in the + context of @system_id conditional lines. + * Fix compiling with --disable-vrrp. + When building without vrrp, the checker process still needs to + know about IP address creationg and deletion in order to allow the + ha_suspend configuration option to work. + * The checker process never needs to monitor interfaces. + * Move vrrp_ipvs_needed() to vrrp_daemon.c. + * Remove some unnecessary includes of check_data.h. + * Make ha_suspend work when building without vrrp. + Support of ha_suspend was only enabled when keepalived was built + with vrrp support. There may be other processes that are adding and + deleting ip addresses, so support of ha_suspend should be enabled when + building without vrrp support. + Also, the vrrp process doesn't need to call the update_checker_activity() + function when addresses are added or deleted. + * Don't use netlink address monitoring if not using ha_suspend. + * Make --release-vips (-X) option work. + 'X' was not included in the optstring for getopt_long(), and so + --release-vips option was not recognised. + Further, only enable VRRP and checker specific options if compiled + with that functionality. + * Only report added/deleted addresses if relevant to keepalived. + Logs could get full of messages reporting address addition/deletion + that were of no relevance to keepalived. By default, keepalived will + now only report address additions/deletions with the -D option if + the address is relevant to keepalived. + The -a option is added to log all address additions/deletions. + * Remove all #ifdef _WITH_LVS_ from checker code. + If building the checker code, _WITH_LVS_ is always defined (_WITH_LVS_ + means build the checker code), so there is no point testing if it is + defined in any of the checker code. + * Only include vrrp header files when building with vrrp and also for + check. Make sure vrrp header files are only included if building with + vrrp (i.e. without --disable-vrrp), and likewise only include check + header files if compiling with LVS support (i.e. without --disable-lvs). + * Add test/tcp_server.c for testing TCP_CHECK. + * Make -a option work without ha_suspend. + * Fix integer types. The correct, standard integer types are uint8_t and + uint16_t, not u_int8_t nor u_int16_t (the latter being kernel types). + glibc and uClibc may define the kernel-compatible types, but musl (which + is standards-compliant) does not. + * Fix warning when compiling without libnl. + * Add including where those types are used. + * Add option to not use dlopen() for libipset, but link at link time. + * Remove superfluous (duplicated) block of code. + * Add option for dynamic (run-time) linking to libip[46]tc. + * Fix dynamic linking of libiptc without ipsets. + * Check iptables/ip6tables commands available before using them. + * Fix some conversion check compiler warnings. + * Make configure option --disable-routes do something. + * Don't link to libdl if not needed. + * Fix compilation with --disable-vrrp. + * Don't link to libraries not required by configuration. + * Remove all authentication code if --disable-vrrp-auth specified. + * Remove FALLBACK_LIBNL1 and use existing _HAVE_LIBNL1_ instead. + There was no point in a separate FALLBACK_LIBNL1 since it and + _HAVE_LIBNL1_ always had the same value. + * Add udp functionality to tcp_server test program. + * Fix check_conditional_tests script. + * Add option for dynamic (run-time) linking to libxtables. + * First stage of run-time linking to libnl-3. + * Dynamic/static linking options of libnl/libnl-3, libip[46]tc and + libipset. libnl/libnl-3, libip[46]tc and libipset can all be dynamically + linked at run-time, and if they are not available, keepalvied will use + the alternative code which is used when the libraries cannot be linked + a build time. + This means that a single executable keepalived can be created that will + use the libraries if they are installed on the target system, but will + fall back to the alternatives if the libraries are not available. + This is useful for build environments such as Buildroot which will not + force optional dependencies (see pull request #540), since now keepalived + can be built so as not to force the optional dependencies, but to make + use of them if they are installed. + * Fix building without libnl/libnl-3. + * Don't allow adver_int to be rounded down to 0. + * Fix creation of iptables entries on more recent kernels. + On a 4.9.13 kernel iptables entries were being created with + return-nomatch ! update-counters ! update-subcounters, as shown by + the iptables command. + Although it is not understood why these options are being added, it + transpires that the problem occurs when using version one of the + xt_info_set_match, but doesn't occur when using version 4 of the + structure. + This patch ensures that the latest version of the structure that is + supported by the kernel is always used. + * Fix updating /proc/sys/kernel/core_pattern. + Reset file offset to beginning of file between reading the file and + writing new contents. + * Fix printing of smtp_server port. + * Handle failure if fail dynamically to get address of a libipset function. + * Be defensive in case fail to get addres of a libipset function dynamically. + * Fix evaluation of library names for run-time linking. + * Show failed ipset dl function. + * Provide explicit DL error messages and fix autobuilt snap version. + * Fix formatting of email message for CHECK_SMTP failures. + The format string passed to smtp_final() can contain format specifiers + so a further pass through printf is required. + * Add printf format attribute to vlog_message(). + * Add higher_prio_send_advert vrrp config option. + There is a problem if two vrrp instances, due to becoming isolated, + both become master, since they will both have sent GARP messages. + Setting higher_prio_send_advert and garp_lower_priority_repeat means + that if a master receives a higher priority advert, it will send its + own lower priority advert before it transitions to backup. The higher + priority master, on receiving a lower priority advert, will then send + GARP messages, and so the ARP caches will then be correctly updated. + Using the higher_prio_send_advert option may be considered not to + conform to the VRRP protocol (725) to (765) in state description of + RFC5798, however, since which of the two masters advertises first + after they can both see each other again is random, there is a 50% + chance that the lower priority instance will send an advert before the + higher priority instance, so to all external observers it will appear + that this is the case, or at least that the adverts overlapped. + * Fix higher_prio_send_advert in lower priority master. + * Load the ip_tables module if using iptables. + We cannot guarantee that the ip_tables modules has been loaded, so + we load it ourself if using libiptc. + * Fix (cosmetic) conditional compilation test. + * Fix building with --enable-libxtables-dynamic --disable-libiptc. + * Enable compilation with namespaces if SYS_setns is not defined. + * Fix compiling with struct xt_set_info_match_v0. + * Check to libnfnetlink.h and netlink.h with libnl v1 too. + * Workaround missing libraries from pkg-config --libs libiptc. + Old version of libiptc don't report requirements on libip4tc and + libip6tc, so check if the output from pkg-config is only -L.* -liptc + and if so add -lip4tc -lip6tc. + +2017-02-18 Alexandre Cassen + * keepalived-1.3.4 released. + * Fix generation of lib/git-commit.h when building a tagged commit. + * Define GIT_DATE and GIT_YEAR when generating default git-commit.h + This issue was caused by commit 5287f03 which didn't define GIT_DATE + and GIT_YEAR in all circumstances. + +2017-02-14 Alexandre Cassen + * keepalived-1.3.3 released. + * Fix unitialised use of misck_checker in script timeout. + * Fix detection of no netlink being installed. + * Fix conditional compilation for LIBIPVS without netlink. + * Terminate child processes if parent dies. + If the parent keepalived process is killed, the child processes will + be orphaned and can cause problem when attempting to restart + keepalived. This patch makes use of prctl with PR_SET_PDEATHSIG such + that all child processes will receive SIGTERM if the parent process + dies. + * Ensure syslog and mem_check_log open before using them. + A segfault was occuring when --enable-mem-check-log option was + selected, due to attempting to write to the log file before it had + been opened. It was also evident that there could be attempts to + write to syslog before that had been opened too. + * Fix building on Centos 7/RHEL 7 re lightweight tunnel encapsulation. + RedHat have partially backported lightweight tunnel encapsulation + into their kernel, but not included MPLS or ILA. We need to have + conditional compilation for LWTUNNEL_ENCAP_MPLS and LWTUNNEL_ENCAP_ILA + rather than just checking for RTA_ENCAP. + * Update documentation for tracking scripts weight 0. + weight default is 0, which means tat a failure implies a FAULT state. + * Reinstate code checking module ip_vs loaded. + Commit d900df2 removed a bit to much code that looked as though it + wasn't doing anything, with the result that the check of whether the + ip_vs module was loaded didn't occur. + This commit reinstates the code for checking, and if necessary loading, + the ip_vs module, but also sanitises the code slightly. + * Fix some more compiler warnings. + * Fix a typo in a help message in configure.ac. + * sorry_server: keep sorry_server on reload. + * sorry_server: set it up on start or reload if quorum is down. + on start: in alpha mode. + on reload: if changed, or no previous sorry_server. + * Added doc for priority 4th parameter to notify script. + * ipwrapper.c: make functions void if return value not used or constant. + Several functions in check/ipwrapper.c were always returnung the same + value, and the code calling the functions then checked and returned an + error if the return value was not the value always returned. Also, for + some functions returning a value the return value was never checked in + the calling function. + Making the functions void, and removing the if (...) makes the code easier + to read, and potentially slightly more efficient. + * Add snapcraft.yaml for CI build publication. + * Fix missing documentation for 4th parameter of notify action. + * Make builds reproducable, and copyright date reflect latest commit. + Pull request #503 provided an update to facilitate reproducable builds, + and also ensure that the copyright date doesn't postdate the last source + code modification. Unfortunately the commits required manual updates to + change the copyright year, thereby creating maintainability issues. The + commit also allowed fake build dates to be specified. + This commit takes an alternative approach, and takes the dates used for + the copyright message and the version date from the date of the last git + commit. + If the code is build from within a git tree, this is straightforward. On + the other hand, the code may be build from tarball, so we ensure that + the lib/git-commit.h file is updated when the tarball is built, and + included in the tarball. + * Add option to force building without libnl/libnl-3. + This option is really only for test purposes to build keepalived + without libnl even though libnl is installed. + * Log errors if configure IPVS with IPv6 if not using libnl. + The socket interface for configurating IPVS does not support IPv6, + so rather than leaving the user with the error message + "Operation not supported with specified address family" + give a meaningful message in the log. + At configure time, a warning will also be generated stating that + IPVS will not support IPv6. + * Ensure IPVS address families match. + Don't allow a mixture of IPv4 and IPv6 addresses in a virtual server + group, or within a virtual server. + * When dumping an IPVS IPv6 address range, use hex. + * Log if virtual_server_group doesn't exists, or address family mismatch. + If a virtual server is configured to use a virtual server group but that + virtual server group doesn't exist, then log an error. + Also, if the address family of the virtual server group and virtual server + don't match, log an error as well. + We really ought to be removing the virtual server from the configuration, + but I haven't worked out how to do that yet. + * Don't flag changes to automake/conf generated files as source changes. + The output of keepalived -v adds a '+' if there are uncommitted changes to + the source code. However, we aren't interested in changes to the autoconf + or automake generated files, since these aren't really "source" files, and + are only included in the git repo to allow building on systems without + autoconf/automake. Further, the differences may simply be due to different + versions of autotools being used. + * Minor formatting updates to Sphinx documentation. + * Enable configure to work with ash. + * Handle sysconf() returning -1 for _SC_GETPW_R_SIZE_MAX. + * Report ignoring virtual server if group specified doesn't exist. + It's too difficult to remove the virtual server from the configuration, + but the error will be reported in the log, and so the sysadmin should + resolve the configuration. + * Updated snapcraft.yaml location. + * Move snapcraft and reflect master version. + * Add libipset3 to snap stage packages. + * Allow for keepalived to be a command in /snap/bin/ as well as a daemon. + * Add 'source-type: git' to avoid dirty commit versions. + * Update gitignore for clean snap commit versions. + * Resolve not adding '+' to git version in snapcraft builds. + This is a temporary workaround to the problem of snapcraft deleting + the snap/snapcraft.yaml file from its clone of the git repo (see + https://bugs.launchpad.net/snapcraft/+bug/1662388 for details). + * Add cleaning of snapcraft generated directories/files. + * Add support for Alpine Linux. + This commit adds detection and support of the OpenRC init system. + * Add details of what libraries are needed for various Linux distros. + * Force recreating automake/autoconf files when building with rpm. + If an autoconf/automake source file is patched as part of the rpmbuild + process, then some of the autoconf/automake generated files may be + regenerated, and this can cause a mismatch if the versions of autoconf/ + automake on the system building the rpm don't match the versions + that were used to generate the files that have been committed to git. + This patch changes the keepalived.spec file to always run autoreconf -f -i + to ensure the generated autoconf/automake files are aligned to the right + version. + +2016-11-26 Alexandre Cassen + * keepalived-1.3.2 released. + * Correctly handle return code from system() call. + If we want to check for an exit status, WIFEXITED(ret) must be + checked first. + * Fix compilation where SNMP enabled. + * Fix a couple of SNMP errors. + The length of KEEPALIVED-MIB::version was being returned a sizeof(char *) + rather than strlen(char *). + VRRPv3 vrrpv3GlobalStatisticsDiscontinuityTime was being completely + mishandled. + * Add additional files needed to build from git without autoconf. + * Don't save and restore current directory twice with config includes. + * Don't recognise an executable file as a configuration file. + * Allow maximum path names for configuration files. + * Don't check for include file after reaching EOF. + * Fix a segfault if terminating at startup do to interface not found. + * notify: log error while performing set{gid,uid}. + Log error message while setting goup and user before system call. + Maybe we should avoid system call on error if {gid,uid} are used, would + be more secure. + * Don't execute a script if setuid or setgid fails. + This was suggested in the comment of commit 849615d and is clearly + the right (secure) thing to do. + * If a script doesn't have a '/' in the name, search PATH for it. + This also handles spaces in script specifications where they are + parameters. + * Don't allow accept when strict mode set if not address owner. + This commit changes keepalived from just issuing a warning to also + disable accept mode when strict mode is set. + Patch submitted by levin1. + * Added init_fail setting to assume failed state for vrrp_script during + startup of keepalived. + * When checking script security check set uid/gid bits too. + Although the setuid/gid bits are ignored for scripts, they are + not ignored for binary executables, and there is no point in having + the bits set for scripts. So we play safe, and simply check those + bits, and don't attempt to ascertain if it is a script or not. + * Disable scripts that aren't executable. + system() on a non-executable script will fail, so we may as well + just not try executing such a script. + * Exit if can't read configuration file. + If we have no configuration, we have nothing to run, so exit. + * Don't chdir("/") if not forking. + In keepalived_main() there is a comment that the working directory + is / unless keepalived is run in non-forked mode, in which case it + remains the current working directory when keepalived was run. + Unfortunately start_vrrp_child() and start_check_child() were + executing chdir("/") regardless of whether they had been forked or not. + Since the parent process does chdir("/") if it is appropriate, the + children will inherit that, so they don't need to chdir() at all. + * Only set umask(0) in parent process. + The children inherit it from the parent, so no need to set it in + the vrrp or checker child processes. + * Further changes for script init state failed. + * notify: use _GNU_SOURCE. + Just to make compiler happy about inconsitent declaration of mempcpy + and strchrnul. Just cosmetics here. + +2016-11-21 Alexandre Cassen + * keepalived-1.3.1 released. + * Ensure lists aren't empty when checking script security. + * Correctly check security of scripts with parameters, and check + checker notify/quorum scripts + * Check security of real/virtual server notify scripts. + * Handle space in filenames appropriately when checking script security. + The generic notify scripts can have spaces in their filenames, all other + scripts spaced delineate parameters. + +2016-11-20 Alexandre Cassen + * keepalived-1.3.0 released. + * Add DBus functionality to VRRP. + Add new pthread off VRRP to expose DBUs service org.keepalived.Vrrp1 + through a GMainLoop. + Create a general /org/keepalived/Vrrp1/Vrrp DBus + object and a /org/keepalived/Vrrp1/Instance/#interface#/#group# object for + each VRRP instance. + Interface org.keepalived.Vrrp1.Vrrp implements methods PrintData, + PrintStats and signal VrrpStopped. + Interface com.keepalived.Vrrp1.Instance implements method SendGarp + (sends a single Gratuitous ARP from the given Instance), + signal VrrpStatusChange, and properties Name and State (retrievable + through calls to org.freedesktop.DBus.Properties.Get) + Interface files are located at location /usr/share/dbus-1/interfaces/ + A policy file, which determines who has access to the service, is + located at /etc/dbus-1/system.d/ + * Resolve DBus working after a reload + thread_destroy_list() was closing file descriptors of read and write + threads, but we wanted the DBus pipes to remain open. It transpires that + closing the fds in thread_destroy_list() is unnecessary, since they are + closed elsewhere anyway, so stop closing the fds in thread_destroy_list(). + * Add stronger compiler warnings (-Wextra). + The following bugs were discovered: + check_smnp_realserver_weight() + comparison if unsigned value < 0 + alloc_ipaddress() + comparison of unsigned == -1 and not checking + return status of find_rttables_scope() correctly + read_line() + accessing element buf[18446744073709551615] + ie. buf[2^64-1], which is the same as buf[-1]. + The following improvements to the code were made: + Many unused function parameters + either removed or marked unused + Many signed vs. unsigned comparisons + In most cases variables change to be unsigned + Lengths being stored in signed variables + * Rationalise checking of libnl-3. + * Bring generation of rpmbuild keepalived.spec file up to date + The keepalived.spec file is now created to match the options passed + to configure. It also detects if the system init process is systemd, + upstart or the traditional SYSV init system. + * Add more BuildRequires to keepalived.spec.in. + * Further improvements to keepalived.spec.in for systemd systems + * Change some configure.ac variable names due to using PKG_PROG_PKG_CONFIG + * Fix configure.ac to make RedHat hardened rpm builds work + CFLAGS, CPPFLAGS and LIBS variables were not being preserved by + configure.ac, and this caused needed CFLAGS to be lost when + configure was run, resulting in a build failure. + This commit ensures the flags are all preserved. + * Allow for automake macro AM_PROG_AR not existing. + * Add support for UDP socket to layer4 library. + * Add DNS checker. + * Update documentation for DNS health checker. + * Fix compile check for PE selection support. + * Add file missing from add-dns-checker commit. + * Update commits for correctly checking for IPVS_SVC_ATTR_PE_NAME. + The upadted configure and lib/config.h.in weren't included in the commits, + and to be consistent the comment on what Linux version introduced the feature + is in configure.ac if the test exists in configure.ac + * Fix conditional compilation test for FRA_OIFNAME. + * Fix compilation test for IFLA_INET6_ADDR_GEN_MODE. + * Fix compilation test for IPVS_DEST_ATTR_ADDR_FAMILY. + * Fix compilation test for IPVS_DEST_ATTR_STATS64 and IPVS_SVC_ATTR_STATS64. + * Fix compilation test for RTA_VIA. + * Fix compilation test for CLONE_NEWNET for DBus. + * Fix issue of overwriting the original disposition of signals. + * Improve forced termination of script execution process and its offspring. + * Improve propagate important signal for the script process groups. + * Use argument instead of static variable. + * Fix bug around the process group. + * Use SIGTERM instead of SIGHUP. + * Stop linking with -lipset. + libipset (if used) is dynamically linked at runtime, and so keepalived + shouldn't be linked with -lipset. + Linking with -lipset was erroneously added when converting the build + system to use automake. + * Report diagnostic message if dlopen() fails. + * Fix loading of ipset library when development library not installed. + * Don't use ipsets with namespaces on Linux < 3.13 by default. + On Linux prior to version 3.13, ipsets were not network namespace + aware, so by default the use if ipsets is disabled if keepalived + is running in a network namespace. Configuration keyword + 'namespace_with_ipsets' enables ipset use with a network namespace + on these older kernels. + * Fix reporting of script exit status. + * Update documentation and fix compiler warning re ipset with Linux < 3.13 + * Make report_child_status() check for vrrp and checker child processes + report_child_status() checks for exit status KEEPALIVED_EXIT_FATAL + and KEEPALIVED_EXIT_CONFIG, but these are only relevant for the vrrp + and checker child processes, and not for track scripts etc. This commit + adds a check that the terminating process is the vrrp or checker process + before checking those exit statuses. + * Add no_accept mode for VRRPv2 and standardise VRRPv3 with it + RFC3768, for VRRPv2, specifies that packets addressed to the VIPs + should not be accepted, unless the router is the address owner. + This commit implements not accepting the packets when running VRRPv2, + but only if no_accept is specified, or running in strict mode. The reason + for not making no_accept the default (which would confirm to the RFCs) is + that if running IPVS, or any other service on top of the VIPs, we need to + be able to accept the packets, and requiring everyone to specify accept + in that case would not be reasonable. + Prior to this commit, VRRPv3 was blocking packets sent to VIPs (and eVIPS), + unless the vrrp instance was the address owner, or accept mode was set. This + commit changes the default behaviour for VRRPv3 to make it consistent with + VRRPv2 (i.e. either strict mode or no_accept needs to be specified to be + conformant with RFC5978). + * Tidy up logged messages if ipset initialisation fails. + * Streamline MII polling. + We only need to read 2 MII registers, and not 32 as was previously being + done. + This commit also uses the header file for field and + register definitions. + * Simplify bitops.h code. + * Resolve warnings generated with compiler option -Dconversion. + Most of the warnings were resolved by changing the data types of some + variables. Others required casting, particularly where kernel interfaces + are involved. + There were a few instances discovered that were errors, for example comparing + an unsigned int against -1, and assigning a 16 bit value to a uint8_t. + This commit also adds configure options --enable-conversion-checks and + --enable-force-conversion-checks, the former adds compiler option -Dconversion + unless the compiler is an old version that throws up false warnings. Option + --enable-force-conversion-checks adds -Dconversion even if the compiler throws + up known false warnings. + * Fix some minor errors/typos in doc/keepalived.conf.SYNOPSIS. + * Fix keyword error in sample configuration. + * Fix typo in genhash error message. + * Fix address ranges for virtual server groups + The handling of address ranges was only written for IPv4 addresses, and + only worked on little endian systems. + This commit enables IPv6 address ranges to work, and also should now + work on big endian systems (but I don't have access to a big endian system + to test it). Validation is added to ensure that the end of the range is after + the start of the range, and that the value of the range end does not exceed + 255 (for IPv4) of ffff (for IPv6). + There is also some optimisation of the code, so that netmask is not set (since + it isn't used by the kernel), and the port is set once only, before the loop + through the addresses. + * Add --enable-Werror configure option. + * Add promote_secondaries keyword for vrrp_instance block. + If two IPv4 VIP addresses are in the same CIDR, and the primary + address is removed, then by default any other address in the same CIDR is + also removed. To stop this happening, the promote_secondaries flag + needs to be set on the interface. + Commit e5526cf added setting the promote_secondaries option on + VMAC interfaces, and stated that adding the option for non-VMAC + interfaces would be added later. This commit now adds a + promote_secondaries configuration option in order to set the flag + on the interface. + * Add reporting of promote_secondaries configuration setting. + * Add conditional configuration feature + It is usually the case that the configurations for keepalived for + systems operating together are virtually identical, and only differ + in vrrp instance priorities, router id, and unicast addresses if + those are being used. + It is a nuisance to have to edit one file for each server to make + identical changes, so this commit adds the facility for conditional + configuration entries. + Any line starting with the '@' character is a conditional line. + Immediately following the '@' character is a config id. The line is + only included in the configuration if the config id matches the + argument passed to keepalived with the -i option on the command line. + For example, consider the following configuration snippet: + global_defs + { + @main router_id main_router + @backup router_id backup_router + } + If keepalived is started with -i main, then the router id will be + main_router, if started with -i backup, then backup_router. If + keepalived is started without the -i option, or -i anything else, + then the above snippet will not configure any router id. + * Fix building with --disable-vrrp. + * Stop segfaulting when configuration keyword is missing its parameter + There are many places where during configuration parsing the code + assumes that if a keyword is specified that requires a parameter, then + the parameter exists. If the parameter doesn't exist, then the code + indexes past the end of the vector, and at best segfaults, and at worst + may carry on, parsing random data. + This commit adds strvec_slot() which checks for the presence of the + parameter, and if configured will call a function that can handle the + error. Currently this logs that the parameter is missing, with as much + helpful information as it can provide, and then terminates. + * Use FMT_STR_VSLOT where appropriate. + * Use TIMER_HZ where appropriate. + * Fix comment and error message re http write timeout. + * More verbose logging on (effective) priorities pt. 2. + * Change configure option --enable-snmp-keepalived to --enable-snmp-vrrp + The option was enabling snmp for vrrp, not all of keepalived (the + --enable-snmp option does that), so this commit renames it to reflect + what it is actually doing. + The --enable-snmp-keepalived option is retained but marked as obsolete. + * Use AS_HELP_STRING autoconf macro. + * Fix process increase + * Add forcing termination of children of scripts if script times out + Commits fe9638b..cebfbf5 resolved problems around forced termination + of scripts if they didn't terminate within the proscribed time. During + the development of the patches, it was identified that after a script + had been terminated by SIGTERM, any child processes created by the + script also need to be kill. + This commit adds the forced termination of any such children. + * Correctly handle existing VMACs on reload. + Anthony Dempsey in issue #449 identified that + keepalived attempts to recreate existing VMAC interfaces on a reload, + and that the subsequent failure causes keepalived not to use the VMAC. + This then identified further issues such as the check for an existing + VMAC in netlink_link_add_vmac() didn't also check the interface a + VMAC was on, and that the checks for conflicts of VMAC interface names + with existing interfaces weren't sufficient. + This patch builds on the patch provided by Anthony Dempsey to also + resolve the additional issues identified. + * Fix check of matching VRRP instances on reload. + On a reload, clear_diff_vrrp() removes vrrp instances that are no + longer in the configuration. The check, however, was based on vrrp + instance name, which might have changed. The check is now based on + VRID, address family and interface, since it is this triplet that + uniquely defines a vrrp instance. + * Fix clearing addresses no longer used after a reload. + The address comparison was including ifa_index, but that wasn't being + set up until after clear_diff_vrrp() was called. + * Don't zero the mem_allocated count during reload. + We want to know if there is a leak during reload, so don't zero the + counter. + * Ensure iptables/sets entries and ip routes/rules not lost on reload. + There were several places in the code that were causing existing + iptables/ipsets entries to be lost on reload, and also new entries + for additional ip addresses were deleted after being added. In + addition, ip rules/routes for existing entries were being removed. + * Ensure GARPs/GNAs are sent after reload if VIP/eVIP addresses added. + Although there have been versions of keepalived when GARPs/GNAs were + sent after a reload, this was due to a bug in determining if the VRRP + instance had existed before. Resolving that bug (commit aaea8a4), + caused keepalived to stop sending GARPs after a reload. This commit + now specifically adds code to send GARPs on a VRRP instance for all + addresses on that instance. It would be better if GARPs were sent only + for the added addresses, and that may be resolved in a future commit. + * Use correct interface for iptables/ipset entries when not accept mode + If an interface was specified for a VIP/eVIP, the iptables/ipset block + if not in accept mode for link local IPV6 addresses was specifying the + interface the vrrp instance was on rather than the interface the address + was added to. + This commit now makes the iptables/ipset entry specify the interface that + the address has been added to. + * Resolve "Netlink: error: message truncated" messages. + On systems with a page size larger than 4096 keepalived may report: + "Netlink: error: message truncated" messages + This error was reported on a ppc64le in an OpenStack/Nutron environment. + Ppc64le is using a 64k pages size. I found that keepalived's netlink recvmsg + buffer was too small causing messages to be truncated. The size of the read + buffer for the netlink socket should be based on page size however, it should + not exceed 8192. See the comment in the patch. + I tested the fix by creating 100 veth interfaces and verifying the errors + did not return. + * Use ipsets with namespaces on Linux < 3.13 if ipset names configured. + The problem with using ipsets with namespaces on Linux < 3.13 is that + ipsets were not namespace aware, and so all ipset entries added are + global to the system, including all network namespaces. This causes + problems if the default ipset names are used, but if set names have + been specified, it is reasonable that they have been set to be + different for each namespace, and hence there will be no clashes. + The documentation is also updated for vrrp_ipsets keyword. + * Don't write MEM_CHECK data to log when forked script child terminates. + The mem check log file was being filled with extraneous termination + information every time a forked child terminated. When a child is forked + it now sets a flag to stop the termination dump. + * Fix illegal syntax in configure script + Indirect expansion (`${!foo}`) is a bashism, it's not POSIX-sh + compatible and is not supported by common shells except Bash and ZSH! + Configure script should be portable, hence strictly POSIX compliant. + Moreover it has shebang /bin/sh. + * Make running scripts more secure + Previously, keepalived ran all scripts as root. This is potentially + dangerous if a non-root user can modify the script, or has write + access to any part of the path to the script. + This commit does the following: + 1) Adds configuration options to specify the user/group under which to + run each script + 2) Adds an option to set the default script user/group. If this is not + set it will default to user keepalived_script if that user exists, + otherwise it will default to root, as before. + 3) If a script is to be executed with root privilege, report if it is + writeable in any way by a non-root user. + 4) Add an option enable_script_security so that any scripts failing + 3) above won't be executed. + 5) Report if any scripts are not executable by the relevant user. + * Fix some lead tab/space issues. + * Fix segfault when terminating with no notify script configured. + * Fix compiler warning generated with --enable-conversion-checks. + * Don't segfault if modules ip_tables or ip6_tables not loaded + If either of the modules is not loaded, then don't use ip(6)tables for + that address family. We could load the module, but there would be no + entries pointing to the chains that we use, and so there is no point + adding entries to chains that won't be traversed. + * Resolve some type mismatch warnings on 32 bit systems. + * Fix checking security of misc_check scripts. + +2016-09-11 Alexandre Cassen + * keepalived-1.2.24 released. + * Declare and use default value for garp_refresh. + * Update documentation for default setting of snmp_server. + * Ensure old VIPs removed after reload. + * Add internet network control support for IPv6. + * Log startup and "already running" messages to console with --log-console. + * Remove VIPs on reload if no longer in configuration. + * Add internet network control support for IPv6. + * Add more lvs syncd options, and various minor fixes. + * Don't attempt to set packet priority for wrong IP protocol. + if_setsockopt_priority() was setting SO_PRIORITY socket option regardless + of whether the socket was IPv4 or IPv6. Although the setsockopt() call doesn't + fail for IPv6, it doesn't do anything. + Commit fc7ea83 added setting IPV6_TCLASS, again for both IPv4 and IPv6, but + the setsockopt() call fails on an IPv4 socket. + This commit makes keepalived only set the appropriate socket option, depending + on whether it is an IPv4 or IPv6 socket. + The commit also changes from using the SO_PRIORITY option for IPv4 to using the + more specific IP_TOS option. + * Avoid compiler warning of duplicate definition. + * Add function attributes to malloc functions. + * KEEPALIVED-MIB vrrpRuleIndex should be unsigned. + * Allow all ip rule/route options for rules and routes. + This commit adds support for all ip rule/route supported options for + rules and routes (and also tunnel-id rule option not yet supported + by ip rule). + * Make ip rules/routes a configuration option. + * Add all ip rules/routes options, and minor fixes. + * Corrections for rule suppress_ifgroup. + * Stop respawning children repeatedly after permanent error. + Keepalived was respawning very rapidly after a permanent error, which + was not useful. + This commit allows the detection of certain errors and if one occurs + keepalived won't respawn the child processes, but will terminate with + an error message. + * Remove all remaining vestiges of Linux 2.4 (and earlier) support. + There was code remaining for supporting ip_vs for Linux 2.4, but + the remainder of the keepalived code requires Linux >= 2.6. + * Make some libipvs functions static. + * Move ipvs source and include files into check/include directories. + * Don't duplicate kernel definitions for IPVS code. + * Remove unused code from libipvs.c. + * Remove ip_vs_nl_policy.c, contents now in libipvs.c. + * Add ipvs 64 bit stats. + * Remove linux 2.4 code, add 64bit ipvs snmp stats, and some minor fixes. + * Fix compiling without SNMP checker support. + The patchset removing support for Linux 2.4 introduced a problem + compiling libipvs.c when SNMP checker support wasn't enabled. + * Remove those annoying "unknown keyword" messages. + A slight reworking of the parsing code manages to get rid of those + annoying "unknown keyword" messages which we all know are't true. + * Remove IP_VS_TEMPLATE_TIMEOUT. It was removed from ipvsadm in + version 1.0.4. + * Remove check for MSG_TRUNC being defined. + It has been defined since glibc 2.2. + * Remove conditionals based on libc5. libc5 predated glibc 2.0. + * Remove conditional compilation checks for defines in Linux 2.6. + ETHTOOOL_GLINK, RTAX_FEATURES, RTAX_INITRWND, SIOCETHTOOL and SIOCGMIIPHY + are all defined in Linux 2.6, so no longer need to be wrapped in + conditional compilation checks. + * Sort out checks for O_CLOEXEC. + * Remove check for SA_RESTART. It existed pre Linux 2.6. + * Change reporting of default snmp socket. + * More updates for removing pre-Linux 2.6 code, and stop "unknown keyword" + messages. + * Fix adding iptables entries on Linux 4.6.3 onwards. + ip[46]tables_add_rules() were allocating space for an additional + struct xt_entry_match. kernel commit 13631bfc6041 added validation + that all offsets and sizes are sane, and the extra + struct entry_match failed that test. + * Fix adding iptables entries on Linux 4.6.3 onwards. + * Fix size parameter for keepalived_malloc/realloc. + lib/memory.h specified the size parameter to keepalived_malloc/realloc + as size_t, whereas lib/memory.c specified unsigned long. + The inconsistency was complained about by the compiler on 32-bit systems. + Fix memory.c to make the parameter a size_t. + Change lib/memory.c and lib/memory.h to use type size_t for size + variables. + Use printf format specified %zu for size parameters. + * Fix building without LVS or without VRRP. + * Convert build system to automake. + The INSTALL file gives instructions for setting up the build system + using automake etc. + For those without automake (and autoconf), just running configure + works as before. + * Convert build system to automake. + * Add network namespace support. + This allows multiple instances of keepalived to be run on a single + system. The instances can communicate with each other as though they + are running in separate systems, but they are also isolated from + each other for all other purposes. + See keepalived/core/namespaces.c for some example configurations and + use cases. + * Use atexit() for reporting malloc/free checks on termination. + * Add + and git commit in -v output if uncommited changes. + * Add network namespace support. + * Remove some superfluous conditional compilation tests. + * Poll for reflection netlink messages after adding each interface. + If a large number of interfaces are added, the kernel reflection + netlink socket can run out of buffers. This commit adds a poll of + the kernel netlink reflection channel after adding each interface, + thereby ensuring that a large queue of messages isn't built up. + * Stop Netlink: Received message overrun (No buffer space available) messages. + * Fix debug build since automake conversion. + * Fix configuration testing for ipset support prior to Linux 3.4. + * Add polling of netlink messages when entering master state. + If a large number of vrrp instances enter master state simultaneously + the netlink socket can run out of buffers, since the netlink socket + isn't read sufficiently frequently. Adding a poll of the netlink socket + after the VIPs/eVIPs are added ensures that the netlink messages are read + when the become available. + * Add some missing '\n's when printing the vrrp configuration. + * Fix generating git-commit.h. + * Ensure xmit_base not set with strict mode. + * Fix detection of code changes not commited to git in git-commit.h. + * Change true/false variables in global_data to bools. + * Fix timer_cmp handling large differences between the two times. + In a struct timeval, tv_sec is a time_t which is a long. Assigning + a.tv_sec - b.tv_sec to an int caused it to overflow if the time + differences were large. + * Add a TIMER_NEVER value. + This allows a thread to specify that it never wants to be woken on a + timed basis. + * Add global default_interface keyword. + default_interfaces sets the default interface to use for static + ipaddresses. If the system does not have an eth0, or one wants to + use a different interface for several static ipaddresses, this makes + the configuration simpler. It also has the potential to reduces + changes required if transferring the configuration to another system. + * Fix skew time for VRRPv3 with low priority and long advert interval. + With a low priority and a long advert interval, the calculation of the + skew time was overflowing a uint32_t. For example, with a priority of + 1 and an advertisment interval of 10 seconds, the skew time was being + calculated as 4288 seconds, rather than 9.96 seconds. This had the + impact that the backup instance would take over an hour to transition + to master. + * Don't set master_adver_int from an invalid packet. + * Make timeout_persistence a uint32 rather than a string. + * Fix some configuration tests and compiling on old Linux version. + * Improve persistence handling. + Properly support persistence_granularity for IPv6. + Set persistence_timeout default if granularity specified. + Only support persistence engine if supported by the kernel. + This commit also changes variables timeout_persistence and + granularity_persistence to persistence_timeout and + granularity_timeout. + * Simplify a bit of indentation. + * Add (commented out) code for writing stack backtrace to a file. + * Free syslog_ident string after logging the free. + When writing mem check entries to the log, the syslog_ident needs to be + freed after the log has been written to. + * Allow FREE_PTR mem check to log the proper function. + Having FREE_PTR as a function meant that whenever any memory was freed by + FREE_PTR() the function that was logged as freeing it was FREE_PTR itself. + Changing FREE_PTR() to be a #define means that the calling function name + is logged. + * Fix tests of HAVE_DECL_CLONE_NEWNET. + * Fix a conditional compilation test re namespaces and rename a variable. + * Fix when some FREE() calls are made. + * Only parse net_namespace in parent process. + * Add VRRP/LVS conditional compilation around PID files. + * Improve removing zombie PID files. + * Add more VRRP/LVS conditional compilation. + * Don't check if instance is a rotuer every time an NA is sent. + keepalived was calling sysctl to check if the interface was configured as + router before sending each gratuitous Neighbour Discovery advertisement. This + patch now checks if the interface is routing when the instance transitions to + master, and uses that for all the NA messages. + * Improve mem check initialisation. + * Add support for running multiple instances of keepalived. + Using network namespaces allows multiple instances of keepalived to run + concurrently, in different namespaces, without any collision of the pid + files. + This patch adds the concept of a keepalived instance name, which is then + use in the pidfile name, so that multiple instances of keepalived can run + in the same namespace without pid file name collisions. + * Add option to write pid files to /var/run/keepalived. + When using namespaces or instances, pid files are written to /var/run/keepalived. + The commit adds an option for the standard pid files to use that directory. + * Add keywords instance and use_pid_dir, plus sundry fixes/improvements. + * Add configure option to enable stacktrace support. + * Fix adding and deleting iptables rules for addresses. + When keepalived was built not using ipsets, the adding and deleting + of rules for addresses was including an extra xt_entry_match struct + that meant that the rules could only be deleted by ithe iptables + command by entry number and not be specifying the parameters. + * Fix compiling without libiptc (iptables) support. + * Don't log error message when trying to remove leftover iptables config. + At startup keepalived attempts to remove any iptables configuration that + may have been left over from a previous run. Of course the entries won't + normally be there, so don't report an error if they are not found. + * Fix iptables entries for accept mode, other iptables fixes, and make + write_stacktrace a configure option. + * Add script to setup interfaces in a network namespace. + The scripts mirrors the running network interfaces that are needed + for a given keepalived configuration into a network namespace + (default test), so that keepalived can be run in that namespace in + order to test the configuration. + * Correct comments re location of network namespace pid files. + * Add -s option for overriding net_namespace configuration option. + * Change test/netns-test.sh -c option to -f to match keepalived. + * Make netns-test.sh report interfaces that don't exist. + * Remove leftover debug message. + * Fix address comparison for equal priority adverts. + * Streamline the specification of libraries to the linker. + Most of the dynamic libraries and static libraries were being specified + twice. This commit removes the duplication of all of the dynamic libraries + and only duplicates core/libcore.a of the static libraries. + * Fix automake files for building on Ubuntu 14.04 LTS. + * Enable building with Net-SNMP on Ubuntu. + * Stop compiler warning on Ubuntu. + * Fix compilation with libipset on Debian wheezy. + * Fix various build problems on Ubuntu 14.04 and Debian. + +2016-07-11 Alexandre Cassen + * keepalived-1.2.23 released. + * Make malloc/free diagnostics a separate configure option. + The commit adds the configure --enable-mem-check option which + allows the MALLOC/FREE diagnostics to be enabled without + the --enable-debug option. This means that the mem-check + diagnostics can be used when running keepalived in it's normal mode + with forking children for vrrp and checkers. + The mem-check diagnostics are written to + /tmp/Keepalived_{,vrrp,healthcheckers}_mem.PID.log + The --mem-check-log configure option enables command line option + -L which also writes zalloc/free details to the syslog. + * Fix compilation error on 32-bit systems with mem-check enabled. + * Replace one zalloc() and one free() call with MALLOC() and FREE(). + This ensures that the mem-check diagnostics cover all mallocs/frees. + * Fix report of malloc'd memory not being freed. + * Streamline read_line(). + * Resolve a segfault when reloading with vmacs. + The vrrp_t entries on the vrrp_data list have pointers to an + interface_t for each vrrp instance. When reloading, the + interface_t items where freed, but a pointer to the old list + of vrrp_t items is held in old_vrrp_data. After the new + configuration is processed, clear_diff_vrrp() is called. clear_diff_vrrp() + uses the interface_t pointers from the old vrrp_t entries, but the + memory pointed to by the interface_t pointers has already been freed, + and probably reallocated for a different use. + This commit delays freeing the old interface_t items until after + clear_diff_vrrp() has completed, so the interface_t pointers remain valid. + * Check valid interface pointer before calling reset_interface_parameters(). + Before resetting the settings on the base interface of a vmac, check that + the interface_t pointer is valid. + * Fix new --mem-check-log option. + * Don't write parent's memory logging into children's log file. + When running with mem-check output to files, the buffer from the + parent process was also being written into the children's log + files. The commit sets the CLOEXEC flag on the log files, and + also sets the log files to be line buffered. + * Fix segfault or infinite loop in thread_child_handler() after reloading. + When the checker and vrrp child processes start up, memory for a + thread_master_t is malloc'd and saved in master. Subsequently, + launch_scheduler() is called, and that sets the parameter to be passed + to the SIGCHLD handler - thread_child_handler() to the value of master, + pointing to a thread_master_t. + If keepalived is signalled to reload, the child processes free all + malloc'd memory, and a new thread_master_t is malloc'd and saved in + master. If this is not the same address as the previous thread_master_t, + then the value being passed to the SIGCHLD handler is a pointer to the + old thread_master_t, whereas everything else is using the new thread_master_t. + If the memory used for the old thread_master_t is then returned in a subsequent + malloc() call, a subsequent SIGCHLD will invoke thread_child_handler() with + a pointer to memory that has now been overwritten for some other purpose, hence + causing either a segfault or an infinite loop. + A further consequence is that new child processes will be added to the new + thread_master_t, but when thread_child_hander() is called after a child + terminates, it won't find the child since it is still looking at the old + thread_master_t. + This commit modifies the behaviour of a reload by not releasing the old + thread_master_t and then malloc'ing a new one, but rather it just reinitialises + the original thread_master_t and continues using it. + * Remove base_iface from struct _vrrp_ - it wasn't used. + * Add configuration option to flush LVS configuration. + This commit adds a global configuration option lvs_flush to flush + the LVS configuration, and if not set, the configuration won't be + flushed. + * Add back real server when return from failure with HTTP_CHECK. + If status_code wasn't specified for a url entry in the configuration + then a real server would never be returned to service following a + failure. + The commit makes keepalived return a real server to service if no + status_code is specified if the HTTP status code returned from the + service is a success code (i.e. 2xx). + * Avoid duplication of keyword installation in check_http.c. + * Fix adding new static ip addresses after reload. + Commit f23ab52, when stopping duplicate static ip routes and rules + being added after a reload also stopped new static ip addresses being + added. The commit reinstates adding new static ip addresses. + * Fix adding static iprule/routes after a reload. + * Stop segfault when configure a route with no destination address. + * Fix unused global vrrp_garp_master_refresh. + * fix healthchecker reload when some healthchecks are failed. + +2016-06-14 Alexandre Cassen + * keepalived-1.2.22 released. + * vrrp: Fix build without VRRP VMAC. + * Fix compilation with RFC SNMP without Keepalived SNMP. + * vrrp: Update master_adver_int when receive higher priority advert + when master. + If VRRPv3 is being used, and a higher priority advert is received when + in master mode, the master_adver_int needs to be updated when transitioning + backup mode. If this isn't done, and our advert interval is less than a third + of the new masters, we will time out and re-enter master mode, send an advert + to which the other master will resond with a higher priority advert, causing + us to go back into backup mode, until our timer expires again, and this will + continue indefinitely. + * vrrp: Don't send advert after receiving higher priority advert. + If a master receives a higher priority advert, there is no need + to send another advert, since the sender of the higher priority + advert is already a master. Further, any other instance in backup + mode will process our subsequent advert, and then consider the + wrong system to be master, until it receives another advert from + the real master. + With VRRPv3, if the other master has an advert interval more than + three times our advert interval, backup routers will be using our + advert interval after we've sent our subsequent advert, and will + then timeout before the new master sends another advert, prompting + (one of) the backup routers to become a master, which will prompt + the higher priority master to send an advert, the ex-backup router + will then send another advert and we could end up in an endless cycle. + * vrrp: Fix receiving advert from address owner when in fault state. + * vrrp: When transitioning from fault state, log state change. + * vrrp: Fix preempt delay when transitioning from fault state. + There were two ways of leaving fault state, either by receiving a packet + on the instance, or by a netlink message indication that the interface is + up again. In neither case was preempt_delay considered in the code. + This commit changes the way vrrp->preempt_time is used. preempt_time is now + only used once a higher priority advert is received, rather than being updated + every time a lower priority advert is received. vrrp->preempt_time is now also + set when transitioning out of fault state. vrrp->preempt_time.tv_sec == 0 now + indicates the timer is not running. + * vrrp: Detect and report duplicate address owners. + If more than one system is configured as an address owner (priority + == 255), this would be a configuration error, and could cause + unexpected behaviour. This commit ensures that the problem is + reported, and sets the local instance not to be the addess owner, + as a temporary workaround for the problem. + * vrrp: Fix maximum number of VIPs allowe. + * ipvs: Fix IPVS with IPv6 addresses. + * ipvs: Don't overwrite errno by another syscall before checking errno. + * ipvs: ipvswrapper.c: fix comparison. + * Enable compilation with development net-snmp headers. + * vrrp: Fix IPv4 vIP removal when addr matches pre-existing interface addr. + For IPv4 vIPs keepalived adds a /32 to the underlying interface. If + this address matches an address already configured, e.g. a /24, when + this vIP is eventually removed due to a configuration change or + keepalived shutdown, the original address matching the vIP, outside + of keepalived's control, is removed instead. This behaviour is + incorrect. The /32 added by keepalived should be the address being + removed. Keepalived should not be touching any addresses it does not + create. + * vrrp: Check for errors when opening VRRP data and stats files. + This fixes crashes when running keepalived under SELinux enforcing mode, + which does not allow keepalived proccess to write to /tmp by default. + * vrrp: Don't assume IPADDRESS_DEL == 0 and IPADDRESS_ADD != 0. + * vrrp: Fix compilation failure. + * vrrp: Fix transition to backup when receive equal priority advert from + higher address. + When a vrrp instance in master mode received an advert from another master + that had equal priority, it wasn't comparing the addresses to determine + whether it should treat the advert as higher priority, and hence the + instance should fall back into backup state. + When checking whether the advert is from a lower priority master, it now + checks if the priorities are equal and then compares the addresses. + * vrrp: Optimise address comparision when receive advert in master mode. + * Optimise inet_inaddr_cmp. + + +2016-05-26 Alexandre Cassen + * keepalived-1.2.21 released. + * Install VRRP-MIB when applicable. + It appears that the condition in Makefile.in for installing VRRP-MIB + was using a non-existent macro, SNMP_RFC2_SUPPORT. This patch removes + two conditions from Makefile.in that use undefined macros and adds a + condition to install VRRP-MIB when SNMP_RFCV2_SUPPORT is set + appropriately. + * Check virtual route has an interface before returning ifindex to SNMP + * Force git-commit.h to be updated when needed + * INSTALL: Keepalived doesn't need popt anymore + * INSTALL: support for 2.2 kernels is long gone. + * INSTALL: fix a few typos + * keepalived.conf(5) some minor improvements + * man keepalived(8): some minor improvements + * Add printing of smtp server port when printing global config + * timeout_epilog: mark argument const. + * parser: mark some function arguments as const. + * terminate argv with NULL. + man execvp says: "The array of pointers must be terminated by a null + pointer." + * ipvswrapper.c: fix comparison. + * mark pidfile strings as const. + * utils.c: mark some arguments a const. + I left inet_stosockaddr alone for now, since it modifies the string. + We should fix that, since we pass in strings which might be const and in + readonly memory. + * netlink_scope_n2a: mark return type as const. + * vector->allocated is unsigned. + * notify_script_exec: mark a few arguments as const. + * vscript_print: mark string as const. + * vector->allocted is unsigned. + * dump_vscript: mark str as const. + * Updated range for virtual_router_id and priority. + * Stop segfaulting with mixed IPv4/IPv6 configuration + After reporting that an ip address was of the wrong family, when + the invalid address was removed from the configuration, keepalived + was segfaulting, which was due to the wrong address being passed to + free_list_element(). + * Updated range for virtual_router_id and priority in + doc/keepalived.conf.SYNOPSIS + * Allow '-' characters in smtp_server hostname. + * Allow smtp_server domain names with '-' characters to be parsed + correctly. + * Report and exit if configuration file(s) not found/readable. + The configuration file is treated as a pattern, and processed + using glob(). If there is no matching file, then it wasn't reading + any file, and keepalived was running with no configuration. + This patch adds a specific check that there is at least one matching + file, and also checks that all the configuration files are readable, + otherwise it reports an error and terminates. + * Fix building with Linux < 3.4 when ipset development libraries + installed. + Prior to Linux 3.4 the ipset header files could not be included in + userspace. This patch adds checking that the ipset headers files can + be included, otherwise it disables using ipsets. + * configure: fix macvlan detection with musl libc. + * Fix compiling without macvlan support. + * Bind read sockets to particular interface. + Otherwise, since we use RAW sockets, we will receive IPPROTO_VRRP + packets that come in on any interface. + * vrrp: read_to() -> read_timeout(). Make function name less confusing. + * vrrp: open_vrrp_socket() -> open_vrrp_read_socket(). + An equivalent open_vrrp_send_socket() exists, therefore make + the read version follow the same naming convention. + * vrrp: fix uninitialized input parameter to setsockopt(). + * Make most functions in vrrp_print.c static. + * Enable compilation on Linux 4.5.x. + Including causes a compilation failure on Linux 4.5 + due to both and being included, and they have + a namespace collision. + As a workaround, this commit defines _LINUX_IF_H before including + , to stop being included. Ugly, yes, + but without editting kernel header files I can't see any other way + of resolving the problem. + * Fix segmentation fault when no VIPs configured. + When checking the VIPs in a received packet, it wasn't correctly + handling the situation when there were no VIPs configured on the + VRRP instance. + * Improve checking of existance and readability of config files. + There was no check of the return value from glob() in read_conf_file() + and check_conf_file(), so that if there were no matching files, they + attempted to use the uninitialised globbuf, with globbuf.gl_pathc taking + a random value. A further check has been added that the files returned + are regular files. + Finally, if no config file name is specified check_conf_file() is now + passed the default config file name rather than null. + * vrrp: update struct msghdr. + The vrrp netlink code assumes an order for the members of struct msghdr. + This breaks recvmsg and sendmsg with musl libc on mips64. Fix this by + using designated initializers instead. + * Initialise structures by field names. + * Detection of priority == 0 seems to be shaded. + * More verbose logging on (effective) priorities. + * Log changes to effective priority made via SNMP. + * vrrp: use proper interface index while handling routes. + It appears current code has a small typos while handling routes trying + to access route->oif where it should be route->index. + * vrrp: make vrrp_set_effective_priority() accessible from snmp code. + just include proper file in order to avoid compilation error. + * monotonic_gettimeofday: make static. + * Disable unused extract_content_length function. + * utils: disable more unused functions. + * utils: make inet_sockaddrtos2 static. + * signal: remove unused functions. + * Disable unused signal_ending() consistently with other unused code. + * parser: make a bunch of stuff static. + * scheduler: make a bunch of stuff static. + * scheduler: disable unused thread_cancel_event(). + * vector: disable unused functions. + * vector: make 2 functions static. + * list: disable unused function. + * genhash: make some functions static. + * Remove unused variable. + * core: make a few functions static. + * checkers: make some functions static. + * vrrp_arp: make some global variables file-scope. + * vrrp_ndisk.c: make 2 global variables file-scope. + * vrrp: make some functions and globals static. + * In get_modprobe(), close file descriptor if MALLOC fails. + The sequencing of the code wasn't quite right, and so if the MALLOC + had failed, the file descriptor would be left open. + * Fix compilation without SOCK_CLOEXEC and SOCK_NONBLOCK. + SOCK_CLOEXEC and SOCK_NONBLOCK weren't introduced until + Linux 2.6.23, so for earlier kernels explicitly call fcntl(). + * Don't include FIB rule/route support if kernel doesn't support it. + * Enable genhash to build without SOCK_CLOEXEC. + * Ignore O_CLOEXEC if not defined when opening and immediately closing file. + * Allow building without --disable-fwmark if SO_MARK not defined. + configure complained "No SO_MARK declaration in headers" if that + was the case, but --disable-fwmark was not specified. The commit + stops the error message, and just defines _WITHOUT_SO_MARK_ if + SO_MARK is not defined. + * Update documentation for debug option. + * Add options -m and -M for producing core dumps. + Many systems won't produce core dumps by default. The -m option + sets the hard and soft RLIMIT_CORE values to unlimited, thereby + allowing core dumps to be produced. + Some systems set /proc/sys/kernel/core_pattern so that a core file + is not produced, but the core image is passed to another process. + The -M option overrides this so that a core file is produced, and + it restores the previous setting on termination of the parent process, + unless it was the parent process that abnormally terminated. + * Add option to specify port of smtp_-server. + * Add comment re when linux/if.h and net/if.h issue resolved upstream. + * Enable building with SNMP with FIB routing support. + * Exclude extraneous code when building with --disable-lvs. + * Update description of location of core files. + * Add support for throttling gratuitous ARPs and NAs. + The commit supersedes pull request #111, and extends its functionality + to also allow throttling of gratuitous NA messages (IPv6), and allows + specifying the delay parameters per interface, since interfaces from + the host may be connected to different switches, which require + different throttling rates. + * Add snmpServerPort to Keepalived MIB. + * Add printing of smtp server port when printing global config. + * Add aggregation of interfaces for throttling ARPs/NAs. + This commit adds support for aggregating interfaces together, so + that if multiple interfaces are connected to the same physical switch + and the switch is limited as a whole on the rate of gratuitous ARPs/ + unsolicited NAs it can process, the interfaces can be grouped together + so that the limit specified is applied across them as a whole. + * In free_interface_queue, don't check LIST_ISEMPTY before freeing. + * Clear pointer freed by free_list(). + * Make FREE_PTR() clear the pointer after freeing the memory. + * Make FREE() clear pointer after memory released. + Since a pointer to allocated memory mustn't be used after the memory is + freed, it is safer to clear the pointer. It also means that if the pointer + is subsequently used, it shoud segfault immediately rather than potentially + trampling over random memory, which might be very difficult to debug. + * vrrp: Improve validation of advert_int. + +2016-04-02 Alexandre Cassen + * keepalived-1.2.20 released. + * better VERSION handling + * ipvs: tcp check supports retry. + New tcp check config option "retry" sets the check retry counter. + If tcp check fails on an alive server, keepalived will perform + another checks until n_retry counter reaches zero, or until the check + succeeds. The delay between retry checks is configured by the + "delay_before_retry" config option. The default value is 1 retry after 1 second. + This is the same feature that already exists in HTTP checker + (config option "nb_get_retry"). + * check_http: retry logic is refined. + Retry on every error, including timeout and connection + error, but only when RS is up. + This is needed to reduce rs flaps: we shut the server down + only after nb_get_retry failed checks. + Also, do not wait for delay_loop after a successfull check to + bring the server UP. + * ipvs: respect the error code of the ipvs_talk. + Previously, if the IPVS reflector was unable to perform + its task, it reported error through syslog and ignored it. + This behavior leads to inconsistancies with quorum-handler: + it is called with UP even if no RS were added into the IPVS. + This could take place, for example, when there is a limit of + opened filehandles and keepalived was unable to open netlink + socket (it is opened on every call to the ipvs_talk). + Now the check is not marked as OK unless IPVS reflector reports + OK. Following successfull check will try to add an RS again. + The special case errors "ENOENT on remove" and "EEXIST on add" + are treated with OK result code. + * ipvs: remove unused resulting error code. + These functions are turned from int into void: + ipvs_group_sync_entry, ipvs_group_remove_entry, ipvs_syncd_cmd. + * check_http: reduce cpu usage. + do MD5 calculation only when configured to do so. + * timer: reduce cpu usage. + timer_cmp is called too often and eats much of cpu cycles. Make + the comparison more effective. Increase code re-using in + monotonic_gettimeofday(). Use timer_reset_lazy() where possible + to omit the excess memset() call. + * scheduler: reduce CPU usage. + Since threads are sorted by t->sands, we could break the cycle + when not expired thread found. + * ipvs: rs weight changes properly on reload. + Do not remove and re-add a real_server when reloading config + if its weight has changed. Just edit the existing ipvs rs entry. + * ipvs: new service option "ip_family". + This option explicitly specifies the address family of a + fwmark IPVS service entry. Previously it was determined by + the AF of the first real server. This logic is kept as a fallback + when the "ip_family" option is missing. + Also, now it is possible to create two different services + for v4 and v6 with the same fwmark number. + * make 'smtp_server' config to support domain name. + * use getaddrinfo() instread of gethostbyname(). + * make 'smtp_server' config to support domain name. + * Added vrrp 'timeout' to synopsis. + * Cleaned/fixed up KEEPALIVED-MIB, it now passes smilint + * Fixed vrrp_snmp_route() - it was returning the address of the pointer + instead of the IP address / network address for dst, gw, gw2, and src + * SNMP fixes/cleanup. + * Added support for static and virtual ip rules for use with policy + based routing + * Add info to set a default gateway into man and sample. + * vrrp: Fix socket setup code for IPv4 multicast. + if_setsockopt_mcast_if was only doing anything for IPv6 interfaces. + Make it work also for IPv4 interfaces, and then don't need to + call if_setsockopt_bindtodevice for multicast. + Is it still necessary to call it for unicast? + * vrrp: Set (and restore) interface parameters. + In order to receive and send multicasts on the correct interfaces + various parameters need to be set via the /proc/sys/net/ipv4/conf + interface. This patch sets them as needed, and restores any + changes on the underlying interface on exit. + If a user currently sets any parameters by scripts, that will + override these changes and still work, but this change in general + will make it unnecessary to change any parameters with scripts. + * vrrp: Leave VRRP multicast group by ifindex. + Since we know the interface index, use that instead of the address + since it is more efficient. Also, in the unlikely event that the + interface doesn't have an address, then this avoids a problem. + * vrrp: Don't delete vmac interfaces before dropping multicast membership. + Further to commit afea07bd94384c8ac8125e8cdbfd18bc4a46b14e, the + dropping multicast memberships were failing, since the vmac + interfaces had already been deleted. This patch keeps the vmac + interfaces until after the IP_DROP_MEMBERSHIP ioctls. Separating + the sending of the VRRP priority 0 messages from the shutdown + of the vrrp instances is necessary since vrrp_dispatcher_release + closes the sockets that are needed for sending the messages. + * vrrp: Don't open vrrp_send_socket if address family is wrong. + open_vrrp_send_socket was opening a socket, and then checking that + the address family was valid. Checking that the address family is + valid at the beginning of the function streamlines the code. + * vrrp: Stop m'cast packets being queued (and not received) on send socket. + If there are other vrrp instances on the same network, their + multicast packets are queued to our vrrp send socket, but since we + don't receive on that socket, the messages just get queued in the + kernel (run netstat -anp | grep keepalived to see the queued + packets increasing). + This patch clears the IP_MULTICAST_ALL option, to stop these + packets being queued. + * vrrp: Fix typos in log messages. + * vrrp: Fix RFC reference. + * vrrp: Fix vrrp parser error message. + * vrrp: Add interface index to vrrp dump data. + * vrrp: Don't specify source address in IP_ADD_MEMBERSHIP ioctl. + If ifindex is specified, any source address given is ignored. + * vrrp: If fail to remove vmac i/f, don't report success after fail message. + * Help vim's formatting to work in configure.in. + The single "'" in a comment confuses vim, and the screen formatting + gets confused. Adding a second "'" in a C comment sorts vim out. + * vrrp: Don't explicitly drop IGMP membership before interface deletion. + The kernel will send IGMP leave group messages when an interface + is deleted, so there is no need for us to do so. Experimentation + has shown that explicity doing IGMP_DROP_MEMBERSHIP doesn't make + it any more likely the IGMP leave group messages will be sent. + Adding the 1 second sleep significantly increases the likelihood + of the IGMP messages being sent, but is doesn't guarantee it. + Extending the sleep time doesn't improve the chances. + * Fix compiler warnings. + * vrrp: Add info to set a default gateway into man and sample. + * vrrp: Don't report error on interface creation/deletion. + netlink_reflect_filter was returning an error if it didn't already + know about an interface that has just been created. If we don't + know about the interface, simply ignore it. Likewise on interface + deletion, if we don't know about the interface, ignore it. + * vrrp: Ensure the first interface's parameters are set when using libnl3. + Patch 60217b63242bee37b1c97a04644be6eb5e18b4c4 sets the interface + parameters for each interface, but when using libnl3 there was a + conflict with libnl, causing the parameters not to be set for the + first interface. This patch makes vrrp_netlink.c use libnl3 if it + is available, to avoid the conflict. + * vrrp: Fix interface parameter setting with libnl3 and error message on + interface creation/deletion + * vrrp: Allow gratuitious ARP parameters to be configured globally. + It is likely that the gratuitions ARP parameters will want to be + the same for all interfaces, so allow the defaults to be set + globally. Also allow vrrp_garp_delay to be set to 0 to indicate not to + send further garp messages after a delay (to emulate how the + kernel sends gratuitous ARPs). + * ipvs: Remove nat_mask configuration parameter. + nat_mask was only valid with 2.2 kernel, and the implementation of + it was removed in patch d51194f... but some of the configuration + code remained. This patch removes all remaining code relating to + nat_mask. + * Update man pages. keepalived.conf.5 is updated to include all + configuration parameters, and keepalived.8 is updated to document the + signals that can be used with keepalived. + * Remove remaining 2.2 kernel code. + * vrrp: Allow specification of default VRRP version to use. + Rather than have to specify using VRRP version 3 on each VRRP + instance, allow global configuration to set the default version. + * vrrp: Remove use of deprecated nl_join_groups(). + The use of nl_join_groups was introduced in commit 84cf733.. in + order to resolve quickly a problem introduced in an earlier patch. + This patch follows the approach adopted by libnl3, which uses a + list of groups, rather than a bitmap which is limited to 32 groups. + * Documentation updates, removal of redundant code, global config. + * vrrp: set router flag in neighbour advertisements. + This is necessary in order to prevent the IPv6 stack on a node that + receives the unsolicited and overriding neighbour advertisement for the + VIP (that gets sent automatically when Keepalived transitions to MASTER + state) from immediately removing the VIP from its list of default + routers. See https://bugs.launchpad.net/bugs/1520517 for an example of + the problems this can cause. + Note that the approach in this patch simply unconditionally sets the + router flag. That is better than having it unconditionally unset (VRRP + stands for Virtual *Router* Redundancy Protocol, after all), but it + might not be appropriate whenever VRRP is used to fail over addresses + that are used for other tasks than being routers. Thus it might be + better to read in the interface's "forwarding" sysctl and set the router + flag accordingly, or making the value of the router flag configurable in + keepalived.conf. + * vrrp: Dynamic addition of interfaces from netlink msg. + When a tracked interface is deleted then recreated with the same config + VRRP groups tracking this interface will remain down. This is due to + tracking of stale information. + This patch listens for netlink messages for the creation of interfaces + and does one of two things. + i) If the interface doesn't exist in the vrrp interface list a new + interface structure is created and the information from the message is + used to fill the structure. This new interface is then added to the + interface queue. + ii) If the interface already exists in the queue we zero it and then + use the information in the message to fill the structure. + * branch to fix empty RS list issue. + * a fix for services with no RS. + * check: segfault when there is no real server for a virtual server. + * vrrp: Stop memory leak rename function for convention. + Renamed netlink_populate_intf_struct to netlink_if_link_populate to fit + with file naming scheme. + It was possible that a created ifp structure would not be cleaned up if + netlink_if_link_populate returned a -1, fixed this so the structure is + FREEd. + * Make parent process handle and propagate USR1/2 signals. + In order to be able to automate writing configuration and/or stats + the signals USR1 and USR2 need to be able to be sent to the parent + process since its pid can be read from /var/run/keepalived.pid. + The parent then needs to propagate these signals to a vrrp child. + * Ignore all signals except those explicitly wanted. + In order to harden keepalived against a user accidentally sending + a wrong signal to keepalived, set all signals other than those we + want actioned to be ignored. + * Remove potential race condition when setting signal handlers. + There was the potential for signal_run_callback to be invoked + after calling sigaction for a signal, prior to the internal signal + handler signal_SIG***_handler and signal_SIG***_v variables being + set up. To remove the race condition, when setting a signal handler + block the signal until the internal handlers have been fully set up. + * Make signal_ignore mean ignore. + signal_ignore was setting a signal handler for the signal, but + then itaking no action when the signal was received. This is now + changed so the signal is actually set to be ignored. + * Streamline signal handling code. + There was some duplication of the code for signal handling, and + this slight restructuring avoids the duplication and makes it + simpler. + * vrrp: Invoke notify scripts with the default signal disposition. + It is reasonable for notify scripts to expect to be invoked with + the standard signal disposition, so when first setting up signal + dispositions, remember the original state so it can be restored + before the notify scripts are exec'd. + * Return address of previous signal handler according to SA_SIGINFO. + The man page for sigaction(2) states that SA_SIGINFO is only + meaningful when establishing a signal handler. This appears not + to be the case, since the flag will be set in the oldact structure + on return from sigaction if the previous signal handler was + established using the SA_SIGINFO flag. + * Invoke all scripts with the default signal disposition. + Just as the change for notify scripts, it should apply to other + scripts as well. + * vrrp: Don't wait on script process being killed after timeout. + The child_timout_thread functions send a SIGKILL to a child + process that has timed out and didn't die quickly enough + after sending a SIGTERM. They then wait on the process dying. + The main problem is that if the waitpid is successful here, then + waitpid in thread_child_handler will never be successful for the + same pid, and so the entry on the child list will never be removed + and the parent thread will not be marked as ready. + There is also a theoretical possibility that the child process is + unkillable, and so the waitpid would hang forever. + * Set thread conditions before adding to list. + It seems safer to set the status and type of a thread before + adding it to the ready list. + * Remove some code duplication re running scripts. + misc_check_thread and vrrp_script_thread were virtually identical + so move duplicate code into new function system_call_script in + notify.c. + * Fix formating of man page. + * Set standard signal disposition before invoking ip(6)tables. + Call signal_handler_notify before running iptables/ip6tables. + Since it is now called for more than notify scripts, rename + signal_handler_notify to signal_handler_script + * Move common code for opening fd 0/1/2 into a function. + The code for setting fd 0/1/2 to /dev/null before running a script + was in several places. All the common code is moved into a function + and the function called from the relevant places. + It is only necessary to reopen fd 0/1/2 if keepalived is running + with the --dont-fork option, since without that option the fds are + already open on /dev/null. + * Optimise closure of fds before invoking scripts. + Every time before a script was invoked, closeall() was called, + which would spin through 1024 file descriptors closing them, even + though the vast majority were not open, resulting in 1024 system + calls. To avoid that, open all sockets and file descriptors + (except fd 0/1/2) with the CLOEXEC flag set, so that the fds will + be closed by the kernel when the script is exec'd. + * Simplify some IPv4/IPv6 code. + Code blocks were (unnecessarily) repeated in functions which + handled both IPv4 and IPv6 situations. + * Fix reloading and invoking notify scripts. + * Update vrrp_scheduler.c. + * Converted pdf user guide to RST with Sphinx. + * Added check for libnfnetlink header during the configure step. + * In free_list_elements invoke the free function if it exists. + * Use of LIST_ISEMPTY to check list exists causes memory leak. + * Stop parse_ipaddress FREEing via pointer passed to it. + parse_ipaddress FREE'd new following an error, but new could be an + address passed to the function, and therefore might not be MALLOC'd + memory. This commit makes the caller of parse_ipaddress free the + memory if there is an error and the calling function MALLOC'd the + memory. + * vrrp: Add vrrp_iptables global configuration option. + The iptables/ip6tables entries were always added at the end of the + INPUT chain, but for many configurations this is too late in the + processing. This patch allows the chain name to which rules are + added to be specified, and also allows the option of specifying + no rules are to be added. + If a chain name is specifed, it is necessary for that chain to + already exist in the iptables and/or ip6tables config, and for + that chain to be called from an appropriate point in the + ip(6)tables configuration. + * vrrp: Add option to block outbound traffic from VIPs. + Unwanted traffic to VIPs is discarded by ip(6)tables. This adds + an option to also block outgoing traffic from VIPs. + * vrrp: Add iptables blocks for E-VIPs just like VIPs. + * vrrp: Allow unicast IPv6 Neighbour Solicits to be received. + An ip6tables rule is added to allow IPv6 NAs to be received, but + we also need to be able to receive NSs to respond to neighbours + attempting to verify our reachability. + * vrrp: Use correct MAC address for IPv6 VRRP packets. + The IPv6 VRRP packets were using the MAC address of the underlying + interface, rather than the MAC address of the vmac. This commit sets + the correct MAC address for IPv6, and also adds the link-local address + of the underlying interface to the vmac interface, so that VRRP + packets can be sent from the vmac interface, thereby using the VRRP + MAC address. + * vrrp: Disable IPv6 on IPv4 VRRP VMAC interfaces. + If IPv6 is not disabled on VMAC interfaces, an IPv6 link local + address is generated based on the virtual MAC address. This is not + only contrary to RFC 5798 para 7.4, but also causes duplicate + address detection failure. The address also just isn't needed! + * vrrp: Fix setting nlmsg_len for netlink messages. + For netlink messages, nlmsg_len must always be set to an aligned + length. Prior to this commit, nlmsg_len was only being aligned when + a subsequent attribute was added to the list. This was fine if the + length of the last attribute added was an aligned length (which had + always the case), but didn't work if the last attribute added didn't + have an aligned length. + This patch is needed in preparation for adding an attribute which + doesn't have an aligned length. + * vrrp: Stop having an IPv6 link-local address added based on VMAC mac + address. + IPv6 link-local addresses that were based on the virtual MAC address of + the VMAC interface were being added. RFC5798 para 7.4 states that this + is not permitted. It also causes duplicate address detection failure, + since each instance of the virtual router was configuring the same + IPv6 address on the same subnet. + This commit stops the offending link-local address being addied (or removes + it if it can't stop it being added), and since VRRP advertisements must + be sent with the virtual MAC address, but a link-local address for the + interface, if a link-local address from the underlying interface exists, + it is added to the VMAC interface, otherwise the MAC address of the + underlying interface is used to generate a link-local address, which is + then added. + It wasn't until Linux 3.17 that the IFLA_INET6_ADDR_GEN_MODE netlink + message was added, via which one can stop a link-local address being + automatically configured. Therefore, if IFLA_INET6_ADDR_GEN_MODE is not + supported, the only way to ensure that the problematic link-local + address is not added is to remove it after the interface is brought up. + This is not ideal, since there is a small window when the "illegal", + and possibly duplicate, link-local address exists, but I haven't + found any other way of doing it for pre 3.17 kernels. + * vrrp: Stop sending unnecessary attributes in netlink messages. + When an IPv6 virtual address was deleted, it was being reported + in the log file that preferred lifetime was being set to 0, which + is only relevant when the address is being added. This commit stops + adding the IFA_CACHEINFO attribute when deleting addresses, and + also stops adding other unnecessary attributes. + * vrrp: Allocate an IPv6 link local address to VMAC if none on real + interface. + The physical interface than a VMAC is configured on may not have an + IPv6 link local address, but we can construct one for the VMAC using + the MAC interface of the underlying interface. + * vrrp: Remove code allowing mixed IPv4/IPv6 addresses. + If addresses of both types were configured, the receiving end would + reject the packet since the count of addresses received would have been + wrong since only addresses of one family can be sent, see vrrp_in_chk: + if (hd->naddr != LIST_SIZE(vrrp->vip)) + Since we don't want to send the addresses of the wrong family, add them + to the virtual_ipaddress_excluded block rather than the virtual_ipaddress + block. + * vrrp: Only set router flag in Neighbour Advertisements if forwarding. + * vrrp: Enforce maximum number of vips per virtual router. + If there were more than one virtual_address blocks in a + virtual_router block, one could add as many virtual addresses as + one wanted, since it didn't check the number already read. + * vrrp: Don't ignore excess virtual_address entries. + If there are too many virtual_address entries, add them to the + excluded block, but still give a warning message. + * vrrp: Verify VRRP configuration after all configuration read. + There was a lot of duplicated checking in vrrp_parser.c to ensure that + configured parameters were consistent, and also a requirement to configure + certain parameters before others. This checking was incomplete, and also + becoming more and more complex as more configuration options were added. + This commit delays a large part of the checking until after all the + configuration has been read. This removes the need for options to be + specified in a certain order and also for checking in multiple places + whether certain combinations are valid. + As a consequence of the delay in checking the configuration, the creation + of the VMAC interfaces is delayed until after the checking. + * vrrp: Accept is only valid for VRRPv3 + * vrrp: Verify priority and init_state consistent. + * vrrp: Verify password specified for authentication. + * vrrp: Verify have an ip address for interface. + * vrrp: xmit_base is only valid on a VMAC. + * vrrp: Ensure at least one VIP is configured on a VRRP instance. + This commit requires at least one VIP to be configured on a + vrrp_instance. Although the code looked as though it was designed to + allow 0 VIPs, not only was that a protocol violation, but also keepalived + rejected any VRRPv3 packets received without any VIPs, and also any VRRPv2 + with IPv6 due to the check in vrrp_in_chk() in vrrp.c. + * vrrp: Generate unique default VMAC interface names. + Since the virtual router ID can be duplicated both between IPv4 and IPv6, + and also between different interfaces, the approach of setting a default + interface name as vrrp.VRID could produce duplicate names. + This commit now attempts to use vrrp.VRID, but if that already exists, + then it will try vrrpN.VRID, where N starts from 1 and increases until an + unused name is found (for IPv6 it tries vrrp6.VRID before vrrp1.VRID). + * vrrp: Ensure necessary uniqueness of VRIDs. + VRIDs must be unique for a given address family and interface. + This commit ensures that there is no duplication of VRID/address family + on any interface. + * vrrp: Don't assign VIPs/eVIPs to the default interface. + alloc_ipaddress was always setting the interface to DLFT_INT (eth0) if no + dev DEVNAME was specified to a VIP/eVIP/static address. This is fine for a + static address, but doesn't make sense for a VIP or eVIP, since they should + be assigned to the vrrp_instance interface, unless explicitly configured + otherwise. + In fact, it probably doesn't make sense to specify dev DEVNAME for a + VIP/eVIP, since the addresses must be assigned to the vrrp_instance + interface. + * If a configuration error occurs between {}, skip to end. + If a configuration error occurred in a block, the parser could get confused. + This commit makes the parser ignore ignore all further entries until the end + of the block. + * Don't allow specification of default as an address where inappropriate. + The function parse_ipaddress would allow default or default6 to be + specified for any address it parsed, but it doesn't makes sense in a + lot of cases, so add a parameter to indicate if default is valid. + * Improve checking of configured advertisement timer. + * vrrp: Make sure that a VRRP instance has a name and is unique. + It was possible to specify a vrrp_instance without a name. It was also + possible to specify the same vrrp instance name twice. + * Extra validation for reading ip addresses. + * vrrp: Ensure a sync group has a name and hasn't already been specified. + * vrrp: VRRP authentication is dependent on VRRPv2 not IPv4. + The check for whether authentication is not dependant on IPv4, but rather + VRRPv2. This check will be conducted following reading the whole configuration. + * vrrp: Log error if unknown authentication type. + * Check for, and handle, '{' at beginning of a block. + There was no check for a '{' at the beginning of a configuration block. + This commit is the start of that check, allowing it either at the end + of the line with the keyword, or on a line of its own. + Also, in respect of group and notification_email, for all other configuration + items, the '{' could follow on a line of its own, but for configuration + items using read_value_block the '{' on a line following the keyword + was read as a configuration entry. + * Check for, and report, unknown keywords. + A misspelt keyword would have been silently ignored, potentially causing + the user difficulty in understanding why his configuration wasn't working. + * If an address fails to parse, ensure don't return an apparent address. + When reading an address, the address family was set early on, and a + subsequent failure to parse the address left the address family configured, + thereby making it appear that a valid address had been read. Simply set the + address family to AF_UNSPEC on a failure. + * Ensure an address option has a value. + There was no check that the parameter was present after a keyword, so for + example : 1.2.3.4 dev + would not have generated an error message, and alloc_ipaddress would have + attempted to read a word after dev, which would either cause a dore dump + or possibly return a parameter from a previous configuration line. + This type of checking probably needs to be added elsewhere too. + * Add validation of address scope. + * vrrp: Don't allow group block more than once in a sync group. + If a second group is configured, the first group is lost, and its + malloc'd memory is also lost. + * vrrp: Make sure sync groups have at least two members. + If a sync group was configured with no group {} statement, or if + the group statement had no entries, then keepalived would core dump. + This commit rejects groups with 0 members, and also with 1 member, + since it isn't a group. It also checks that a virtual_instance isn't + configured in more than one sync group, and also that the group + members specified exist. + * The address must be the first record in an address configuration item. + When an address is configured, it must be the first entry on the line. + This allows options specified afterwards to know the address family, + and also when reporting errors to include the address. + * vrrp: Log error if IPv6 and first address is not link local. + RFC5798 section 5.2.9 requires that if the protocol is IPv6, then + the first address must be the link local address of the virtual + router. + * vrrp: Ensure that the full VRRP packet has been received in the buffer. + Although afer receiving a VRRP packet, it checked that the length + specified in the IP header was long enough to contain all the VRRP data, + it didn't check that the data actually received was sufficiently long, + so this check is added. + * vrrp: Stop VIPs in same CIDR being deleted, but only when using vmac + so far. + If an interface has more than one IP address in the same CIDR, when + the "primary" address is deleted, all the secondary addresses are + also deleted, unless /proc/sys/net/ipv4/conf/IFACE/promote_secondaries + is 1. This commit sets the promote_secondaries flag on vmacs. + * vrrp: Make from and to for VRRP iprules use a define. + "From" and "To" were being stored as words rather than converted to + defined value. This made storage requirements larger and processing + them more time consuming. + * Don't report configuration bytes used if not _DEBUG_. + If _DEBUG_ is not defined, malloc was increasing the count of memory + allocated when called, but free wasn't reducing the count, and so the + figure reported was meaningless. + This commit completely disables the memory allocated counting and + reporting if _DEBUG_ is not defined. + * vrrp: Use defines for address scopes. + Rather than hard coded values for address scopes, use RT_SCOPE_* + * Force order of multiplication and division to avoid underflow. + * Clear list pointer after freeing list. + * Fix handling of active in vectors. active wasn't being consistently + updated or reported for vectors. + * Make functions always returning 0 void. + Three functions in utils.c always returned 0, and the calling + functions weren't checking the return code, since it was pointless, + so the functions have been changed to be of type void. + * Use struct in_addr rather than uint32_t for IPv4 address. + * vrrp: Disable all VMAC configuration code if don't have VMACs. + * Allow multiple spaces in quoted strings. + The handling of quoted strings saved each word separated between + tokens of '"'. This meant reconstructing a quoted string lost multiple + spaces and was hard work. + Quoted strings are now saved as the whole quoted string, without the + quotes, so retrieval is much simpler. This also allows further keywords + to follow the quoted string, if desired. + * vrrp: Remove string length dependencies in vrrp_print. + * vrrp: Stop using deprecated bcopy. + * vrrp: Add vrrp_instance name to some log messages. + * Optimise returning from list_element() when end of list reached. + * Make free_melement a static function. + * Use INET6_ADDRSTRLEN rather than hardcoded length. + * Don't format log message if not going to log it. + * vrrp: Add option to reduce vrrp advert address checking. + By default, every received VRRP advertisement checks the advertised + addresses are the same as the configured addresses, which is o(n^2). + This change adds the option to check the first packet received from + a master, but not to check the VIP list in subsequent adverts from + the same master. + * vrrp: Ensure vrrp_buffer large enough for largest possible received + packet. + The allocated receive buffer had size VRRP_PACKET_TEMP_LEN, which + suggests that it wasn't intended as the final solution. + Instead of using a fixed buffer size, the maximum MTU across all the + interfaces is calculated, and the size of the vrrp_buffer allocated + is the maximum MTU size. This guarantees that any VRRP packet received + will fit in the buffer. + * vrrp: Improved received VRRP packet checking. + First check the protocol headers have been received, then before + checking the overall length of the received data, check the data in + the protocol headers, since this will allow more meaningful errors + to be reported. For example if there was a mismatch between VRRP + versions with IPv4, a length error was being reported, rather than + the version mismatch. + All the error messages in VRRP packet checking now include VRRP + instance name, to help tracking down where the error lies. + * vrrp: Remove fixed limit number of VIPs in a VRRP advert. + There was an arbirtary limit of VRRP_MAX_VIP (20) VIPs for sending + a VRRP advert. Now that the vrrp_buffer is sized to be able to + receive any packet up to the largest MTU size, we can dynamically + allow as many VIPs as will fit in a packet (which varies depending + on IPv4 or IPv6). + There is also an overhead checking the received addresses in an + advert against the VIPs configure on the instance, but this can now + be mitigated by setting skip_chk_adv_addr on the VRRP instance. + * vrrp: Fix printing of vrrp tracking scripts. + * vrrp: Print Last transition time in human readable form. + * Disable assert statements unless _DEBUG_ is defined. + * Streamline free_list_element + * Remove duplication of code between free_list and free_list_elements. + * vrrp: Add vrrp strict mode, enforcing VRRP compliance. + The commit doesn't yet implement strict mode, but it will block + 0 VIPs, unicast peers, IPV6 in VRRPv2. + * vrrp: Add some strict tests. + In strict mode, the following are enforced: + IPv6 required VRRPv3 + There must be at least one VIP per VR instance + No unicast peers + Must be address owner to start in MASTER mode + * vrrp: Don't allow AH authentication with IPv6 and VRRPv2. + Of course, the RFCs don't allow IPv6 in VRRPv2, but it is an + extension supported by keepalived. + * vrrp: Some minor ipsecah updates. + * vrrp: Clearly identify that VRRP has subblocks of VRRP scripts. + The keepalived.conf.5 man page wasn't explicit that there are VRRP script + subblocks as part of the VRRP configuration, and this is now explicit. + * Trivial edits to man page keepalived.conf(5). + * man page remove static_rules configuration from vrrp_instance. + keepalived.conf.5 man page had an entry for static_rules within the + vrrp_instance blocks, and this is clearly wrong. + * vrrp: Fix typo in error message when sending VRRP advert. + * vrrp: Add option not to include vrrp authentication code. + RFC3768 updated VRRPv2 to remove authentication in 2004. This commit + adds a configure time option to exclude authentication code. + * vrrp: When adding ip(6)tables entries, only specify i/f for link_local + addresses. + Packets to/from global address could arrive or be sent on any interface, + so don't specify the interface for blocking the packets. For link local + addresses, the block must relate to the specific interface. + * vrrp: Add ability to use libiptc rather than invoking ip(6)tables. + Invoking ip(6)tables has a high overhead, since the process has to be + forked and exec'd, and then it has to read the whole ip(6)tables + filter chain before it makes a single update and commits it back. + Using libiptc avoids the overhead of multiple forks/execs, and also + means that multiple entries can be added/deleted to/from the ip(6)tables + configuration in a single update. + * vrrp: Add option to use ipsets instead of iptables to block addresses. + Instead of having lists of addresses in iptables, it is much more + efficient to use ipsets to handle those addresses, since that is + what it is designed for. + * Use /proc/sys/kernel/modprobe to find modprobe. + * Reinstate SIGCHLD before forking to exec modprobe for ip_vs. + The fork of modprobe to load ip_vs would have reported a failure + even though it would have succeeded. + * Reinstate SIGCHLD before forking to exec modprobe for ip_vs. + The fork of modprobe to load ip_vs would have reported a failure + even though it would have succeeded. + * Fix forking/execing re closing signal pipe. + When calling scripts, we don't want to give them access to the signal + pipe used between the parent process and the vrrp process. + * vrrp: Fix compile error when net/if.h and netlink/route/link.h conflict. + Some versions of libnl3 netlink/route/link.h conflict with some + versions of kernel header file net/if.h. This commit has a + workaround for when there is a conflict. + * vrrp: Fix compile failure with old kernels and libnl3. + Issue #215 identified a compile error with pre 3.13 kernels when + libnl3 was installed. This commit adds a test for that situation + and avoids using rtnl_link_inet_[sg]et_conf. + I haven't been able to test this on a re 3.13 kernel, but I have + simulated the scenario and it compiles as expected. + * vrrp: Fix compilation when ipsets not installed. + * vrrp: Fix build breakage when not using libiptc. + * vrrp: Fix VRRP respawning when no VIPs specified. + Commit b46dec58fa failed to check the the VIP list existed before + checking how many entries were in the list. + This commit also defaults the address family to IPv4 if no VIPs are + specified. + * vrrp: Make dependency on libnfnetlink/libnfnetlink.h conditional. + * Streamline handling of daemon mode flags. + * Improve handling of not being able to read a pid file. + If a pid file was opened, but for some reason a pid could not + successfully be read, the pid used to check if a process was + running was random. + * Remove unused pid filename definitions. + * Change outstanding debug flag tests to use bitops helpers. + * Allow for different sizes of long ints in bitops. + * vrrp: Ensure conversions of vrrp->adver_int etc don't overflow. + * Use bitops with daemon_mode. + * vrrp: Fix ip_rule direction for SNMP. + Commit 2da11f99 introduced defines for ip_rule directions rather + than using strings, but the commit omitted to update the snmp code + when processing the directions. + * add a line about the 'include' keyword in keepalived.conf(5). + * fix HTTP_GET config dump. The config dumper routine + dump_http_get_check was always printing the last configured checker's + connection info. + * dump_conn_opts: prototype change. + pass the conn_opts_t pointer as a void* parameter to make the + function prototype a valid dump callbac This makes smtp_dump_host() + function needless, it is removed. + * fix build issues on older systems. + Try to avoid the build error on systems which lack of + O_CLOEXEC and IP_MULTICAST_ALL defines (such as Ubuntu lucid and + Debian squeeze). + * Fix compilation with --disable-vrrp-auth + * vrrp: Remove state VRRP_STATE_LEAVE_MASTER since it isn't used. + * vrrp: Fix VRRPv2 authentication issues. + * Don't redefine _GNU_SOURCE. + * vrrp: Exclude function vrrp_ah_sync when --disable_vrrp_auth. + * Fix some conditional compilation errors. + * Streamline getopt_long options. + * Remove '\n's from log messages. + * Ensure standard configure generated defines are used. + The defines used in the compiles in the various subdirectories were + specified in each Makefile.in which could lead to inconsistencies. + This commit defines APP_DEFS in configure.in, which is then used + in each Makefile.in. + * Dump keywords to file rather than stdout. + * Add copyright message and build options to version output. + This commit also ensures that the end year of the copyright date + range is the current year when keepalived was built. + * Stop erroneously logging error message for unknown keywords. + When vrrp_parser parsed the configuration file, it didn't know + about the checker keywords, and vice versa, and so reported errors. + This commits makes the other keywords known but marked as inactive. + * vrrp: Fix SNMP trap NewMaster. + The trap must only be triggered for IPv4, since RFC2787 doesn't + understand IPv6. Also, RFC2787 only supports VRRPv2 instances, + so don't raise the trap for VRRPv3 instances. + The IP address returned must be the actual IPv4 address, and not + the ip_address_t that holds the address. + * vrrp: Use underlying interface for ifindex in NewMaster traps for vmacs. + If the VMAC ifindex is returned, then there is no indication that + multiple VRRP instances are operating on the same physical interface, + so return the ifindex of the underlying interface. This will also + mean that the same ifindex should be maintained between different + invocations of keepalived. + * vrrp: Move SNMP private defines into vrrp_snmp.c/check_snmp.c. + The defines for the net-snmp "magic" were in the header files + which were included by other modules. The defines are private to + the c source file, so move the defines into them, to avoid polution + compilation units which included vrrp_snmp.h/check_snmp.h. + * Use definition for 1.3.6.1.2.1. + * vrrp: Start SNMP after reading configuration. + If SNMP is started before the configuration is read, a meaningless + response will be returned to net-snmp, so don't start the snmp agent + until after all the config has been read. + * vrrp: Fix setting SNMPv2-MIB::sysORID entries in ORTable. + The length of the OID passed to register_sysORTable was wrong. + * vrrp: Allow SNMP agent to unregister cleanly with more than one MIB. + Separate snmp_unregister_mib() out from snmp_agent_close() to allow + multiple MIBs to be unregistered before the snmp agent is closed. + * vrrp: Don't register the global_oid with SNMP twice. + If SNMP is enabled, both the checker process and the vrrp process + were registering the global_oid. This commit makes the checker + process register it if it is running, otherwise the vrrp + thread registers it. + * vrrp: Add read-only support for RFC2787 SNMP (VRRPv2). + * vrrp: Allow any combination of keepalived and RFC SNMP support. + * Allow enabling snmp via config file. + * ipvs: sctp ad persistent engine support. + * Fix building with --disable-lvs + * Stop autoconf complaining. + * vrrp: Use defined value for maximum VRRP priority. + * vrrp: Simplify scheduler code vrrp_leave_fault(). + Two pairs of code blocks were repeated, and each pair could be + reduced to occuring only once if the conditions were merged. + * vrrp: If VRRP priority is 255 and not nopreempt, configure like state + MASTER. + * vrrp: Ensure number of VIPs doesn't exceed 255 per instance. + * vrrp: Don't check second time if IFLA_IFNAME is NULL. + * Dump interface details with rest of config. + * vrrp: When becoming master, block addresses before adding them. + If not accept mode, entries are added to iptables/ipsets to block + traffic to the VIPs/eVIPS. These entries should be added BEFORE the + addresses themselves are added, to ensure there isn't a (small) + window when we might reply from the added addresses. + * vrrp: Document virtual_rules. + * Fix memory leak re some uses of ipaddresstos(). + * Fix parsing ipset names. + * vrrp: Improve and fix finding vmacs left over from previous invocation. + When netlink reports a new or existing interface, we can extract + information that allows us to determine if the interface is a macvlan, + and the type (e.g. private). We can then save that in the interface_t + structure, setting the vlan flag, and base ifindex. + When working out the interface name to use for VMAC instances, we can + then check the interfaces which are macvlans to see if any of them + match the vrrp instance in terms of mac address, underlying interface + and inet address family, and if so we can then reuse the macvlan interface. + Commit 9ae463e7f broke the finding of existing interfaces where the + configuration didn't specify the VMAC interface name, and simply created + a new interface. This commits now resolves that. + There is still an issue that if an interface was in MASTER mode when + keepalived terminated, when keepalived restarts it leaves the VIPs and + eVIPS on the interfaces, meaning that keepalived cannot receive VRRP + packets on the interface from the VRRP instance that has taken over, and + it also means that there are duplicate IP addresses on the network. + Another commit will resolve this issue. + * vrrp: Remove ip addresses left over from previous failure. + If keepalived terminates unexpectedly, for any instances for which + it was master, it leaves ip addresses configured on the interfaces. + When keepalived restarts, if it starts in backup mode, the addresses + must be removed. In addition, any iptables/ipsets entries added for + !accept_mode must also be removed, in order to avoid multiple entries + being created in iptables. + This commit removes any addresses and iptables/ipsets configuration + for any interfaces that exist when iptables starts up. If keepalived + shut down cleanly, that will only be for non-vmac interfaces, but if + it terminated unexpectedly, it can also be for any left-over vmacs. + * Sort out extraneous space and tab characters. + The commit removes spaces followed by tabs, trailing spaces and tabs, + and replaces occurrences of 8 spaces within tabs, except where the + spaces and or tabs occur within strings. + This has the benefit that if blocks of code are copied, git does not + complain when running git am on a file produced by git format-patch. + * vrrp: Simplify RFC SNMP code. + The code was checking VRRP version unnecessarily, and also had code + to return an index element which is not necessary. + * vrrp: Don't send traps for SNMP MIBS which are not enabled. + * vrrp: Don't register SNMP global OID if not handling it. + If neither the checker nor the vrrp components of KEEPALIVED-MIB + are enabled, don't register the global OID. + * Parameters passed to traps don't need to be static. + * Fix --without-lvs and --without-vrrp configure options. + * Ensure general MIB is enabled if --disable-lvs configured + * Avoid compiler warning re function definition to prototype. + * Add RFC6527 SNMP (VRRPv3). + This commit adds read-only and notifiction support for SNMP for VRRPv3 + in accordance with RFC6527. + * vrrp: Fix MAC address for IPv4 VMACs created after IPv6 VMACs. + * vrrp: Allow routes and rules to use tables >= 256 + * Don't recompile libipvs-2.6/*.c every build. + * vrrp: Remove left over ip rules and routes at startup. + * vrrp: Ensure ip routes added before rules, and vice versa. + If ip rules are added before routes, then it is possible for a + packet to be routed while the routing table is only partially + complete. Adding the rule after the routes ensures that the routing + table won't be processed until it is completely set up. + Likewise, when removing rules and routes, remove the rules first. + * vrrp: Add missing reason message for rejected VRRP packet. + Issue #255 show a log identifying bogus VRRP received, but there + was no reason shown for the rejection. The only instance I can find + for this is if vrr->family is neither AF_INET or AF_INET6, which I + think must be a bug in the code parsing and setting up VRRP instances. + This commit just adds a log message to be explicit about why the packet + is rejected, and also reports the value of vrrp->family. + * Reduce number of calls to getaddrinfo() reducing DNS lookups. + * Report if vrrp or checker process abnormally terminates. + * Add option to increase child process priorities and make non swappable. + * Make vrrp_daemon.c and check_daemon.c use header file for externs. + * Add reporting ops mode, and minor tidying up of virtual_server config. + * vrrp: Don't overwrite real interface MAC address with VMAC MAC address. + When a VMAC was being created, the MAC address of the VMAC was + being copied to the MAC address of the underlying interface in the + interface_t structure. + The netlink reflector sets up the MAC address of the new VMAC + interface, so there is no need to copy a MAC address at all. + * vrrp: Stop keepalived_vrrp terminating with SIGSEGV if lvs_syncd_if set. + ipvs_stop() was being called before shutdown_vrrp_instances(), and + so if lvs_syncd_if had been specified on a vrrp instance, keepalived + would subsequently terminate with a SIGSEGV in free_interface_queue(). + * Make lvs_sync_daemon global config rather than vrrp specific. + * Stop lvs sync daemons on restart in case of prior abnormal termination. + * Remove any residual ipvs configuration on restart. + * vrrp: Optimise clear_diff_vrrp_*() functions. + * Check MALLOC returned non NULL before copying to the location. + * Allxoow specifying syncid for lvs syncd. + * vrrp: Send second set of GARP messages afer receiving lower prio advert. + When a VRRP instance transitions to master state, if garp_master_delay + is non-zero, a second set of garp_master_repeat messages is sent after + garp_master_delay seconds (unless 0). However, if a lower priority advert + is received, keepalived didn't send a second set. This commit sends a + second set if a second set would have been sent after transition to master. + * vrrp: Allow setting of graduitius ARP parameters for lower prio adv + separately. + * Don't log a "keepalived stopped" message if keepalived already running. + * vrrp: Add support for iprule and iproute table names. + * Resolve MALLOC/FREE issues to iprule/iproute table names. + * Make keepalived_malloc return void* to match malloc. + * When reporting MALLOC/FREE status on exit, report max MALLOC'd memory. + * Make libipvs use MALLOC/FREE. + * Don't restore original signal state when reloading checker config. + * Ensure signals USR1 and USR2 are set to ignore in checker process. + * vrrp: Only free list of iprule table names if list assigned. + * vrrp: Fix strict mode of vrrp instance overriding global vrrp_strict. + * Attempt to fix build breakage introduced in commit 85f81dd. + * Fix parsing of scope for ip addresses. + * Free global ssl context on reload. + * Free request_t buffer and ssl data on reload. + * vrrp: Restore sync-state after reload. + Currently the sync state is rebuilt from the member states after + config reload. This changes now reloads the previous sync state + after reload, and then pushes this back to the group members. If a + new group member is added during the reload, then the new group + will accept the sync group state. If a group member is removed + during a reload, then a special case will be executed to force + the sync-group state to BACKUP. This is required so that an + alternative backup peer for the removed group is given an + opportunity to take over the gateway. + +2015-07-07 Alexandre Cassen + * keepalived-1.2.19 released. + * vrrp: fix checksum computation in vrrp v2 for socket family AF_INET + One of difference between VRRPv2 and VRRPv3 is the way checksum is + computed. In VRRPv2 no accumulation is specified in RFC while in VRRPv3 + it uses regular accumulator with upper pseudo header. This fix restore + compliant VRRPv2 for AF_INET vrrp instance. Since IPv6 socket are using + IPV6_CHECKSUM option this means that checksum for VRRPv6 instance runing + in native_ipv6 mode are broken. But since this is a end to end sanity + check and both side are operating the same way this OK, no "compliant + with VRRPv3 RFC", but anyway using native IPv6 on VRRPv2 is not really + compliant too ;) + * Some cosmetics at Makefile stuff. + +2015-06-30 Alexandre Cassen + * keepalived-1.2.18 released. + * some cosmetics changes (in memory and parser). + * remove dead/not used code. + * revert notify script brought by last release. + * revert VRRP preemption speed up extension. + * vrrp: ix vrrp removes incorrect IPv4 address when VIPs + are removed. + * vrrp: Re-enable VRRPv2 checksum on inbound pkts. + +2015-05-31 Alexandre Cassen + * keepalived-1.2.17 released. + * zalloc use xalloc for consistency. + * memory: fix wrong size calculation in zfree. + * Fix keepalived snmp configuration. + * Change comments to match kernel style. + * smtp: Fix wrong algorithm in RCPT-TO building. + * vrrp: ICMPv6 : modify the way we copy the src address into the IPv6 + header, in order to not overwrite the header' and the 'hop limit' fields + * vrrp: sync status flag (up/down) for _all_ VMAC interfaces. + When using VMAC and running multiple instances on the same interface, + only one of the VMAC interfaces will get its status flag synched. + This commit will update the status flag for _all_ VMAC interfaces attached + to a base interface. + * ipvs: fix segfault crash when parsing SMTP_CHECK config + * ipvs: SMTP_CHECK now respects configured RS port. Before that it always + used the default port 25. + * ipvs: config parser: handler for the end of block. new function + install_sublevel_end_handler(handler). + * ipvs: new log function vlog_message taking varg_list. log_message now + uses format gcc attribute, not the macro wrapper. + * ipvs: bug: check_smtp was logging "#30" instead of RS address do not do + nested va_start/va_end calls in smtp_final. + * ipvs: clarify snmp_check config syntax. Now host{} section is optional, + and all the standard connection options are available in the SNMP_CHECK{} + level, too. If one or many host section persist, those base-level options + are used to specify default values that can be overriden in a host section. + * vrrp: Use literal constants for bit flags Use literal constants for bit + flags of the "debug" global variable Change from using numeric constants + to literal constants for the bit flags of the "debug" global variable. + * vrrp: Backup obtains VIP resulting in a duplicate IP. VRRP backup obtains + VIP resulting in a duplicate IP situation. When a priority change to the + configuration of a Master router drops its priority to below that of a + backup router, the VIP is not released on the Master router leading to + a duplicate IP situation. + * vrrp: Make preempt_delay work more than once. + * vrrp: Changes needed to support AH auth in VMAC mode. Note according to + the RFC this is not a requirement, but we think that our customers will + expect it to work. The RFC actually discourages its use because it adds + little to no additional security. We are still able to interoperate in + RFC mode by not enabling authentication. + * vrrp: Check VRRP header in the IP auth header is correct. In the middle + of vrrp_in_chk, the existing VRRP packet parsing code does + "return vrrp_in_chk_ipsecah(vrrp, buffer);" if the VRRP version is two, + and the authentication type is IP sec authentication, to check whether + or not the IP sec authentication header is valid. However the "instant" + returns means that is the IP sec authentication header is valid, then + the remaining parts of the VRRP packet (VRRP version, VRRP checksum, + VRID, number of VIPs, advertise-interval) are not parsed or validated. + * vrrp: Add support for SNMP trap: vrrpTrapNewMaster. + * vrrp: Add skeleton code for VRRP-MIB. + * vrrp: Check existing VIF and recreate if VMACs are wrong. Although under + normal circumstances we will cleanup VIF interfaces when shutdown, there + are various scenarios were this is not the case. To make the code more + robust, keepalived now performs a check for matching VIF interfaces at + restart, and if the configuration of the VIF matches the current + keepalived configuration it will reuse the VIF. However, should the + configuration be different, keepalived will remove the existing + interface, and then recreate a new VIF interface with the appropriate + configuration. This fix resolves the continuous crash scenario that can + occur when keepalived fails to configure the VIF because one already + exists. It prevents keepalived from reusing a previous VIF interface + which does not completely match it configuration criteria.` + * vrrp: fix snmp code (cosmetic) + * vrrp: Fix the keepalived mib and agentx warnings. During Keepalived + startup, about twenty "duplicate registration" and a couple of "Failed + to connect to the agentx master agent" warning messages were issued. + Pairs of the "Failed to connect" warning messages were logged every two + minutes. The "duplicate registration" warnings happened because VRRP + called snmp_agent_init twice, once for the keepalived-vrrp MIB, and once + for the rfc2787-vrrp MIB, however each call to snmp_agent_init also + tried to register the keepalived-global MIB (which holds data like + Keepalived version number, SMTP server details, and a "from" email + address). It was the second attempt to register this keepalived-global + MIB that generated the "duplicate registration" warning. The registration + of the keepalived-global MIB is now only done once under the control of + a static variable. init_agent is also called just once under the control + of the same static variable to prevent it logging a warning message. The + "Failed to connect" warnings occur because Keepalived does not know how + to connect to the SNMP AgentX master server. By default the Agent X + master server is listening for MIB registrations on a local TCP socket + with a port number of 705. + * vrrp: Fix VRRP preemption taking too long. VRRP preemption may not work + correctly due to group expiry timers being incorrectly manipulated while + running down the MDT. Also, preemption can be disrupted if the VRRP group + receives an advertisement while running down it's timer. + * vrrp: Initial Implementation of VRRP statistics. + . Add VRRP counters, This is needed by the VRRP-MIB, and will provide + better insight into the operation of VRRP for users. + . Add SIGUSR1 and SIGUSR2 handlers + - SIGUSR1 allows users to dump current state of VRRP instacnes to + /tmp/keepalived.data + - SIGUSR2 allows users to dump VRRP counters to /tmp/keepalived.stats + * vrrp: Copy old VRRP stats on reload. + * vrrp: Seperate printing functions from vrrp_daemon.c. Seperate state + printing code from vrrp_daemon.c so that the code is better organized. + * vrrp: Track master router priority in VRRP. + * vrrp: Added 'Master priority' output to show vrrp detail. + * vrrp: Enhance keepalived vrrp to configure mltp-scripts. Currently, + keepalived vrrp only allows to configure single notification script. + This is a limitation ans should be extended so that keepalived vrrp can + notify multiple scripts about vrrp state changes. + * vrrp: Don't display ipsec ah password in log files. When authentication + type is selected as ipsec ah, password should not be displayed in the + log files. + * vrrp: Fix notify upon reload. When a notify script is configured after + Keepalived has been started, if other notify scripts are already + configured, these scripts get reinvoked even if the state has not + changed. This occurs when in backup state. When in master state, no + notifications are sent out at all if a new notify script is configured. + For the backup case, this problem occurs when the daemon is reloaded. + This causes vrrp to leave the state it's currently in, go to the init + state and from there, go back to backup. However, this transition + causes the notify scripts to be invoked, causing a redundant + notification to be sent. For the master case, there is no call to + notify_instance_exec(), hence why no notifications are seen at all. + The solution is to add a new field to the vrrp struct that stores the + notify scripts that were configured before reload. A new function has + been added to take advantage of this new field. Instead of calling + notify_instance_exec() when we are in the init state, we now call + notify_instance_exec_init(). This is a proxy function that modifies + the 'script' member of a vrrp structure to point to a new list + containing only scripts that have not previously been configured, + thereby preventing the sending of notifications that have already been + sent. This new list is created by utilising the new vrrp struct field. + Inside this new function, notify_instance_exec() is called using the + modified VRRP instance. When this call returns, the member is reset + back to its original value. + * vrrp: Keepalived extension to support VRRP version 3. Updated vrrp_header + and _vrrp_t struct to support version 3 params. Support to build vrrp_v3 + packet. + * vrrp: Keepalived extension to support VRRP version 3 (2). + * vrrp: Keepalived extension to support VRRP version 3 (3). Timer changes + to support centi-sec. + * vrrp: Keepalived extension to support accept mode for v3. + * vrrp: Fix up limitations of keepalived VRRPv3. The current Keepalived is + supporting IPv6 but it is not fully functional and it is not as per + RFC5798. Following are the issues identified and changes done: + - IPv6 address population. + - Correction of Checksum in case of IPv6. + - Getting source address from received advertisements. + - Populating source address in sent VRRP advertisements. + * vrrp: Improve display output for VRRPv3. + - Changed data-type of mcast_saddr to sockaddr_storage to support IPv6 + also. + - Added new parameters version, accept, weight updated advertisement + interval for operational command show output. + * vrrp: MIB enhancements for accept-mode. + * vrrp: Fix mismatched advertisement interval. In VRRP version 3, all + BACKUP routers must set their advertisement intervals to match the current + MASTER's. Although not explicitly stated in RCF5798, when the MASTER falls + over or forfeits its MASTER status, the new MASTER should not continue to + use the old MASTER's advertisement interval value and should instead use + its locally configured value. To achieve this, a new field has been added + to the VRRP structure that stores the most recent advertisement interval + of the current MASTER. We track changes to the current MASTER's interval + and update this new variable accordingly. The value is only updated when + we are in BACKUP state and reconfiguring the local advertisement interval + has no effect on it. + * vrrp: snmp: don't hardcode AgentX socket location. The default location + should be `/var/agentx/master` (as per RFC2741 and this is also the + default for NetSNMP, including on Debian-based distributions). This + default location is set at configure-time for NetSNMP and subagent will + use it automatically (it is also available through `net-snmp-config.h`). + A useful feature would be to have a flag to change that if the user + change this settings in the master agent. This commit just reverts this + change to let SNMP subsystem work as expected for most users. + * vrrp: snmp: restore use of net-snmp-config to build SNMP support. With + a lazy linker, `libnetsnmpmibs` may require some additional libraries + to be linked (like `libsensors`). Therefore, only rely on + `net-snmp-config` to get the appropriate flags. + Also add some additional tests: + - check that we can build a simple executable (NetSNMP can be quite + broken and in this case, the error during compilation is not crystal + clear, checking that in configure is more informative) + - check if we subagent support is compiled in (This is optional and + again, the error is not crystal clear during compilation). + - check that net-snmp/agent/util_funcs.h is present (Due to a flaw in + NetSNMP build process, this header was not installed for quite a long + time, notably on RHEL derivatives; code to handle its absence was + already present in Keepalived). + * vrrp: snmp: don't enable SNMP support automatically. + Most users won't use it and it would fail if NetSNMP is not installed, + unless a user add `--disable-snmp` to configure command line. + * build: move custom include directives (`-I`) first. Some libraries, + notably NetSNMP, may pollute CFLAGS by adding stuff like + `-I/usr/lib/x86_64-linux-gnu/perl/5.20/CORE` in CFLAGS. Instead of + trying to not use CFLAGS from NetSNMP at all (some of those bits are + important as they influence some NetSNMP headers), we ensure that the + bogus include flags are after our own include flags. + * global: Set global data default values after parsing config file. + This patch will defer setting the global data default values until + after the config file has been parsed. This will potentially avoid two + calls to getaddrinfo. For example, if the router_id and/or email_from + parameters are set in the config file, there is no need to call + getaddrinfo twice in order to set a default value. Instead, this patch + will check to see if they values are unset after parsing the config + file. Note that email_from and smtp_connection_to are only set to a + default value if they are unitialized and smtp_server is specified. + * doc: add -x/--snmp flag to keepalived manual page. + * snmp: add -A/--snmp-agent-socket to specify AgentX socket. + +2015-03-31 Alexandre Cassen + * keepalived-1.2.16 released. + * Properly close netlink channel to avoid fd leak. + * Use getaddrinfo instead of gethostbyname to workaround + glibc gethostbyname function buffer overflow. + * ipvs: log http timeout only when server goes down + All other calls to log_message() when a check fails are + performed when a server changes its state. + The http timeout log message is the only exception. + * ipvs: properly fix bug when Q < H. + The commit a77c2c7 has not fixed the issue. + Log messages became accurate, but unsigned comparison + was still in use. + * ipvs: HUP processing refactored. + copy_srv_states is removed: we can copy states with + existing clear_diff_*functions, as long as + clear_diff_services is called before the init_services. + vs_exist, rs_exist: remove side-effects from these functions. + Now they do only search and return pointers. + get_rs_list removed: the new rs list is now passed to + clear_diff_rs. + init_service_vs: quorum_state assignment is not needed + here. It is already assigned either by vs constructor, or + by alpha handler, or by clear_diff_services. + * ipvs: refactoring link vsg structure to vs. + this adds a pointer to virtual_server_group_t into + the virtual_server_t structure and fills these pointers + after config load. + This change will allow to access vsg items of a vs easily, + without iterating and name compare. + * ipvs: refactoring use links to vs->vsg links. + ipvs_cmd: removed vs_group list parameter. Link to vsg + is obtained via vs->vsg. These functions are also modified + in the same way: ipvs_group_cmd, clear_service_rs, + clear_service_vs, clear_diff_rs. + clear_diff_vsg: new_vs is passed as a param, vsg pointers + are retrieved w/o iterating. + * ipvs: fix problems with config reload. + The commit 7bf6fc contained a bad trying to fix the issue + when an alive RS does not appear in a new VSG entry on reload. + It has not fixed the original issue and added a new one: + vs_groups lose quorum on config reload. + This commit fixes the issue properly, and also the case when + RS in VSG is in inhibit mode. + The reloaded flag is added to the virtual_server_group_entry_t. + ipvs_group_sync_entry: add alive destinations to the newly + created vsge. It is aware of inhibit-on-failure destinations. + sync_service_vsg: calls the former for each created vsg entry + vsge_exist: changed just as other *_exist routines. + * genhash: add support of fwmark in genhash + * genhash: terminate thread if connect_error + * Fixed filenames and paths so that make uninstall removes + initscript and man pages. Changed perms for keepalived.sysconfig + from 755 to 644 + * Fix a typo in dump_global-data(). + * vrrp: revert previous buggy preempt extension. + * smtp: fix infinite loop when the smtp server unexpectedly + closes the connection. + +2014-12-21 Alexandre Cassen + * keepalived-1.2.15 released. + * vrrp: Use ancillary data on sending path for IPv6 + mcast_src_ip. Well, previous code used bind() to specify + IPv6 src address. Ancillary data is a much more cleaner + and efficient way... + * ipvs: Fix format of long int in log_message call. + * ipvs: fix building with fwmark disabled. + * vrrp: Pointer dereference before NULL check. + * STR(SMTP_PORT) returns "SMTP_PORT", not "25". + +2014-12-16 Alexandre Cassen + * keepalived-1.2.14 released. + * The "Date:" mail header is now localtime. + * bugfix: fwmark field was formatted as signed int + * dump_conn_opts: fwmark was not displayed. + * log_message: emit -Wformat= compiler warnings. + There could be (and actually are) situations when the format + string and the arguments list passed to the log_message() are + inconsistent or mistyped. The compiler did not show any warnings + because the vsnprintf was called indirectly. + * Further unification of IP endpoints logging. + This change tries to keep usage of the standard "[%s]:%d" format + string to a minimum. Instead, use inet_sockaddrtopair wherever + possible. + * Add SNMP subsystem option to man page. + The keepalived(8) man page did not mention the -x option to + enable the SNMP subsystem. This patch adds the -x (and --smmp) + options to the keepalived(8) man page, as described in the + keepalived help message. + * vrrp: fix gratuitous ARP refresh timer handling. + Previous code was using an 'int' to store parsed timer value. + This value was then expanded to TIMER_HZ which can lead to a + wrapping issue if requested timer is longer than local machine + 'int' representation. This patch reworked the code to use + timeval_t instead and perfrom regular timeval operations. + * vrrp: Fix a memory leak while dropping incoming IPSEC-AH + authenticated advert. Digest was allocated in previous code + without freeing it on HMAC-MD5 missmatch. + * vrrp: Extend IPSEC-AH auth to support unicast. + If you plane to use IPSEC-AH auth in unicast mode (which THE best + idea), then IP header TTL MUST be zeroed since it is mutable field + on transit. + * vrrp: Update VRRP VMAC doc. + Add vmac_xmit_base in configuration example and force rp_filter=0 + on macvlan interface. + * vrrp: make gratuitous ARP repeat count configurable. + . garp_master_repeat : Gratuitous ARP count sent on the wire + after MASTER state transition. + . garp_master_refresh_repeat : Gratuitous ARP count sent on the + wire when garp_refresh_timer fir + * vrrp: fix preempt and state BACKUP when prio 255. + This makes it so that keepalived will respect various settings that + should prevent it from assuming the MASTER role for a vrrp_instance + unconditionally and immediately, even if the priority of the + vrrp_instance in question is set to 255 (VRRP_PRIO_OWNER). These + settings include: + ---- conf ---- + state BACKUP + preempt_delay + nopreempt + * vrrp: in backup state notify when vrrp is not up and move to FAULT + state. + * ipvs: failed RS was flapping on config reload. + The RS disabled by health-checker was turned on w/o health-checking + by SIGHUP handler in the init_service_rs() subroutine. + This did not happen with alpha mode set. + * libipvs: allow IPv4 RS in IPv6 VS and vice versa. + This change syncronizes local copy of libipvs with the upstream + (kernel/ipvsadm/ipvsadm.git) to the date. IPVS in Linux 3.18 will + include the feature of mixing of tunneled RS families in single VS. + The compatibility with older kernel versions is kept. + * libipvs: minor bugfix with retreiving dest af. + This change needs to be sent to the ipvsadm upstream, too. + This clarifies the previous commit, so there is no need to mention + it in the changelog. + * vrrp: check if interface is known when using use_vmac. + vrrp->ifp is NULL when use_vmac keyword is defined before the + interface keyword. This would result in a segfault + * vrrp: simplify macvlan creation. + Create the macvlan interface in one netlink command rather than + three (creation of the macvlan in netlink_link_add_vmac function, + set of the mac address in the netlink_link_setlladdr function, set + macvlan mode in the netlink_link_setmode function). + This simplification: + 1. avoids potential issues if the firt netlink command passes butcw + not the next ones + 2. reduces number of netlink messages (light optimization) + * ipvs: bugfix quorum state was flapping when Q < H. + When a service had quorum < hysteresis, the lower threshold of RS + weights was calculated incorrecly. Unsigned arythmetics was used, so + errors like this appeared in log: Keepalived_healthcheckers[2535]: + Lost quorum 1-2=18446744073709551615 > 10 for VS + The up -> down quorum state transition was happening every time when + alive RS set was changed. This bug was in place since + keepalived-1.2.9 + * vrrp: add support to IPv6 mcast src address specification. + For some reason (well... which one ?), previous code didnt support + specification of multicast source address in IPv6 mode. If you are + using 'native_ipv6' and want to specify IPv6 mcast source ip address + then you can use 'mcast_src_ip' keyword with IPv6 address. + * vrrp: Add support to IPv6 src_address discrimination in master + rx state. + Previous code didnt support IPv6 address discrimination while in + MASTER state receiving same prio advert. This patch extend previous + code to support IP address comparison agnostic. + * vrrp: IPv6 mcast src_addr handling and VMAC fix. + Properly bind socket for v6 use-case when mcasr_src_ip is in use or + when VMAC is used. This patch fix VRRP VMAC in native_ipv6 mode, + previous code just use the vmac interface link-local IP Address as + src_ip leading to a corner case (to keep polite). + * vrrp: in IPv6 scope_id is mandatory to bind link-local address. + In IPv6 use-case, source IP address is set binding sokect to + socaddr_in6. Linux Kernel requires interface to bind link-local + address. + * vrrp: fix nopreempt mode in master_rx. + While receiving lower prio advert, preempt election according to + nopreempt keyword. By default preempt is on as requested by RFC. + * exit on malloc failure. + * genhash: code cleanup. + +2014-05-13 Alexandre Cassen + * keepalived-1.2.13 released. + * vrrp : Use the standard unsigned int types. This fixes + building with musl libc, which does not expose the internal + __uint* defines. (Natanael Copa) + * check : Fix template issue in IPv6 host header. + (Jan Hugo Prins) + * ipvs : ipvs_syncd_cmd uses memset() to zero the daemonrule + buffer before populating it and sending it up. daemonrule is + malloc()ed by ipvs_start(). ipvs_start() can bail early if it + can't communicate with ipvs. Neither place which call + ipvs_start() check the return value, allowing them to walk + straight into a NULL pointer deref. (jsgh) + * check : Without inhibit_on_failure on a real_server, when the + server is marked down existing TCP connections to it are simply + blackholed. Hence inhibit_on_failure: by setting the weight to + zero no new connections are sent to that server, but because the + server isn't completely removed from the table existing + connections are allowed to continue. The same problem exists + with sorry_server. When a real_server comes back up the + sorry_server is removed from the pool and existing connections + are blackholed. Instead of continued service, which may usually + be a fast response indicating overload, the client must engage + in a lengthy wait for the connection to time out. It would be + better in many cases to allow the sorry_server connections to + complete naturally. Luckily the code is structured well enough + that all is required to get this behaviour is to set the inhibit + member of the sorry_server structure, which is mostly just a + change to the config file parser. (jsgh) + * check : unify logging of RS and VS. This fixes the bug of + displaying a FWM service as [x.x.x.x]:0, where x.x.x.x is the + first RS of that service. (Alexey Andriyanov) + * check : unify connection options among checkers. + All the remote checkers (TCP, HTTP/SSL, SMTP) now have the + same set of connection options: + . connect_ip (new to TCP, HTTP) + . connect_port + . bindto + . bind_port (new) + . connect_timeout (new to SMTP) + All of them are optional with reasonable defaults. The patch + is designed for simplicity in adding a new option. Since the + connect_ip could be inequal to the RS address and, worse, the + same for all RSes, the endpoint is now logged as [RS]:rport, + not the [connect_ip]:connect_port. (Alexey Andriyanov) + * check : fwmark connection option. (Alexey Andriyanov) + * check : make SO_MARK a compile-time option. + (Alexey Andriyanov) + * check : documentation for generic connection opts. + (Alexey Andriyanov) + * check : random delay before doing the first check. + every RS check is registered with a random delay between 0 + and vs->delay_loop seconds. It helps avoiding multiple + simultaneous checks to the same RS server. (Alexey Andriyanov) + * vrrp : Fix sync of interface status flag when using VMAC + interface. There is a chance that the VMAC interface status + flags (up/down) could be different from the base interface flags. + This patch will only change the VMAC interface status flags when + the base interface is changed. (Jonas Johansson) + * vrrp : Let only base interface change the VMAC interface status + flags. The interface status flags for a VMAC interface shall + only be changed by the base interface, never by reading the + actual VMAC interface flags. (Jonas Johansson) + * vrrp : Fix initial interface status flag value for VMAC + interface. In commit a05a503, "vrrp: Fix sync of interface + status flag when using VMAC interface", no inital value for the + VMAC interface status flag was set. Due to that the VMAC interface + flags shall follow the base interface, the base interface status + flags value shall be copied to the VMAC interface status flags + after the VMAC interface has been created. (Jonas Johansson) + * vrrp : Proper restore of VMAC interface properties on SIGHUP. + On SIGHUP the VMAC flag and base ifindex for a VMAC interface was + lost. (Jonas Johansson) + * vrrp : Revert "Honor preempt_delay setting on startup.". + This commit resulted in two individual bugs: + + 1) A keepalived instance coming on-line would not transition to + MASTER state until the preempt_delay duration had passed, even + though there was no already existing VRRP speaker in MASTER + state on the link. In other words, it changed the semantics of + preempt_delay from a delay that only took place before + *preemption* of another VRRP speaker, to a delay that + unconditionally took place after Keepalived came online. The + keepalived.conf manual page has always documented the former + meaning, which is also IMHO the only one that you would + intuitively expect. + + 2) The preempt_delay was applied when a Keepalived process was + reloading its configuration following the recipt of SIGHUP. + If the Keepalived instance was in MASTER state before the + reload, it would cease transmitting VRRP hellos for the + duration of preempt_delay, but *not* actually remove the + virtual addresses from the network interfaces. This in turn + resulted in any backup VRRP speakers on the links transition + to the MASTER state while preempt_delay was still in effect + on the original MASTER that was reloaded, thus creating a + service-impacting split-brain scenario where the virtual + addresses are present and active on multiple VRRP speakers + simultaneously. + + (Tore Anderson) + * vrrp : fix ip_address comparison. Extend IP_ISEQ() macro to + take care of NULL addresses. This issue end on SEGV while + using virtual_route. thanks to Tore Anderson for reporting. + * vrrp : fix double close issue (DROP_MEMBERSHIP & netlink + channel). This is a old pending 'bug', not arming at all + but just frustrating to see again and again this log message : + + "cant do IP_DROP_MEMBERSHIP errno=Bad file descriptor (9)" + + What the hell ! it was due to a double close during reload & + stop procedure. VRRP fd are stored in a socket pool and use + the I/O MUX to handle VRRP traffic. While reloading or stopping + the daemon the I/O MUX was released first and secondly socket + pool. The issue spotted here, in thread_destroy_master() all + pending thread are canceled and read/write fds related are + close(). Well OK a close on a mcast socket perform kernel side + the DROP_MEMBERSHIP when needed, but it is much more clean to + perform proper operations userspace ! This patch sequencely + cancel pending thread, release socket pool and finally + destroy master thread. Same 'issue' appear in netlink channel. + +2014-02-08 Alexandre Cassen + * keepalived-1.2.12 released. + * lib: Fix reallocation issue introduced in last merge. + +2014-01-28 Alexandre Cassen + * keepalived-1.2.11 released. + * ipvs: make nlerr2syserr libnl dependent. nlerr2syserr() + is only used when libnl is present... simply reflect this in + libipvs. + * Fix libnl/libnl-3 logic in configure script. + This patch causes the configure script to prefer libnl-3 over + libnl(1). The configure script will first check for libnl-3 and + libnl-genl-3. If both are found, use them. If not, check for + libnl(1). This is useful when building on systems that have both + libnl-3 and libnl(1) installed. It also fixes some redundant + libraries in LIBS. + * libipvs: libnl-3 include fix. + * lib: extend command lib string parser. + Extend cmd_make_strvec to support quoted string as a single slot + and commented string at the end of parsed string. + * lib: cosmetics at command.c. + Extend command framework to support logger and remove some dead + code. some cosmetics too. + * lib: extend vty to support logger. + * autoconf: better libnl3 detection. + * Fix memory allocation in parser. The set_value function was + incorrectly using sizeof (char *) when allocation and reallocating + memory. + * Fix memory allocation for MD5 digest. + The vrrp_in_chk_ipsecah and vrrp_build_ipsecah functions were + incorrectly using sizeof (unsigned char *) when allocating memory + for the MD5 digest. + * Fix memory leak in vty_read_config. If vty_use_backup_config + returns NULL, free any memory that has been allocated before + returning. + * Fix memory leak in check_include. The check_include function + should always free the allocated strvec. + * Check content length before allocating memory. + Since extract_content_length should return 0 if CONTENT_LENGTH is + not found in the buffer, this check should be done before + allocating memory. This avoids unnecessary malloc/free calls and + fixes a potential memory leak. + * Free memory if realloc fails in vty_out. If realloc returns NULL, + free the original memory before returning. + * Remove redundant close from vty_use_backup_config. The sav file + descriptor is closed after read, so there is no need to close it + again is chmod operation fails. + * Remove unnecessary netlink rtattr structures. + Both netlink_link_setmode and netlink_link_add_vmac have rtattr + structures that are no needed. The addattr_l function will handle + adding the rtattr to the message. Also, this patch removes + incorrect void pointer arithmetic when setting rta_len. + * vrrp: dont try to leave mcast group in unicast mode. + * vrrp: Release and refresh properly fd hash index. + Rehashing into the same loop as releasing is not really the best + idea... Reworked a little previous patch to properly release hash + entries related to the same instance and then hash it back on new + fd. + * vrrp: use configuration mcast group for leave message. + * vrrp: dont try to load ip_vs module when not needed. + +2014-01-02 Alexandre Cassen + * keepalived-1.2.10 released. + * Jonas Johansson removed unused option character in getopt + optstring. + * vrrp: disable TTL sanity check for unicast use-case. + In order to protect against any packet injection, VRRP provides + sanity check over IP header TTL. This TTL MUST be equal to + 255 and means both sender and receiver are attached on the same + ethernet segment. Now with unicast extension this protection MUST + be disabled since VRRP adverts will mostly traverse different + network segments. + !!! WARNING !!! When using VRRP in unicast use-case in order to + protect against any packet injection the best practice is to use + IPSEC-AH auth method otherwise you are exposed to potential + attackers ! + * Christian Albrecht fixed minor typo in man page + * Pim van den Berg work on libipvs-2.6 to sync with libipvs from + ipvsadm 1.27 + * Pim van den Berg work add support to libnk >= 3. This address + following considerations : + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=688164 + http://article.gmane.org/gmane.linux.keepalived.devel/3522 + * Pim van den Berg extended libipvs adding nlerr2syserr function + to translate libnl 3 errors to sys errors. In libnl 3 the return + codes have changed. nlerr2syserr translates the libnl 3 errors to + sys errors. + * ipvs: if libnl-3 is installed then check for libnl-gen-3. It is + mandatory to use generic netlink facilities in new libipvs. This + test is just here to ensure every needed libs are installed ! + * Frank Baalbergen (I suppose github frankbb is you ?) fix + http checker. literal ipv6 addresses should be enclosed by + brackets. + * vrrp: Frank Baalbergen add check on IFA_F_NODAD support. + * vrrp: fix unicast handling address selection. SjonHortensius + reported issue while testing unicast_peer. It wouldn't work + without adding the native_ipv6 flag. Removed this dependency ! + since it not correlated with VRRP protocol version used. + * vrrp: extend ip parser to support default and default6. + When you are using virtual_routes you may want to use default + or default6 while configuring routes. Extended parser + accordingly ! + * vrrp: take care of label while comparing IP addresses. + Label was not taken into account while comparing 2 IP + addresses, this can lead to a non deletion while stopping + daemon and some configuration changes have been done while + deamon running. This issue was reported by Stepan Rogov. + * vrrp: fix/extend gratuitous ARP handling. + multiple people reported issues where MASTER didnt recover + properly after outage due to no gratuitous ARP sent. VRRP + is a protocol designed to be used between node plugged on + the same layer2 in order to guarantee link failure is directly + linked to a protocol FSM handling (FAULT transition). With + current virtualization env quite every think can be virtualized + from host (VM) to network (vswitch). In some cases those + virtualized env offer a virtualized layer2 on which VRRP is + plugged and sometime forwarding or routing over this virtual + path can be broken. + I extended gratuitous ARP handling in 2 ways : + 1) When a MASTER receive a higher prio advert it sends a last + advert before transiting to BACKUP state. The immediate + effect at remote MASTER side is to sollicite a gratuitous + ARP broadcast. + 2) Add an optional support to periodic gratuitous ARP sending + while in MASTER state. By default it is disabled but one + can activate this feature by configuring keyword + "garp_master_refresh" in seconds in vrrp_instance block + (refer to keepalived.conf.SYNOPSIS). + * Frank Baalbergen fixed genhash. genhash can throw a + segmentation fault when not providing an argument + * Frank Baalbergen extended genhash code to support IPv6 + * Frank Baalbergen extended genhash code to make url default + value /, same as curl/wget + * Frank Baalbergen extended genhash code to only use default + url when url is empty + * vrrp: Create configuration alias for unicast_src_ip keyword. + Add a new keyword more generic to specify VRRP packet source + IP address. This new keyword is "unicast_src_ip" and have + exactly the same scope as "mcast_src_ip". + * vrrp: unicast_peer addresses and VRRP instance MUST be of + the same family. VRRP low-level framework create socket + pool based on VRRP instance family. If you are using + unicast_peer, it is mandatory to use addresses of same family + as VRRP instance. You cant mix IPv4 and IPv6 addresses inside + same unicast_peer block. If you need to make it that way, you + MUST create a VRRP instance per family, eg: one with native_ipv6 + for v6 unicast_peer and another for v4 unicast_peer. + * vrrp: extended unicast code to support IPv6 unicast_src_ip. + Add support to unicast IPv6 address for + {unicast,mcast}_src_ip keyword. vrrp instance saddr is now a + sockaddr_storage and src IPv6 address is set using cmsg ancillary + data pktinfo. TSource IP address selection is now generic and + can be IPv4 or IPv6. + * vrrp: fix vrrp socket sync while leaving FAULT state. + Well, this is a very, VERY old bug here. while leaving FAULT + state VRRP framework refresh instance socket fd_in & fd_out + and synchronize all VRRP instance bound to the same socket. + The patch refresh socket, it also refresh fd hashing ! which + better for later fault handling :) + * vrrp: Frank Baalbergen fix log-facility handling. log-facility + should be a required_argument + * vrrp: Support xmit VRRP packets from base VMAC interface. + Here is a merge of patch from Oliver Smith. Thanks for your + job and idea in here Oliver. Comments from Olivier : + + This provides a new option to use in conjunction with the VMAC + functionality which will result in VRRP advertisements being + sent and received over the underlying interface (and therefore + having the source MAC of that interface rather than the VMAC + device). + + With this new functionality enabled, VRRP messages will not + affect the switch MAC address table since the non-unique VMAC + address is now used only for sending a gratuitous ARP, thereby + ensuring that in conditions of VRRP message loss, a probing + partner will not inadvertently take over traffic. + + This also resolves issues where VRRP messages are not + successfully being seen on the VMAC interface as with the + new option, the underlying interface is also used to listen out + for VRRP messages. + * getopt: Make some arguments required + * vrrp: Frank Baalbergen add default case in getopt_long. + when starting keepalived with an option without an argument + that requires an argument keepalived should not be started. + * vrrp: VMAC code cleanup and extensions. + Remastered VMAC code. Interface base_ifindex is set by default + to interface ifindex during netlink probe. VMAC interface + base_ifindex is now set during VMAC allocation uppon success + interface creation. Detect if virtual_router_id is declared + after use_mvac keyword is invoked. Add some more log while + setting up and removing VMAC interface. + * vrrp: IPv4 & IPv6 multicast group tweaking. + Meno Abels extended vrrp framework to support customized + multicast addresses. The address could be set for ipv4 and + ipv6 in the global_defs config section using the keywords + vrrp_mcast_group4 and vrrp_mcast_group6. + + There are some stupid switches which does a special processing + to 224.0.0.0/8 multicast packets which causes packets drop from + queue overflows in environments which creates 100 and more + multicast control plane packets a second. + +2013-11-10 Alexandre Cassen + * keepalived-1.2.9 released. + * Alexey Andriyanov fixed inaccuracy in VS_ISEQ macro. + * Alexey Andriyanov fixed hysteresis which could be >= quorum now. + * Alexey Andriyanov extended checker framework so that status_code + and digest can be set together. + * Alexey Andriyanov extended/fixed checker framework for better + SIGHUP support. + * Jonas Johansson fixed VRRP sync group by sending prio 0 when + entering FAULT state. This fix will send prio 0 (VRRP_PRIO_STOP) + when the VRRP router transists from MASTER to FAULT state. This + will make a sync group leave the MASTER state more quickly by + notifying the backup router(s) instead of having them to wait + for time out. + * Jonas Johansson extended VRRP VMAC interface flags (up/down + status) to follow base interface. When using a VMAC interface, + this fix will reflect the base interface flags, i.e. up/down + status, to the VMAC interface. This is useful when using sync + groups (in combination with VMAC) and a link for one of the + members in the MASTER sync group goes down. Before this fix, + this member will not detect the link fault, due to that the + VMAC interface always is UP regardless of the actual status of + the base interface, and the sync group will continue to be + MASTER as if nothing has happend. This fix will however reflect + the status of the base interface onto the VMAC interface, so if + the link goes down the member will transit to FAULT state, which + will make the sync group transit to BACKUP state. + * Jonas Johansson fixed VRRP wrong interface flags corner case. + If a link event arrives between the initial scanning for + interfaces and configuration file parsing, the VRRP instance + will enter an unrecoverable state. This fix will update the + interface flags even when the interface exists, not only for + the inital scan. Note that when all is up and running the link + events will be properly handled by netlink, so this fix only + fixes the special case when a link changes state during + initalization/configuration. + * Jonas Johansson fixed VRRP to honor preempt_delay setting on + startup. If the preempt_delay is set we cannot yet transition + to master state. We must await the timeout of our preempt_delay. + The preemption delay is used when starting up, or rebooting, a + node which needs time to sort out its routing table (e.g., BGP + or OSPF) before it can assume the master role. + * Jonas Johansson extended VRRP code for faster sync group + transition. + * Jonas Johansson replaced popt with getopt. In a embedded + environment you might not want to have to add yet another + library dependency. This commit refactors parse_cmdline() to + use getopt_long() instead och popt. + * EyckWigo proposed to increase defaut socket buf size to handle + env with lot of IP addresses, Default is now set to 64K on netlink + socket. + * Guðmundur Bjarni Ólafsson fixed VRRP unicast code to allow + packet to be routed ! + * Guðmundur Bjarni Ólafsson fixed VRRP checksum before computation. + When running in unicast mode with multiple peers, the checksum + was being calculated into itself for consequent peers, causing + incorrect checksums. + * Extended VRRP framework tweaking IPv6 VIP install by disabling + DAD algo and setting deprecated. + Lot of discussions have been made around those 2 topics. First + idea and initial patch where provided by Leo Baltus. This patch + fix the use case where VRRP VIPv6 are used in conjonction of IPVS + healthchecking. If deprecated flag is not set (which is the default + linux behaviour), then VRRP VIP can be used as source address of + healthcheking packet. Since this VIP address is also present, in + most use-cases, on realserver directly so return packets never reach + the healthchecker and hence no realserver was injected in IPVS table. + At the same time, I decided to merge Tore Anderson suggestion of + disabling Duplicate Address Detection algorithm. Tore's arguments + are nice ! Thanks Tore : Using the nodad flag has the following + benefits: + 1) The address becomes immediately usable after they're configured. + 2) In the case of a temporary layer-2 / split-brain problem we can + avoid that the active VIP transitions into the dadfailed phase + and stays there forever - leaving us without service. HA/VRRP + setups have their own "DAD"-like functionality, so it's not + really needed from the IPv6 stack. + + Acknowledgements to Mark Schouten and Frank Baalbergen for pushing + me by testing this features ! + +2013-09-05 Alexandre Cassen + * keepalived-1.2.8 released. + * Vincent Bernat fixed issue while pinging master agent. + The agent needs to be initialized to be able to change the + AgentX ping interval. + * Revisited the whole code to use posix declaration style. + * fixed some typos + * Created CLI core framework. + * Ryan O'Hara added option to prevent respawn of child process. + This patch adds a command-line option (--dont-respawn, -R) that + will prevent the child processes from respawning. When this + option is specified, if either the checker or vrrp child + processes exit the parent process will raise the SIGTERM signal + and exit. + * Ryan O'Hara removed duplicate command-line option code. + patch removes unnecessary code to process command-line + options. All options can be processed with a single while loop + that calls poptGetNextOpt. This patch also adds code to check + for errors while processing options. Note that errors encountered + while processing command-line options are fatal. + * Ryan O'Hara add support to usage generation by popt. + This patch uses the popt library to describe the command-line + options and print usage to stderr. This provides a more clear, + concise usage statement. + * Ryan O'Hara and I updated keepalived man page. + * Aleksei Ilin add flexible HTTP checker behaviour for HTTP GET + request's port settings. VirtualServer's port being specified + in HTTP GET request only if `VirtualHost` option is not defined, + otherwise used `VirtualHost` option itself. + * Ryan O'Hara fixed pointer arithmetic for VRRP packet. + When using IPSEC AH authentication, the pointer arithmetic used + to get the location of the VRRP packet is incorrect. The address + of the IPSEC header must be cast as (char *) in order to get + correct address of the VRRP packet. Without this patch, + vrrp_in_chk() will fail to verify incoming VRRP packets when + IPSEC AH is enabled. + * Ryan O'Hara fixed issue while loading SSL certificate. + This patch fixes a problem where keepalived will attempt to + load an SSL keyfile as a certificate, resulting in failure to + initialize SSL context. + * Ryan O'Hara refreshed GPLv2 license with last FSF file. + * junpei-yoshino fixed configure.in. Library crypt is needed. + * Boon Ang fixed comparison of primary IP addresses. + If a router in the master state receives an advertisement + with priority equal to the local priority, it must also + compare the primary IP addresses (RFC 3768, section 6.4.3). + The code to handle this was comparing two IP addresses with + different byte-ordering, resulting in multiple routers in + the master state. This patches resolves the problem by + coverting the local primary IP address to network byte order + for the comparison. + * Henrique Mecking fixed memory leak in libipvs + * Robert James Hernandez fixed RETVAL by setting RETVAL for + status instead keeping RETVAL set to default of 0 + * Robert James Hernandez fixed RETVAL by setting RETVAL for + catch all and so that it exits like all other matches in + the case + * Jan Pokorný fixed genhash to ensure CLRF{2} HTML body + separator won't slip. + * Jan Pokorný extended genhash. Generalize the hash algoi + parts, add SHA1. + This patch adds support for hash algo suite extension + with SHA1 being a first one to be available together with + a default MD5. The remaining change on the health-checker + subsystem side is to make analogous modifications and to teach + it to recognize the intended hash algorithm based on the length + of the digest (provided that extra care is taken that no two + algorithms will ever alias in this regard). Also the test + script for genhash was extended to conditionally use SHA1. + * Jan Pokorný cleaned up genhash code. + Access to the hash-specific context was simplified as I've + now checked some C guarantees regarding union/it's members + initial address vs. aligning so now extra inlined accessor + function is needed. This simplified the code a bit. + Also now the hash-specific object is directly pointed to by + SOCK object instead of carrying just the index to the table of + hashes and doing the respective access via a global again and + again. Next, I've concentrated some hash-related declarations + to the new hash.h file. This was mostly motivated by a need to + break the circular include dependency that have arisen. As a + consequence, part of the recent clutter I brought in was removed + again. Most of FEAT_SHA1 conditional compilation is here. + Previously separated table in main carrying the hash IDs to be + printed in the help screen was merged into the table carrying all + the other necessary information about the particular hashes. + * vrrp: Remi Gacogne fixed invalid use of sizeof. + * Pasi Kärkkäinen Add To header for SMTP alerts. + * vrrp: Robert Sander add IPv6 support for virtual_routes and + static_routes. + * Erik de Groot add support to LVS One-Packet Scheduling + (known as OPS). Typically RADIUS traffic comes from a limited + amount of clients and thus you have a very limited range of IP + tuples in action which will never expire. Issue with Keepalived + without this patch is that, although it correctly re-assigns + traffic when a real server dies, it will never re-assign traffic + back to the real server when it is restored. This is because + LVS creates virtual connections, for each IP tuple, that will + never time out as the clients keep sending traffic to the server. + With this patch is is possible to enable OPS for UDP virtual + servers which means LVS does not create virtual connections and + takes a new loadbalancing decision for each UDP packet. The + result is that a restored server now gets RADIUS traffic as + soon as LVS has taken it it back into the server pool. + * Willy Tarreau and Ryan O'Hara add the ability to use VRRP over + unicast. Unicast IP addresses may be specified for each VRRP + instance with the 'unicast_peer' configuration keyword. When + a VRRP instance has one or more unicast IP address defined, + VRRP advertisements will be sent to each of those addresses. + Unicast IP addresses may be either IPv4 or IPv6. + If you are planing to use this option, ensure every ip + addresses present in unicast_peer configuration block do not + belong to the same router/box. Otherwise it will generate + duplicate packet at reception point. + +2012-08-29 Alexandre Cassen + * keepalived-1.2.7 released. + * vrrp: fix issue in while using vrrp_script. + Previous patch introduced by Ryan O'Hara about removing + shadow declaration was kind of too much hunting. + Removing element e in this block simply create inconsitency + in upper list walk. So resurected element declaration with e2. + * snmp: Mikhail Gaydamaka extended MIB and both vrrp and check + frameworkds to support routerId to var bind. + * snmp: Mikhail Gaydamaka fixed oid for vrrpSyncGroupStateChange + var bind. + * some cosmetics again and again. + +2012-08-20 Alexandre Cassen + * keepalived-1.2.6 released. + * Rename global config data variable 'global_data'. + From Ryan O'Hara : + This patch renames the global configuration data + variable from 'data' to 'global_data'. Three reasons for + renaming this varibale: + - Fixes shadow declaration of 'data' in several locations. + - Is more consistent with other global data variables + (ie. vrrp_data, check_data). + - Functions like free_global_data and dump_global_data were + ignoring conf_data_t argument and using global variable + instead. + * Ryan O'Hara: Fix shadow declaration of 'vrrp_data' variable. + * Ryan O'Hara: Fix shadow declaration of 'check_data' variable. + * Ryan O'Hara: Remove shadow declaration of 'element e' in + vrrp_init_state. + * check: Avoid the use of kernel defines in libipvs userland + prototypes. + * vrrp: Correctly handle macvlan interface when config file is + re-loaded. From Bob Gilligan : + Testing with the 1.2.0 branch, bring keepalived up with a + vrrp_instance that is configured with use_vmac. Then delete + that vrrp_instance from the config file. Then tell keepalived + to re-read its config file with SIGHUP. The vrrp_instance will + be stopped, but the macvlan interface will remain. The obvious + fix would be to add code to call netlink_link_del_vmac() in + clear_diff_vrrp(). There's one problem with that: the code + needs the ifindex of the macvlan interface to delete it, but + that resides in the interface structure that was freed earlier + in the reload process. My fix is to add a field to the + vrrp_rt struct to remember the macvlan ifindex. This patch + addresses this problem plus two others that can occur in + reloading the config file: 1) If the vrrp_instance + configuration is kept, but the use_vmac entry is removed, the + macvlan interface will not be deleted; 2) If a vrrp_instance + with use_vmac is left unchanged, the code will attempt to + re-create the macvlan interface, but this will fail and the + program will end up not using the macvlan interface. + * vrrp: VRRP should notify other routers before it does any + action that effects traffic flow. From John Southworth: + Move the shutdown_vrrp_instances code to before the deletion + of sock_pool. Move sending priority 0 adverts to before address + removal occurs + * vrrp: From John Southworth: Stop timers before shutting down + vrrp instances. This is to avoid a possible condition where + a priority 0 advertisement is sent and before the master + thread is killed another advertisement can be generated and sent. + * vrrp: Change when socket fd's are freed. + From John Southworth: + Priority 0 advertisements were not being sent as desired on + config reload. This was causing long delays on manually failed + over instances. The socket pool was being freed too early, as a + result the file descriptor for the socket was no longer valid at + the time the priority 0 advertisment was attempted. + * vrrp: Added a separate timeout parameter for vrrp_script checks + From Jonathan Harden: + I've added a timeout parameter to the vrrp check scripts which + allow you to have the check timeout different to the interval. + When no timeout has been specified the interval is used (which + mimics the current behaviour). To explain the reasoning: We + wanted to have check scripts time out faster than our check + interval. Doing the check we need to perform is a little load + intensive and so we don't want to perform it every few seconds. + With this patch we set an interval of 60 seconds but a timeout + of 5 seconds (if the check takes more than a few seconds then + the service is not working correctly). + * Extended vector lib for futur work + * some cosmetics. + +2012-08-13 Alexandre Cassen + * keepalived-1.2.5 released. + * Merge SNMP support from Vincent Bernat. + * SNMP is not compiled nor activated by default. + * Updated autoconf script + * Created Keepalived MIB + * Integration of NetSNMP into main scheduling loop + * vrrp: Most internal data can be queried with SNMP. + * check: Most internal values can be queried using SNMP. + The main exception is the ability to query checkers + which is not present. + * check: SNMP support for IPVS stats. IPVS stats are + exported with SNMP. A cache is used to avoid to query + the kernel too much. + * Created core framework for SNMP trap + * vrrp: SNMP traps are sent when instance state changes + and when sync group state changes + * check: SNMP traprs are sent when real server state changes + and when virtual server quorum state changes + * vrrp: add support to write/update operations from SNMP. + Write/update support is available for changing the base priority + and for changing instance preemption. + * check: add support to write/update operations from SNMP. + Write support is available for changing the weight of a real + server. + * workaround for AgentX ping blocking Keepalived. When establishing + AgentX session with the master agent, we setup low timeout and + retries values. If the master agent is blocked, we will wait for + less than 1 second for them and therefore, there will be no + disruption for VRRP. + * Copyright update + * some cosmetics. + +2012-07-27 Alexandre Cassen + * keepalived-1.2.4 released. + * Please look at git repo for credits. + * remove CR from manpage + * check: fix pid display in syslog messages + * vrrp: better documentation of the limitation on password + length + * cosmetics to be pleasant with GCC4 + * Update autoconf script to properly detect VRRP VMAC + support + * security: Fix exploitable issue in sighandler ! + * Add datarootdir to Makefile.in files. + * Fix logging to console. + * Remove newlines from log_message calls. + +2012-07-13 Alexandre Cassen + * keepalived-1.2.3 released. + * Please look at git repo for credits. + * VRRP : allow group to use priority with 'global_tracking' + group keyword + * VRRP : Adjust TOS values. The TOS value used by other + vendors is ip precedence 6, so change that. Use socket + priority option to force packets into band 0 of pfifo_fast. + * VRRP : Fix sync-group thrashing.The sync group implementation + was not very robust. If one synced instance lost communication + without going to fault state then all synced intances would + transition to master. Following this all instances would + transition back to backup because they heard higher priority + advertisements. This thrashing would continue indefinitely. + To fix this the sync-group code was made to prefer backup state. + That is, the sync-groups don't sync to master state unless + every instance wants to be master. + * VRRP : Fix dst lladdr in IPv6 Unsollicited NA. + * VRRP : fix pid display in syslog messages. + * Fix configure script to correctly identify kernel version. + * check : handle unspecified sockaddr_storage when comparing + * VRRP : ensure VRRP script interval and GARP delay is not 0. + * check: ensure non 0 default values for timeouts. + * VRRP : Fix priority not changing on reload. + * check : Fix IPv4 address comparison routine. + * Don't use bind() with AF_UNSPEC. + * check : enable the use of fwmark with IPv6 virtual servers. + * Fix modprobe arguments. + * Fix double ntohs() in SMTP checker. + * Pretty-print IP:port as [%s]:%d. + * check : keep retry in case of early TCP failures in checks. + * when specifying an IPv6 range, range is hexadecimal value. + * Only define kernel types for ip_vs.h header to avoid problems + when loading other headers. + * When respawning VRRP or check process, use LOG_ALERT. + * Do not set reload flag in the main process. + * Set correct rights on PID file. + * fix 'gratuitous' typos. + * ipvs: don't include linux/types.h or asm/types.h. + * configure: check for nl_socket_modify_cb for libnl. + * configure: don't check for IPVS support with kernel 2.6.x. + * VRRP : On shutdown, release sockets later to be able to send + shutdown packet. + * fix documentation on linkbeat_use_polling keyword. + * Fix a typo for healthchecker. + * fix syslog message if bogous vrrp packet (wrong auth type) + received. + * manpage update. + +2011-01-09 Alexandre Cassen + * keepalived-1.2.2 released. + * IPv6 : extended autoconf script to support libnl detection. + IPv6 IPVS kernel subsystem is reachable through + generic netlink configuration interface. + * IPv6 : Enhanced libipvs-2.6 to support generic netlink + configuration interface. If generic netlink is + available with kernel then it will be the + prefered path to configure IPVS. + * IPv6 : Enhanced the whole checker API to use + sockaddr_storage. + * IPv6 : Enhanced the whole core framework to use + sockaddr_storage. + * IPv6 : Enhanced all checkers to use sockaddr_storage. + * fixed a long time pending issue in all checkers. If + first connection attempt to remote peer was failing + no more check was performed to service... Up on error + connecting remote peer simply register a new timer for + next check. This is specially needed in IPv6 context + where a unreachable host can be reached at delayed time. + * code clean-up: revisited the code to use more POSIX + compliant declaration. thread typedef to use thread_t + instead. revisisted checker framework to use POSIX typdef + declaration. + +2010-12-08 Alexandre Cassen + * keepalived-1.2.1 released. + * Vincent Bernat luffy.cx>: + VRRP: Fix incorrect computation for packet size + * Vincent Bernat luffy.cx>: + VRRP: handle passwords up to 8 characters + * Vincent Bernat luffy.cx>: + When updating weight, check quorum state. + MISC check can update the weight of a real server. This + can lead to a change in quorum state. + We factor out quorum handling from perform_svr_state() + into a new function update_quorum_state() that will check if + the quorum state changed and if yes, update sorry server status, + exec quorum commands and add back or remove alive real servers + (with existing function perform_quorum_state()). + This patch is mostly cut'n'paste and adding a call to + update_quorum_state() in update_svr_wgt(). We also make + perform_svr_state() and update_quorum_state() almost symmetric. + * Vincent Bernat luffy.cx>: + Fix an infinite loop in master transition with sync groups. + This patch is from Arjan Filius. See: + http://marc.info/?l=keepalived-devel&m=128212278218825&w=2 + When transitioning to master state, keepalived might try to + force transition to master state of other VRRP instances into + the same group before their transition is complete. This leads + to an infinite loop with huge VRRP trafic. + * Vincent Bernat luffy.cx>: + VRRP : Use VRRP_PRIO_DFL instead of 100 for default priority. + * Vincent Bernat luffy.cx>: + Use netpacket/packet.h instead of linux/if_packet.h to get + sockaddr_ll. + linux/if_packet.h pulls linux/types.h that should not be used + by a userland program since types defined here can conflict + with stdint.h. We use netpacket/packet.h which is a GNU LibC + header. + * Vincent Bernat luffy.cx>: + Keep current weight on reload when initial weight is not + altered. + Weight can be changed by MISC_CHECK when using dynamic option. + In case of reload, the change is lost until the script runs + again. We record the initial weight in a separate variable and + use it to check if a real server has changed instead of using + the actual weight. + * Vincent Bernat luffy.cx>: + VRRP : disabled scripts and initially good scripts should be + considered as OK. + When a script is not weighted, its failure will lead to a + failure of the associated VRRP instance. However, disabled + script and scripts that are initially good (after a reload) + should be considered as successful and not make the instance + fail. Moreover, a disabled script should not be used when + computing script weights. + * Vincent Bernat luffy.cx>: + VRRP : more informative message when disabling a script due + to use of weights. + When using a weight for a tracked script, the script is + disabled. However, the warning message said that the weight + was ignored. We change the message to tell that the script is + ignored. Moreover, we don't change its weight since it can be + used in another instance, not in a SYNC group. + * Vincent Bernat luffy.cx>: + check : include missing virtual server group name in a log + message + * Vincent Bernat luffy.cx>: + configure: add a check for ETHERTYPE_IPV6. + ETHERTYPE_IPV6 defined in net/ethernet.h is pretty recent. + If absent, we hard-code the value into CFLAGS. This patch + requires regeneration of configure. + * Vincent Bernat luffy.cx>: + check : update server weight in IPVS only if server is alive + and in the pool. + With inhibit_on_failure, a server can be in the pool and not + alive. We don't want to set the weight of an inhibited server + or a server in a virtual server whose qorum is not met yet. + * Vincent Bernat luffy.cx>: + check: really add back inhibited server when quorum is gained + A previous change contained an erroneous check to add back + alive servers when quorum state was gained. This check was + incompatible with inhibit_on_failure. When servers were added + back in the pool, the weight was not updated accordingly. + * Vincent Bernat luffy.cx>: + check : update server weight despite quorum when no sorry + server. + In absence of a sorry server, the logic is to not use quorum + except to run commands when quorum is gained or lost. This + means that if a MISC check modifies the weight of a server + and there is no sorry server, we do not consider quorum. + +2010-05-31 Alexandre Cassen + * Branch 1.2.0 created. This branch will host all new + developments on Keepalived. New code will be added + in here only. + * VRRP : Add support to IPv6 protocol. The global framework + has been extended to support this branch new family ! + * VRRP : Implement IPv6 Neighbour Discovery protocol (NDISC). + In IPv6 gratuitous ARP doesnt exist since ARP is IPv4 only. + NDISC can provide the same feature by sending so called + Unsolicited Neighbour Advertisement. A node can send such a + protocol datagram in order to (unreliable) propagate new + information quickly (rfc4861.4.4). NDISC build an ICMPv6 + message with taget link-layer address option, this option is + set icmp6_override flag to indicate that advertisement should + override an existing cache entry and update the cached + link-layer. + * VRRP : Extend ip address framework to be IPv4 and IPv6 + independant. An ip address, as defined in framework, is + now {IPv4,broadcast} or {IPv6}. Use struct ifaddrmsg to + store and prepare netlink related operation. This clean- + -up the code. + * VRRP : Extend parser to support IPv6 declarations. IPv6 + and IPv4 addresses can be configured inside the same + configuration block (eg: virtual_ipaddress or + virtual_ipaddress_excluded). An instance can run IPv4 and + IPv6 addresses at a time, this can be useful in dual-stack + env (since this will become certainly the most common use + case in the next years). + * VRRP : Extend netlink framwork to support IPv6 addresses + interactions (reflection/addition/deletion). + * VRRP : Extend finite state machine support IPv4 & IPv6 + at a time. + * VRRP : Extend protocol helpers to support IPv6 multicast + related. AF_INET6 SOCK_RAW tweaking it done through + socket API instead of PF_PACKET header building... This + makes code cleaner. + * VRRP : Set default VRRP instance protocol to be IPv4. + you can use configuration keyword "native_ipv6" inside + vrrp_instance configuration block to specify that you + want to use IPv6 for VRRP multicasting protocol instead. + * VRRP : Extend socket option related helpers to support + IPv6 specifics. + * VRRP : Extend protocol scheduler and dispatcher to + support IPv6. + * VRRP : Extend socket pool to keep track of socket + family. + * VRRP : Cleanup protocol offset pointer by removing + duplication code... + * VRRP : some code clean-up... + +2010-05-06 Alexandre Cassen + * keepalived-1.1.20 released. + * Vincent Bernat luffy.cx> extended ip/route + framework to be able to add route or ip address if they + already exist. + * Vincent Bernat luffy.cx> fixed broadcast + address display. + * Vincent Bernat luffy.cx> extended genhash to + display an error when giving an incorrect IP address. + * Vincent Bernat luffy.cx>: When parsing + "blackhole" route, also parse IP mask. + * Vincent Bernat luffy.cx>: + On reload, destroy signal pipes before recreating them. + * Vincent Bernat luffy.cx>: + Fix SMTP checker adding himself repeatedly in the list of + failed checkers. + * Vincent Bernat luffy.cx>: + Handle non-existant default interface in VIP definition. + * Vincent Bernat luffy.cx>: + Remove alive real servers when quorum is lost. + * Vincent Bernat luffy.cx>: + Fix a segfault when a virtual_server is empty. + * Vincent Bernat luffy.cx>: + Add real servers to new member of a virtual server group + on reload. + * Vincent Bernat luffy.cx>: + Keep previous effective VRRP priority on reload. + * Vincent Bernat luffy.cx>: + Fix VRRP script not running any more after reload. + * Vincent Bernat luffy.cx>: + On reload, keep status for all VRRP scripts. + * Removed IPVS Kernel 2.2 support + +2009-10-01 Alexandre Cassen + * keepalived-1.1.19 released. + * Cosmetics changes. + * Vincent Bernat luffy.cx> fix a segfault + when there is no real server for a virtual server. + * Vincent Bernat luffy.cx>, Willy Tarreau + and I finally fixed SIGCHLD handling upon reload. + * Vincent Bernat luffy.cx> fix VS_ISEQ macro. + * VRRP : Kimitoshi Takahashi clustcom.com> + fixed nopreempt from FAULT state. The owner of higher + priority in FAULT state shouldn't preempt current MASTER + when it's recovering, if the nopreempt option is set. + +2009-09-24 Alexandre Cassen + * keepalived-1.1.18 released. + * Fixed compilation warnings + * Updated autoconf kernel version detection. Created a new + configuration option to force kernel versioni selection. + This option can be useful for crosscompilation: + --with-kernel-version={2.2|2.4|2.6} + * Updated media link failure detection strategy. Kernel + linkwatch has been around for long time so set it as + default strategy. Alternatively you can choose to use + MII BSMR polling strategy by adding new keyword + 'linkbeat_use_polling' in your configuration file. + * Vincent Bernat luffy.cx> fixed ip_vs.h includes. + * Removed vrrp_running and check_running test since it is + already performed by keepalived_running. + * Properly handle father pidfile handling. + * fixed reload handler to properly print out PID. + * Willy and I fixed a signal handling issue while reloading + daemon. A dereferencing master thread issue leading to a + segfault, so that reload was seen as a restart because it + was respawned by keepalived father process. + * Willy fixed a missing UNSET_RELOAD declaration leading to + a potential infinite loop while performing reload. + * Vincent Bernat luffy.cx> fixed initial value + of quorum state on startup and reload. Fixed sorry server + removal to consider quorum state. + * VRRP : Add missing notify calls while entering FAULT state. + * VRRP : Willy added support to delayed script check launch + (up and down). It defines "rise" and "fall" keywords. "fall" + defines the required number of failures to switch in KO mode, + "rise" defines the number of sucesses to switch in OK mode. + * VRRP : Fixed an IP_DROP_MEMBERSHIP issue while performing + reload. vrrp socket pool is released at first. + +2009-03-05 Alexandre Cassen + * keepalived-1.1.17 released. + * Fixed low-level scheduler timer computation to take care to + monothonic computation. Select returns if timer is null! + * VRRP : Fixed vrrp script initialization to use event thread + instead of timer thread so that script no longer need to + wait until first polling timer fired. + * VRRP : Willy and I fixed MII media link failure detection + to test SIOCGMIIREG call before fetching BMSR. + * VRRP : Resurected VRRP_STATE_GOTO_FAULT. This state is + really needed to speed-up convergence and prevent against + any issue while using vrrp_sync_group. + +2009-02-15 Alexandre Cassen + * keepalived-1.1.16 released. + * Code clean-up. + * Stefan Rompf, extended scheduler to + synchronize signal handling by sending the signal number through + a self pipe, making signals select()able. Child reaping has been + moved to a simple signal synchronous signal handler. Signal + shutdown handling has been centralized. + * Denis Ovsienko, extended healthchecker + framework to support alpha/omega design. It provides virtual + service control in a more fine-graned maner. You may have a + look to the SYNOPSIS file to have full picture on configation. + It addresses the following issues : + - A virtual service is considered up even with an empty RS pool. + - There is no reliable mean to avoid service regression, when + the server pool becomes too small. + - There is no mean to escalate any of the above fault/recovery + events. + - Real servers are assumed alive initially. This leads to + unnecessary state flap on keepalived start. + - notify_down isn't executed for working real servers on + keepalived shutdown. + - There is no reliable mean to handle keepalived stop to move + the virtual service over another load balancer. + * Stephan Mayr, fixed default value for + checker loop... a missing TIMER_HZ. + * Merge keepalived.init.suse. + * Robin Garner, added support to + --log-console facility. + * Tobias Klausmann, fixed an openfile + leak while performing reload. + * Leo Baltus, extended pidfile handling + to allow keepalived to start using configurated pidfile. + * VRRP : Siim Poder, fixed IPSEC AH auth + to skip IPv4 id field of zero. If zeroed kernel will fill it + and lead to an unwanted protocol re-election. + * VRRP : Siim Poder, fixed reloading issue. + New ip addresses are added (from configuration). State is kept + instead of starting from whatever is in configuration file. + If prios are changed in such a way, state change can occur after + reload. + * VRRP : Vincent Bernat, extended virtual_route + to support virtual "black hole" route as well as multihop route. + * VRRP : Stig Thormodsrud, fixed a crash while + using virtual_router_id set to 255. + * VRRP: Jon DeVree, fixed arp handling to + to initialize the target hardware address, using 0xff as found + in arping. Let scripts work without dealing with weight, if the + script fails, VRRP fails. + * VRRP : Pierre-Yves Ritschard, removed + the GOTO_FAULT state from FSM. + * VRRP : Willy Tarreau, fixed link detection handling + to support right ioctl values for recent kernel ! It can lead + to issue while running instance on a bonding interface. + * VRRP : Willy Tarreau, extended scheduler to catch + time drift. It implements an internal monotonic clock. It + maintains an offset between sysclock and monotonic clock, if + computed time if anterior to monotonic time then just update + offset. If time computed if fare away into the future then + limit delay and recompute offset. + * VRRP : Willy Tarreau, fixed autoconf issues. + +2007-09-15 Alexandre Cassen + * keepalived-1.1.15 released. + * Matthias Saou, fixed genhash + Makefile for man page installation. + * Casey Zacek, provided a patch + to check_http to remove buffer minimization while processing + stream. It appears some webserver cause healthchecker crash. + * Chris Marchesi, provided + a patch for better handling of SSL handshake errors. + * Shinji Tanaka, fixed parser "include" + directive to support declaration inside configuration directives, + like including file inside vrrp_instance declaration. + * Andreas Kotes, fixed HTTP healthchecker + while handling MD5SUM result. It appears checker never removed + realserver on MD5SUM mismatch !!! whats that crap. + * VRRP : Willy Tarreau, fixed a missing notifications + upon transition from fault to backup. + * VRRP : Add support to route metric in virtual_routes definition. + +2007-09-13 Alexandre Cassen + * keepalived-1.1.14 released. + * Shinji Tanaka, extended parsing + framework to support "include" directives. For more + informations and documentation please refer to Shinji + website : + http://misccs.dyndns.org/index.php?keepalived%20include%20patch + * Tobias Klausmann, add error loggin + while parsing configuration file. + * Merged patches from rpmforge.net on Makefile and redhat specfile. + * Create a goodies directory to store nice scripts received from + users. Add Steve Milton (milton AT isomedia.com) arpreset script + to delete a single ARP entry from a CISCO router. + * VRRP : David Woodhouse, fixed vrrp_arp + includes. + * VRRP : Pierre-Yves Ritschard, fixed negative + weights in script. + * VRRP : Michael Smith, extended + virtual_ipaddress setting to support Old-style Linux interface + aliases like eth0:1. + * VRRP : Ward Wouts, add support to + vrrp_script logging. + +2006-10-11 Alexandre Cassen + * keepalived-1.1.13 released. + * VRRP : Added a new notify script to be launch during vrrp + instances shutdown. This new notify hook is configured + using notify_stop keyword inside vrrp_instance block. + * VRRP : Willy Tarreau fixed an errno issue in + thread_fetch(), errno is lost during set_time_now(). This + patch saves it across the call to set_time_now() in order + to get the valid error. + * VRRP : Willy Tarreau extended timer framework + to save errno in timer_now() and set_time_now() just in + case other functions do not expect these functions to modify + it. This is a safer approach than the initial patch to + thread_fetch(), while still compatible. + * VRRP : Willy Tarreau fixed an FSM silent issue. + By default, the VRRP daemon stops sending during new MASTER + elections. This causes 3 to 4 seconds of silence depending on + the local priority, and sometimes causes flapping when the + differences in priorities are very low, due to the kernel timer's + resolution : sometimes, the old master receives a first + advertisement, enters backup, waits 3 seconds, sees nothing and + finally becomes master again, which forces a new reelection on + the other one. + * VRRP : Willy Tarreau extended VRRP framework to + support floating priority. Replace the priority in each + vrrp_instance with a base priority and an effective priority, + to prepare the support for floating priorities. The configuration + sets the base_priority, and all comparisons use the new + effective_priority value. This one is computed in the + vrrp_update_priority() thread by adding an offset to base_priority, + based on the result of various checks. + * VRRP : Willy Tarreau extended notify script to add + the priority in "$4" when calling a notify script. This is + important in labs and datacenters when systems can display the + priority on a front LCD, because it allows workers to carefully + operate without causing unexpected reelections. + * VRRP : Willy Tarreau extended interface tracking + framework to let interface tracking change the priority by adding + a "weight" parameter. If the weight is positive, it will be added + to the priority when the interface is UP. If the weight is negative, + it will be subtracted from the priority when the interface is down. + If the weight is zero (default), a down interface will switch the + instance to the FAULT state. + * VRRP : Willy Tarreau added a new "vrrp_script" section + to monitor local processes or do any type of local processing to + decide whether the machine is in good enough health to be elected + as master. A same script will be run once for all instances which + monitor it. If no instance use it, it will not be run, so that it's + safe to declare a lot of useful scripts. A weight is associated to + the script result. If the weight is positive, it will be added to + the priority when the result is OK (exit 0). If the weight is + negative, it will be subtracted from the priority when the result + is KO (exit != 0). If the weight is zero, the script will not be + monitored. The default value is 2. + * VRRP : Willy Tarreau extended vrrp scheduler so that + when a VRRP is part of a SYNC group, it must not use floating + priorities, otherwise this may lead to infinite re-election after + every advertisement because some VRRPs will announce higher prios + than the peer, while others will announce lower prios. The solution + is to set all weights to 0 to enable standard interface tracking, + and to disable the update prio thread if VRRP SYNC is enabled on a + VRRP. + * VRRP : Willy Tarreau added some documentation and + examples for the brand new VRRP tracking mechanisms. + * VRRP : Ranko Zivojnovic, fixed vrrp + scheduler to execute notify* scripts in transition from the + failed state to the backup state. + * Nick Couchman, , added support for + real server upper and lower thresholds. This allows you to set + a minimum and maximum number of connections to each real server + using the "uthreshold" (maximum) and "lthreshold" (minimum) + options in the real_server section of the configuration file. + * Chris Caputo, extended autoconf script + to support recent move of UTS_RELEASE from linux/version.h to + linux/utsrelease.h. + * Chris Caputo, extended ipvswrapper 2.4 + code to support misc_dynamic weight. + +2006-03-09 Alexandre Cassen + * keepalived-1.1.12 released. + * VRRP : Christophe Varoqui, extended + VRRP framework to use virtual_router_id as syncid in LVS mcast + datagram while using LVS syncd in VRRP instance. + * Kevin Lindsay, and Christophe Varoqui, + fixed SSL checker to properly + use openssl when dealing with asynchronous stream handling. + Kevin fixed asynchronous handling during connection stage + while Christophe fixed stream handling after connection stage. + * Kjetil Torgrim Homme, extended keepalived + spec file to cleanly compile on RedHat enterprise 3 and 4. + * Heinz Knutzen, fixed SMTP checker + to overwrite default_host while parsing configuration file. + A SMTP_CHECK without a "host" section should use the ip of the + current real server as default. + +2005-03-01 Alexandre Cassen + * keepalived-1.1.11 released. + * Asier Llano Palacios, extended + autoconf script to support cross-compilation. + * Kevin Lindsay, and I fixed a + missing bitwise negation while removing signal from + global signal mask. Set this operation before handler + is called. This assume that bitwise negation is an + atomic code generated from compiler. Since gcc 3.3 + this is true. + * VRRP : extended ipaddress and iproutes code to return + if vip or vroutes is referencing an unknown interface. + +2005-02-15 Alexandre Cassen + * keepalived-1.1.10 released. + * VRRP : While restoring interface, release iproutes + before ipaddresses. Routing daemons needs that order + for netlink reflection channel. + * VRRP : Bin Guo, fixed a memory + leak while calling script_open. + * Kevin Lindsay, fixed some buffer + overruns, NULL pointer and dangling pointer references. + * Kevin Lindsay, redisigned signal + handling. When a signal occurs, a global signal_mask is + modified. In the main loop there is a checked to see if + the signal_mask has any pending signals. The appropriate + signal handler is then run at this time. This is to prevent + races when modifying linked lists. + * Kevin Lindsay, fixed shadowed + declarations. + * Christophe Varoqui, and I + Extended libipvs-2.6 to support syncd zombies handling. + Since ip_vs_sync.c kernel code no longer handle waitpid() + we fork a child before any ipvs syncd operation in order + to workaround zombies generation. + * John Ferlito, and I Fixed a scheduling + race condition while working with low timers. + * Updated check_http and check_ssl to use non-blocking + socket. + * Fixed some race conditions while reloading configuration. + Prevent against list gardening if list is empty ! + * Fixed recursive configuration parsing function to be clean + with stack. Only one recursion level. + * Some cosmetics cleanup in Makefiles. + +2005-02-07 Alexandre Cassen + * keepalived-1.1.9 released. + * VRRP : Chris Caputo, updated keepalived manpage + for nopreempt and preempt_delay. + * VRRP : Fixed an issue while releasing vrrp socket pool... Just + release pool one time ! + * VRRP : Fixed netlink framework to properly save netlink socket flags + while setting blocking flags. + * VRRP : Fixed a regression introduced with previous release while + hashing vrrp fd bucket into fd hash index. + * Patrick Boutilier, fixed an issue in the + extract_html function. Read the full html header. + * Chris Caputo, and I fixed compilation issue + while using --enable-debug configuration option. + * Extended both VRRP and Healthchecker framework to support + debugging flags. + * Removed the watchdog framework. Since scheduling framework + support child, we register a child thread for both process + VRRP & Healthcheck. When child die or stop prematuraly this + launch scheduling callback previously registered. Watchdog + is now handled by signaling. + (credit goes to Kevin Lindsay, for nice + idea). + * Some cosmetics cleanup. + +2005-01-25 Alexandre Cassen + * keepalived-1.1.8 released. + * VRRP : Chris Caputo, added "dont_track_primary" + vrrp_instance keyword which tells keepalived to ignore VRRP + interface faults. Can be useful on setup where two routers + are connected directly to each other on the interface used + for VRRP. Without this feature the link down caused + by one router crashing would also inspire the other router to lose + (or not gain) MASTER state, since it was also tracking link status. + * VRRP : Chris Caputo, added "nopreempt" which + overrides the VRRP RFC preemption default. This replaces the + "preempt" keyword which was not fully implemented. "preempt" is + kept around for backward compatibility but is deprecated. + * VRRP : Chris Caputo, added "preempt_delay" which + allows one to specify number of seconds after startup until VRRP + preemption. (range 0 to 1,000 seconds) this is useful because + sometimes when a machine recovers it takes a while for it to become + usable, such as when it is a router and BGP sessions need to come + back up. + * Chris Caputo, made it so there is a useful "Date:" + in SMTP alert emails. + * VRRP : Chris Caputo, . In debug output log + gratuitous ARPs with actual IP addresses being ARPed. + * VRRP : Chris Caputo, . If started with + "--dont-release-vrrp" then try to remove addresses even if we didn't + add them during the current run, when it makes sense to do so. + * VRRP : Chris Caputo, added a missing + free_vrrp_buffer() during VRRP stop. + * VRRP : Kees Bos, fixed VRRP sanity check to perform + checksum computation over incoming packet and not local router + instance memory representation => Better to log 'invalid vip + count' instead of 'Invalid vrrp checksum' when the number of + configured vips differ in the master and backup server :) + * VRRP : Release socket pool during daemon stop and reload + * VRRP : Refresh socket pool during reload + * VRRP : Extended netlink framework to support blocking + operation. During initialization, set blocking netlink channel + to wait responses from kernel while parsing result. Kernel netlink + reflection are still handled using non-blocking. + * Jeremy Rumpf, added SMTP checker. It take + a special care of smtp server return code. + * Merged genhash man page + * Chris Caputo, added "misc_dynamic" to a + MISC_CHECK which makes it so a script can adjust the weight of + a real server. + * Fixed some assertion issue in memory framework. + * Use router_id instead of lvs_id in the global_def configuration + block (lvs_id kept for backward compatibility). + * Ronald Wahl , fixed declarations to be only + in includes files. + * Ronald Wahl , moved the definition of variables + to C files + * Ronald Wahl and I fixed scanning for header/body + separator in HTTP protocol + * Ronald Wahl replaced memcpy by memmove where source + & destination may overlap + * Extended checker API to only register checkers when checker callback + is defined. + * Jacob Rief, fixed openlog to take care + of configured log facility. + * Move in_csum to util file. + * Extended libraries to support some new facilities (list and vector). + * Extended scheduler I/O to use timer decalred on the stack. + * Some cosmetics changes. + +2004-04-05 Alexandre Cassen + * keepalived-1.1.7 released. + * Jacob Rief, added target tarball into + root Makefile to facilitate packaging (rpm & tarball). + * Jacob Rief, and I unified version + handling. Now only the root file VERSION is used by configure + to add VERSION_STRING via config.h.in. Added VERSION_DATE + included into the VERSION_STRING that reflect the building + date into the version banner. + * Andres Salomon, wrote the genhash manpage. + * VRRP : Added ipvs_start() and ipvs_stop() calls during vrrp child + start and stop stage. + * Added some assertion test in memory framework to not allocate + bucket if no more place. This option is only used if compiled + with debug flags. + * Some cosmetics patch in Makefiles and autoconf script. + +2004-02-23 Alexandre Cassen + * keepalived-1.1.6 released. + * VRRP : Fixed scheduling timer update. Global scheduling timer is + updated before each thread registering and after scheduling I/O MUX. + Since is needed to take care of scheduling jitter introduced by + overhead (VRRP is using low low timer so more sensitive to overhead). + Thanks to Nathan Neulinger, for his quick feedback + debugging time. + * VRRP : Nathan Neulinger, updated vrrp dropping + strategy to not reply to incoming bogus adverts. Since this can + introduce flooding loop, bogus adverts are now simply silently + dropped. + * VRRP : Fixed a linkbeat issue while polling NIC flags. + * Updated autoconf and Makefile to support 2.6 kernel IPVS code. For + code readability, created 2 differents libipvs for 2.4 and 2.6 kernel + . Fixed autoconf generated warning. + * Extended ipvswrapper to support shared buffer user rule. This + increase performances by limiting memory allocation. OTOH, created + two new ipvs helpers ipvs_start & ipvs_stop to initialize ipvs + subsystem. + * Andres Salomon, made some cosmetics update + in Makefiles to support $(DESTDIR) and $(BIN)/$(EXEC) path split. + +2004-01-25 Alexandre Cassen + * keepalived-1.1.5 released. + * Joseph Mack, wrote keeplived manpages + in doc/man/man5/keepalived.conf.5 and doc/man/man8/keepalived.8. + * VRRP : Tsuji Akira, fixed a length + issue while testing password field for auth_pass method. + * VRRP : Willy Tarreau, fixed a quick loop + in the watchdog timer thread. + * VRRP : Willy Tarreau, extended scheduler + to support stable scheduling time. There is now, only one + time source updated before and after scheduling event. This + solve sliding timer observed on some env, also known as + periodically flapping issue (sometime a VRRP election is + forced). + * VRRP : Willy Tarreau, updated the default + media link failure detection strategy to perform a ioctl + ifflags even if NIC driver are supporting MII or ETHTOOL. + Some buggy drivers need this. Anyway the linkwatch patch + still the best solution to support efficient and scalable + media link failure detection. + * Some cosmetics clean-up, removed some dead files, updated + autoconf and Makefile prototypes to support dependencies + libs like kerberos for RedHat/Fedora distro. To compile + keepalived properly on redhat 9 box, for example, run : + export CPPFLAGS="-I/usr/kerberos/include" && ./configure + Renamed keywords lb_kind to lvs_method and ld_algo to + lvs_sched. For compatibility reasons, old keywords are still + available. + +2003-12-29 Alexandre Cassen + * keepalived-1.1.4 released. + * Refresh autoconf script to use autoconf 2.5. + * Extended the autoconf script to support linkwatch kernel + detection. + * To work-around the SMP forking bug, added support to two + new daemon starting options : + --vrrp -P Only run with VRRP subsystem. + --check -C Only run with Health-checker + subsystem. + Those options extend daemon design to support VRRP & + heathchecking subsystem selection. You can now run + two Keepalived daemon one invoqued with --vrrp and + the other with --check. That way we workaround the + forking issue by running one daemon per subsystem. + * Tiddy cleanup in the daemon code. + * VRRP : Extended the link media failure detection to support + asynchronous NIC MII polling. The design use now, one + dedicated polling thread per NIC. This reduce scheduling + jitter by this way. + * VRRP : Added support to kernel linkwatch subsystem. This + patch that you will find a copy on the Keepalived website + for the kernel 2.4 branch, provides kernel netlink broadcast + events drived by NIC link media state event. That way + we move from a polling design to an event design. Link + events are received throught a kernel netlink broadcast + socket in the userspace land. So, NIC media link failure + detection is now provided by kernel netlink reflection. + You can read the paper attached with the patch for + indepth explanations. + * VRRP : fixed timer computation to prevent against negative + value. + +2003-09-29 Alexandre Cassen + * keepalived-1.1.3 released. + * Stephan von Krawczynski, extended ip + address framework to support broadcast address selection. + * Extended the scheduling framework to support plain 'long' + timer. Visited the layer4 framework to support this new + scheduling scheme. Reviewed the checkers and VRRP framework + to support long timer. + * VRRP : Removed the timer micro adjust call. Its use is + obsolete with the new scheduling 'long' timer support. + * Jacob Rief, and I added support + log level selection for main daemon. A new command line + argument has been created : + --log-facility -S 0-7 Set syslog facility to + LOG_LOCAL[0-7]. (default=LOG_DAEMON) + * Extended the HTTP checker to support non blocking read + while processing stream. NONBLOCK flags is set before + read operation to catch EAGAIN error. + * VRRP : Diego Rivera, and I fixed a + notify issue while building notify exec string. + * VRRP : Diego Rivera, and I extended + FSM to support BACKUP state notifiers and smtp_alert call + during VRRP initialization. + * Jan Vanhercke, and I extended + scheduling timer computation to support micro-sec second + overlap. Extended the whole scheduling framework to support + this scheduling scheme while computing thread timers. + * Fixed scheduling framework to support child thread timers + while computing global scheduling timer. + +2003-09-07 Alexandre Cassen + * keepalived-1.1.2 released. + * Dominik Vogt, and I extended checker + framework to support multiple checkers per realserver. + Each checker own a uniq id, each realserver own a list + of checkers id. Realserver is considered down if one of the + checkers fails. + * Dominik Vogt, extended list library to + support free_list_element. + * Dominik Vogt, and I extended ipwrapper + to support multiple checkers test. Created a checker state + updater helper function to perform realserver state according + to checker state. + * Dominik Vogt, extended all checkers + code to support multiple checker design (to not perform + server state according a single checkers test). + * Tobias Klausmann, and I extended + layer4 framework to support socket binding to a specific + ip address before calling connect(). Extended the TCP, HTTP + and SSL checker to support binding selection, creating + a new checker keyword named "bindto". + look at doc/keepalived.conf.SYNOPSIS for more informations. + * VRRP : Extended the ethtool code to be selected only if + ETHTOOL_GLINK is available. This is useful for s/390 zSeries + users :) since zSerie 2.4 kernel doesn't support ethtool + extension. + * VRRP : Gatis Peisenieks, fixed IPSEC-AH + code to exclude ip header id filed while computing AH digest. + Fixed AH sequence number to be set in network byte order. + * VRRP : Fixed a bug in the static_ipaddress block that caused + a noisy crashing startup. + * VRRP : Kjetil Torgrim Homme, and I + fixed a daemon crash while reloading configuration due to a + vrrp_buffer not freed. + * VRRP : Review the watchdog calling location. watchdog listener + is reinitialized during a daemon reload. + * VRRP : Diego Rivera, extended notify + framework to support simple notify script call. Created a new + keyword "notify", for both vrrp_instance and vrrp_sync_group. + If configured, this notify script is called after FSM state + transition notify scripts. + look at doc/keepalived.conf.SYNOPSIS for more informations. + * Review the checker watchdog calling location like VRRP. + * Fixed code selection to exclude VRRP dependencies if code is + configured without VRRP framework. + * Extended memory lib free function to reset memory location to + NULL. + * Diego Rivera, extended global parser + to support default handlers for lvs_id, smtp_server, + smtp_connection_timeout and email_from. default values are : + o lvs_id : box local name + o smtp_server : localhost + o email_from : uid@box_local_name + o smtp_connection_timeout : 30s + +2003-07-24 Alexandre Cassen + * keepalived-1.1.1 released. + * VRRP : Fixed an issue while reloading configuration. Fixed + a dereferencing pointer. + * Fixed misc checker to perform server state according to + checker result !!! + +2003-07-22 Alexandre Cassen + * keepalived-1.1.0 released. + * The release focus is : "High Performance" + * Name cleanup for the healthchecking directory. use check + instead of healthcheck to be in conformance with watchdog and + global software architecture. + * updated the SYNOPSIS file for documenting the table arg inside + virtual/static_routes declaration. You can set routes refering + to a specific TABLE-ID. + * Added a dummy debug var in the genhash declaration code to + support compilation when compilation is done with debug flag. + * Added a set flag inside the real_server declaration correctly + relfect the IPVS topology when inhibit_on_failure is used. + * fixed a daemon.h include depandency on signal.h + * VRRP : Added support to a global shared buffer for incoming + advert handling. A new buffer is no longer allocated each time + processing incoming advert, instead a shared room is used. + * VRRP : Added support to pre-allocated shared buffer for + outgoing adverts. Each vrrp instance use a 'one time' + allocated buffer instead of a 'all time' one. + * VRRP : Extended the socket pool design to support shared fd + for the outbound channel. Now, socket pool create a sending + socket and affect the fd returned to vrrp instances. This + forces instances to use a shared socket instead of creating + new socket for each outgoing adverts. The error detection + is based on the incoming socket, so that outgoing socket is + not created as long as incoming socket can not be created. + * Added support to netlink ipaddress as global keyword + "static_ipaddress". + look at doc/samples/keepalived.conf.static_ipaddress. + IP addresses specified into this block will be added during + daemon bootstrap and removed during daemon shutdown. + Differential conf parsing is enabled for this block, + removing/adding static_ipaddress can be done on the fly + sending SIGHUP signal to daemon. + * VRRP : Extended track_interface to support multiple interface + tracking. For those familiar with Nokia monitored circuit, + this extention provide the same functionality. + look at doc/samples/keepalived.conf.track_interface. + * VRRP : The VRRP instance lookup framework has been extended + to use a o(1) scheduling design. Rewrote the whole instance + lookup to use o(1) lookup instead of previous o(n^2). When + receiving incoming adverts vrrp_scheduler performs a lookup + over the VRID received to get local instance representation. + Since the internal instance representation is an non-sorted + linked list, then we run a lookup at o(n^2) complexity that + introduce lantency and scheduling jitter side effect when + runing large number of instances. To avoid this limitation + a static hash table of 255 buckets were created. Since + lookup is performed over VRID and since VRID is 8bit fixed, + then the hashkey will be VRID. In order to extend code the + hashkey is based on incoming fd too. Internally, a NIC is + represented by a 2 fds : sending socket and receiving socket. + Those fds are NIC specific so we are using them as a hash + table lookup collision resolver. With this design we can now + use the same VRID on different NICs. The collision design + is a linked list so lookup is o(n^2) but due to low number + of entries we can consider o(1) speed. But to reach best + perf, differents VRID on all instance must be used. The + design can be sumed by : + + VRID hash table : + + +---+---+---+---+---+---+.........+-----+ + | 1 | 2 | 3 | 4 | 5 | 6 |.........| 255 | + +---+---+---+---+---+---+.........+-----+ + | | + +---+ +---+ + |fd3| |fd1| + +---+ +---+ + | + +---+ + |fd5| + +---+ + + This hash table is filled during configuration parsing and + VRRP instances are not duplicated but dynamically pointed + to optimize memory. + * VRRP : The VRRP synchronization group lookup has been + extended. During bootstrap a VRRP instance index is built upon + sync_group instance name. This extension speed up + synchronization since while synchronizing it perfoms the + instance index instead of lookup by instance_name. The + previous synchornization code has been rewritten to use this + 'list visiting' design for FAULT/BACKUP/MASTER states + synchronization. + * VRRP : Optimized the vrrp_timer_vrid_timeout(...) to speed + up vrid lookup over timeouted fd using a one pass lookup. + * Bradley Baetz, extended + the scheduler framework to support child process handling. + Adding support to new thread child facility for handling + child processes, and modifying the scheduling select + loop & signal handling to catch SIGCHLD, and call the + appropriate process. + * Bradley Baetz, fixed + the misc_check healthchecker using new thread child + scheduling facility. Introduced a new keyword + "misc_timeout" to kill processes which take too long + time (default is delay_loop). SIGKILL is send to processes + if they take too long time to shutdown. + * Bradley Baetz, extended + daemon framework to block SIGCHLD to only receive it + whn its unblocked in the scheduling loop. + * Extended healthchecker delay_loop to support long + delay (ie: >1000s). + * VRRP : Added support to a shared kernel netlink command + channel for setting ip address and routes. + * Extended the genhash code to support verbose output + selection. command arg '-v' will generate a very verbose + output. + * VRRP : Extended the logging code to select verbose log + output or not. This selection is done by passing the + '-D' option to command line while starting daemon. + By default the output is silent. + * VRRP : Extended the gratuitous ARP framework to support + shared buffer and shared socket. This increase performances + for instances owning a bunch of VIP. + * VRRP : Extended the scheduling timer computation to support + timer auto-recalibrating. While computing next instance + timer, the scheduler will substract the time taken by + previous advert handling. This provide software overhead + adaptation. The recalibration is performed over usec timer + to not pertube global scheduler. + * VRRP : Fixed a gratuitous ARP issue. Extended the + ipaddress framework to point directly to interface + reflected by netlink channel instead of storing device + index. Extended the gratuitous ARP code to use new + ipaddress structure and for sending garp over device + ipaddess belong to. Needed if you run an instance on + one device interface and set VRRP VIP on different + interface. + * Extended watchdog framework to support polling delay + selection via daemon command line. Created two new + cmdline options : + --wdog-vrrp -R Define VRRP watchdog polling + delay. (default=5s) + --wdog-check -H Define checkers watchdog + polling delay. (default=5s) + * Extended SMTP code to support bigger buffer while + processing remote mta messages. + * Erik Barker, extended initscript + to support native redhat init functions. + * Extended the autoconf scripts and Makefile(s) to support + code profiling. New configure option : --enable-profile + * list library has been extended to support multi-sized list & + specific element deletion. Extended to return when list is + empty. This reduce duplicated code to test is list is empty + while processing. + * VRRP : Extended VRRP scheduler to support fd hash + table design. Speed up instance lookup while + computing instance sands. This offer o(1) design + if we consider limited number of instances per + device. + * VRRP : Extended vrrp new socket creation to replace + refreshed instance fd into fd hash table index. + * VRRP : Extended vrrp framework to support + blank virtual_ipaddress block, can be usefull + if someone want to use just the VRRP advert + as hello monitoring channel. + * Some code cleaning. + +2003-05-12 Alexandre Cassen + * keepalived-1.0.3 released. + * This release has been sponsorized by : + Tiscover AG, + Please visit sponsor homepage. I would just like to thanks their IT + team for interresting design discussions and testing time, especially + Jacob Rief. + * This release consist of a major daemon re-design to increase security + and availability of Keepalived. The daemon has been splitted into 3 + distinct process. The global design is based on a minimalistic + parent process responsible for monitoring its forked children process. + Then 2 children process, one responsible for VRRP framework and the + other for healthchecking. Each children process has its own scheduling + I/O multiplexer, that way VRRP scheduling jitter is optimized since + VRRP scheduling must be more sensible than healthcheckers. On the other + hand this splitted design minimalize for healthchecking the usage of + foreign librairies and minimalize its own action down to and idle + mainloop in order to avoid malfunctions caused by itself. The parent + process monitoring framework has been called watchdog, the design is : + each children process open an accept unix domain socket, then while + daemon bootstrap, parent process connect to those unix domain socket + and send periodic (5s) hello packets to children. If parent cannot send + hello packet to remote connected unix domain socket it simply restart + children process. This watchdog design offer 2 benefit, first of all + hello packets sent from parent process to remote connected children + is done throught I/O multiplexer scheduler that way it can detect + deadloop in the children scheduling framework. The second benefit + is brought by the uses of sysV signal to detect dead children. + When running you will see in process list : + PID + 111 keepalived <-- parent process monitoring child activity + 112 \_ keepalived <-- VRRP children + 113 \_ keepalived <-- Healthchecking children + + * Parent : Created a global data and global keyword parser structure. + * Healthcheck framework : Defined check_conf_data to handle related + checker data structures. Created specific checker framework parser. + * VRRP framework : Defined vrrp_conf_data to handle related vrrp + data structures. Created specific vrrp framework parser. + * Each child process has its own syslog facility. VRRP use LOG_LOCAL1 + and Healthchecker LOG_LOCAL2. To split log you can so configure your + syslog to log both facilities in a different logfile. + * Modularized the configuration parser to limit code duplication. + * Created modularized software watchdog. + * Extended the recursive stream parser to use sublevel detection while + stream processing. Used to skip end-of-block handling if still at + keyword root level to prevent against end parsing if unknown block + is parsed. + * Extended pidfile framework to be more generic. + * Extended memory framework to log specific child data. + * Fixed a virtual_server_group issue while healthchecker bringing back + real_servers. Modularized virtual_server_group API. + * Fixed a virtual_server_group issue will reloading configuration. + Remove vsgname test from the VS_ISEQ macro. strcmp(...) comparing + null pointer... this must have been done in libc :) + * ipwrapper : set alive flag after ipvs_cmd(...) has been performed. + * VRRP : Extended the netlink framework to support SCOPE selection for + both ipaddress and routes fonctionnalities. SCOPE available are + site, link, host, nowhere & global. Default value is set to global. + look at doc/keepalived.conf.SYNOPSIS for more informations. + * Renamed doc/samples/keepalived.conf.routes to + doc/samples/keepalived.conf.vrrp.routes. + * Updated Makefile include dependencies. + +2003-04-14 Alexandre Cassen + * keepalived-1.0.2 released. + * This release has been sponsorized by : + edNET, + Please visit sponsor homepage and thanks to them for supporting + keepalived project. + * Added support to virtual_server_group so that a virtual_server + can be either an IP:PORT, a fwmark or group. A group is a set + of virtual_server IP:PORT, IP range and fwmark. So, now a + real_server can be part of multiple virtual_server without launching + multiple time the same healthchecker that finaly flood real_server. + This extension is useful for big ISP/ASP configuration using many + virtual_server. + look at doc/samples/keepalived.conf.virtual_server_group. + * Extended differential configuration parser to support diff + virtual_server_group entries keeping current entry state as + persistent (weight, conn, ...) big work here... + * Added support to IP range declaration for virtual_server_group. + The IP range has the notation XXX.YYY.ZZZ.WWW-VVV. This will + set IPVS virtual_server from WWW to VVV monotonaly incremented by + one. + look at doc/samples/keepalived.conf.virtual_server_group. + * Dominik Vogt, enhanced SIGCHLD handler to + reap all zombie child processes. + * Created a generic allocation value block with callback handler for + block parsing. This remove duplicated code in parser. + * VRRP : Jan Holmberg, extended the virtual_routes + and static_routes to support source route selection (netlink + RTA_PREFSRC). + look at doc/samples/keepalived.conf.routes. + * Some cosmetics patches to reduce code duplication. + +003-03-17 Alexandre Cassen + * keepalived-1.0.1 released. + * This release has been sponsorized by : + Creative Internet Techniques, + Please visit sponsor homepage, open minded people here ! + * Fixed some Makefile and autoconf code dependence issues. + * Move keepalived.conf.SYNOPSIS and samples into "doc" directory. + * Enhanced HTTP|SSL check to support large url. Get buffer request is + now 2KBytes. + * Removed \n in healthchecker smtp_alert call. This cause some troubles + with MTA like qmail. Thanks go to John Koyle, . + * Added support to netlink route as global keyword "static_routes". + look at doc/samples/keepalived.conf.routes. Routes specified into + this block will be added during daemon bootstrap and removed during + daemon shutdown. Differential conf parsing is enabled for this block, + removing/adding static_route can be done on the fly sending SIGHUP + signal to daemon. + * VRRP : Added support to "virtual_routes". This is the same as + virtual_address. Those routes are set when VRRP instance enter + MASTER state and removed otherwise. Differential conf parsing is + enabled for this block. This concept extend VRRP and bring + dynamic routing as a "route takeover" concept. + * VRRP : Rewrote the VRRP vip handling to use template lib list + structure. VIP and E-VIP are no longer a simple array reallocated. + List library is used to limite code duplication. + * VRRP : Extended virtual_ipaddres and virtual_ipaddress_excluded + block to support "dev" specification. So that a VIP can be set to + a specific interface instead of default runing VRRP instance + interface. + * VRRP : Added support to "track_interface". Interesting for use with + vlan interface. The concept here is to drive VRRP FSM according + do both "interface" and "track_interface" state. If tracked interface + is down or instance interface is down then VRRP instance transit to + FAULT state. For use with vlan, add track to interface vlan belong + to. Look at doc/sample/keepalived.conf.track_interface for sample. + doc/keepalived.conf.SYNOPSIS for configuration details. + * VRRP : Extended FSM FAULT state to keep in fault if track_interface + still fault. + * VRRP : Extended sync group design to test if group is unary or not. + * Some code cleaning and cosmetics enhancements. + +2003-01-06 Alexandre Cassen + * keepalived-1.0.0 released. + * After fixed all bugs users reported during 2 months, I am glad to + announce the first STABLE production ready Keepalived release. + * Rename keepalived.init to keepalived RedHat startup script. Fixed + some issues to be RedHat release generic. Thanks go to + Jeroen Simonetti & Jason Gilbert + * Jason Gilbert, cleaned keepalived.spec. + * Added support to "ha_suspend" for healthcheckers. This option, if set, + inform Keepalived to active/suspend checkers according to netlink + IP address information reflection. If one IP is removed and this is + a virtual_server VIP then the healthcheckers corresponding will be + desactivated. (and reciprocity). + * Added support to "notify_up" & "notify_down" for realserver config. + These options specify a script to be run according to healthchecker + activity. If healthchecking fails then "notify_down" script is + launched (and reciprocity for healthcheck succeed). This can be + usefull for global monitoring system, to send alert to Unicenter TNG + or HPOV. + * Set default realserver weight to 1. So, realserver will be active + if no weight is specified into the configuration file. + * Review the layer4.c/tcp_socket_state to return connection in progress + only if SOL_SOCKET/SO_ERROR return EINPROGRESS. Thanks go to + Mark Weaver, + * Reviewed the global SIGCHLD handler to not suspend execution of the + calling process if status is not immediately available for one of the + child processes. This remove zombies by reaping. + * Extended the parser.c/set_value() code to accept encapsulated quoted + string. + * Review SMTP DBG() message to LOG_INFO message for more verbose + error handling. + * Review the check_tcp.c/check_http.c logging messages to be more + detailed. + * Review the check_tcp.c/check_http.c retry facility to fixes some + stalled issues. + * VRRP : Added support to sync_group smtp notification in addition to + the per instances approach. + * VRRP : Fixed some IPSEC-AH seq_num synchronizations issues. Force + seq_num sync if vrrp instance is linked to a group. + * VRRP : In BACKUP state, force a new MASTER election is received adv. + has a lower priority as locale instance. + * VRRP : vrrp.c/vrrp_state_master_rx(), sync IPSEC-AH seq_num counter + (decrement) if receiving higher prio advert in MASTER state. + * VRRP : Reviewed the TSM to be fully filled. Extended speed-up + synchronization handling MASTER sync if group is not already synced. + * VRRP : Leaving fault state, force MASTER transition is received adv + priority is lower than locale. + * VRRP : Extended the parser to not be borred with sync_group + declaration position in the conf file. vrrp_sync_group can be + declared before or after vrrp_instance. Done by adding a reverse + instance lookup during parsing. + * VRRP : sync_master_election cleanup. + * Some cosmetics patches. + * Created the keepalived/samples/keepalived.conf.SYNOPSIS to describe + all keywords available. + +2002-11-20 Alexandre Cassen + * keepalived-0.7.6 released. + * Created a common library for code modularization. This lib will + be used by all Keepalived components (genhash + Keepalived) to + reduce repeated and duplicated code. + * Rewrote the genhash utility using the common lib. The design is + similar to Keepalived core design. + * Reviewed the autoconf and Makefiles for new code architecture. + * Created a html utility lib for HTTP headers manipulations. + * Extended the CHECK_HTTP and CHECK_SSL checkers to support remote + webserver HTTP header status_code. HTTP status_code is parsed + according to rfc2616.6.1. The keyword created for the new feature is + "status_code" inside and "url" declaration. "status_code" feature + can be mixed with "digest" feature. See the samples directory + keepalived/samples/keepalived.conf.status_code for example. + * Review the CHECK_HTTP and CHECK_SSL MD5SUM code to use a common + stream handling function. + * Matthijs van der Klip, and I + fixed a bug into the HTTP/SSL code that close the socket fd even + if remote webserver has not been connected. As a result of fact, + next socket created were imediatly closed. As a side effect, this + altered the SMTP notification when remote webserver checked fall. No + SMTP notification were sent if webserver were detected DOWN. Thanks + to Matthijs for time debugging and investigation. + * VRRP : Rewrote the previous Gratuitous ARP facility. Created a lib + (vrrp_arp.c) dealing with PF_PACKET-SOCK_RAW-ETH_P_RARP and + sockaddr_ll. + * VRRP : Some cosmetics patch for messages logging. + * VRRP : Fixed an issue during VRRP packet building, appending VRRP + VIPs to the VRRP packet in the network order form. + * VRRP : Reviewed the previous VRRP packet building process to not + create the ARP header. Removec the previous hacky + PF_PACKET-SOCK_PACKET-0x300 to use AF_INET-SOCK_RAW-PROTO to leave + kernel appending ARP header since code doesn t currently support + VRRP VMAC. + * VRRP : Rewrote the previous vrrp_send_pkt() function to deal with + sendmsg(). optimization lazzyness :) + * VRRP : Extended the interfaces library to support common utility + functions (if_setsockopt_hdrincl, if_setsockopt_bindtodevice, ...) + * VRRP : Finally extend the code to support VRRP IPSEC-AH authentication + method. Created a IPSEC-AH seq_number syncrhonization mecanism during + VRRP MASTER/BACKUP elections. + * VRRP : Extended the VRRP TSM to speed up instances syncrhonization + during FAULT->BACKUP & FAULT->MASTER state transition. + * Some cosmetics patches. This release is proposed as a 1.0.0 STABLE + release candidate. + +2002-09-17 Alexandre Cassen + * keepalived-0.7.1 released. + * Fixed a MISC_CHECK issue when registering next timer checker. Must + register a new timer thread before forking process. This imply for + the user the extra script call must not execute in more than + checker->vs->delay_loop. + * Extented the ipfwwrapper (for LVS kernel 2.2) to not set ipchains + rules if nat_mask is not specified in the configuration file. + * VRRP : Added support to delayed gratuitous ARP send. When one instance + enter to MASTER state a timer thread is registered. The default delay + is 5secs. This delay is configurable per vrrp instance and handle the + 'garp_master_delay' keyword. This delay refer to the delay after + MASTER state transition we want to launch gratuitous ARP. + * VRRP : Force health checker enable flag if VRRP framework is not + selected. + * VRRP : Review the gratuitous ARP helper function to only send + gratuitous ARP if VRRP VIPs are set. + * VRRP : Review the FSM to eliminate stalled flapping loop. The state + transition diagram implemented is : + +---------------+ + +----------------| |----------------+ + | | Fault | | + | +------------>| |<------------+ | + | | +---------------+ | | + | | | | | + | | V | | + | | +---------------+ | | + | | +--------->| |<---------+ | | + | | | | Initialize | | | | + | | | +-------| |-------+ | | | + | | | | +---------------+ | | | | + | | | | | | | | + V | | V V | | V + +---------------+ +---------------+ + | |---------------------->| | + | Master | | Backup | + | |<----------------------| | + +---------------+ +---------------+ + + The state DUMMY_MASTER state has been removed since it is a fake. + * VRRP : In order to handle all possible state transition, a Transition + State Matrix design (TSM) has been added. This matrix defines + transition state handlers for VRRP sync group extension. The TSM + implemented is (cf: vrrp_scheduler.c for more informations) : + \ E | B | M | F | + S \ | | | | + ------+-----+-----+-----+ Legend: + B | x 1 2 | B: VRRP BACKUP state + ------+ | M: VRRP MASTER state + M | 3 x 4 | F: VRRP FAULT state + ------+ | S: VRRP start state (before transition) + F | 5 6 x | E: VRRP end state (after transition) + ------+-----------------+ [1..6]: Handler functions. + * VRRP : Set ms_down_timer to 3 * advert_int + TIMER_SKEW when leaving + MASTER state. + * VRRP : In MASTER state, when incoming advert match or FAULT state is + requested then force leaving MASTER state transition. (review the + previous election approach). + * VRRP : Optimized the leave FAULT state transition. Directly coded into + the FSM for speed up recovery or code readability. + * VRRP : Extended smtp notifier for BACKUP state. Review the MASTER state + notification to only notify when VIPs are set. + * some cosmetics patches. + * Adam Fletcher, created the 'Keepalived+LVS NAT HOWTO' + +2002-08-05 Alexandre Cassen + * keepalived-0.6.10 released. + * Fixed a faked flag during VRRP VIP set. Updated the IP address set flag to reflect + netlink return code. + * Fixed an autoconf issue during selection of VRRP framework. + +2002-07-31 Alexandre Cassen + * keepalived-0.6.9 released. + * Fixe some code dependence selection during compilation. If autoconf netlink + probe fails then unset VRRP code. + * Cleanup daemon lib. Added some logging info for the daemon processing, removed + some repeated code part. + * Added 2 new daemon arguments : + --dont-release-vrrp : Dont remove VRRP VIPs on daemon stop + --dont-release-ipvs : Dont remove IPVS topology on daemon stop + * Review the global scheduling process to clear FD queues on master thread + destroy. + * Fixed a forking issue in the MISC_CHECK. + * Review IPVS wrapper functions to use allocated IPVS rules instead of static + referencing pointer. + * Fixed the IPVS wrapper to delete IPVS entries according to their 'alive' state. + * Added IPVS support to alive flag for VS entries. + * Rewrote the previous main.c to support configuration reload on the fly. Extented + signal handling to register a conf reload_thread on SIGHUP. The software design + used here is a dynamic differential conf file reloading framework. This design + offer key decision to add/remove new/old entries to/from low-level framework: + IPVS topology and netlink IP addresses entries. This design reduce to the max + the global service interruption since only negative diff entries are removed. + For VRRP config reload on the fly, if you plan to add/remove many VIPs consider + VIP declaration into the virtual_ipaddress_excluded since they are not present + into VRRP adverts. + * Review the keepalived.init script to support restart and reload arguments. + * Fixed some typo issues. + +2002-07-16 Alexandre Cassen + * keepalived-0.6.8 released. + * Alex Kramarov, & Remi Nivet, + reported an assertion error during smtp notification process. The assertion + caused a bad file descriptor registration during in_progress connection + handling. Fixed registering an event thread calling upper level SMTP + protocol in_progress connection handler. So the SMTP stream handlers use + global I/O multiplexer on connection success. + * Benoit Gaussen, and I added support to "inhibit" feature. + Added a new keyword called "inhibit_on_failure" for real_server declaration. + If specified the real_server will not be removed from the IPVS topology if + real_server fail according to checker result. Instead of removing the entry + from IPVS topology, the corresponding real_server weight will be set to 0. + When real_server will be back, then weight will be set back to original value. + See sample directory for example. + * Added support to IP_MASQ_CMD_SET_DEST for 2.2 krnl and IP_VS_SO_SET_EDITDEST + for 2.4 IPVS code to provide support to "inhibit" feature. + * Review Makefile.in to exit on compilation error. + * Extended autconf script to check for kernel netlink support. + +2002-07-12 Alexandre Cassen + * keepalived-0.6.7 released. + * Rewrote the previous SMTP notification framework. New code use a strong + multi-threaded FSM design. + * Moved the SMTP get_local_name() into utils.c + * IPVS : updated the code to support IPVS_SVC_PERSISTENT_TIMEOUT. Introduced + into the new libipvs coming with ipvs-1.0.4. + * VRRP : Extended the mcast membership subscription to handle more robust + mcast subscription errors. Removed the previous ugly stalling sleeping + call retry for membership subscription. Membership subscriptions are now + multi-threaded to not degrade global scheduling timer. + * VRRP : Remi Nivet, pointed out a buffer + overflow during the sending advert interface binding process. + * Some more cosmetics patches. + +2002-07-05 Alexandre Cassen + * keepalived-0.6.6 released. + * added indentation style .indent.pro + * Review the previous source tree. Splitted the code into functional subdirs. + Added multi-level automake scripts. The source tree looks like : + . + |-- bin + |-- genhash + |-- keepalived + | |-- core + | |-- etc + | | |-- init.d + | | `-- keepalived + | |-- healthcheck + | |-- include + | |-- libipfwc + | |-- libipvs + | |-- samples + | `-- vrrp + `-- lib + * Refine autoconf/automake scripts. Added automake support to libipvs and + libipfwc. Added code selection compilation for libipvs and libipfwc. + * Review Makefile(s) to use more convenient facilities like distclean, ... + * Review the Makefile(s) code dependencies. + * Added support to modprobe_ipvs if the ip_vs.o module is not loaded. + If modprobe fails then IPVS is assumed unavailable. + * Refine the IPVS wrapper to be more tolerant. When a VS or RS is already + configured don t stop the daemon. The daemon is stopped only on critical + IPVS errors. + * VRRP : Review the bootstrap sequence to start daemon even if one of the + instance want to run on an interface administratively shut. Added extension + to FSM to force transition to FAULT state during bootstrap if the interface + is shut. + * Updated the TODO file. + * Some cosmetics patches. + +2002-07-01 Alexandre Cassen + * keepalived-0.6.5 released. + * Fixed a NULL pointer exception while releasing IPVS entries. + * Review the Makefile.in to fixe some conventional issue. Fixed a libipvs + dependance code selection. + * Christophe Varoqui, created the rpm spec file. + * Roberto Nibali, helped during OLS with code cleanup. + Review the whole code coding style to use more conventional indentation. The + one used into LVS and Kernel code. Coding style provided by the following + command : + find . -name "*.[chS]" -exec indent -kr -i8 -ts8 -sob -l80 -ss -bs -psl \ + {} \; && find . -name "*~" -exec rm {} \; + * Roberto Nibali and I review the DEBUG logging facility adding global DBG() + func declaration. + * Roberto Nibali fixed two potential buffer overflow (strcpy). + * Richard L. Allbery, pointed out a fwmark issue. + Healthcheckers is enabled if virtual service is a fwmark. + * Some cosmetics patches. + +2002-06-25 Alexandre Cassen + * keepalived-0.6.4 released. + * Rewrote the previous ip address utilities functions. Review the string + to ulong convertion function to support CIDR filtering and more simple + handling ("without all hexadecimal and shorthand"), pickted from Paul + Vixie code. + * VRRP : extended the notify framework to support scripts inside a + vrrp_sync_group. view the sample/keepalived.conf.vrrp.sync file. + * VRRP : Review the previous vrrp_sync_group block. New declaration + is : view the sample/keepalived.conf.vrrp.sync file. + * VRRP : fixed a FSM sync_group side effect in FAULT state. + * Fixed a Kernel 2.2 code selection issue (ETHTOOL). + * Added support to wensong libipvs. + * Fixed a sorry_server cleanup side effect. + * Alex Kramarov, fine the keepalived.init script + to be compatible with redhat chkconfig. + +2002-06-18 Alexandre Cassen + * keepalived-0.6.3 released. + * VRRP : Christian Motelet, pointed out a + flapping issue when runing vrrp_sync_group on multiple NICs. This have + been fixed adding leave FAULT state transition on both FSM state (read + & read_to). The group leave fault state if all NIC of each VRRP Instance + are functional. + * Fixed some issue in the autoconf/automake scripts. + +2002-06-16 Alexandre Cassen + * keepalived-0.6.2 released. + * Andres Salomon, enhanced the autoconf/automake + scripts to be more generic and to facilitate cross compilation. Including + more efficient IPVS code detection, Kernel version, install script + location, ... + * Johannes Erdfelt, fixed a genhash get request + length calculation issue. + * Johannes Erdfelt, fixed a wrong printed IP address + issue due to a static pivot buffer called multiple times for a single + syslog call. + * Johannes Erdfelt, enhanced SMTP notification + framework to use more compliant SMTP protocol handling. Enhanced both + sending and receiving functions. A nice response code buffer handling + calculating remote SMTP server retcode. + * Johannes Erdfelt, fixed a NULL pointer exception + into the 2.2 ipvswrapper code. + * Aneesh Kumar, fixed a compilation issue for + CI-LINUX checker compilation. + * Jan Du Caju, fixed a compilation dependence + selection into the VRRP framework when compiling without LVS support. + This disable checkers activity update when compiled without LVS support. + * fixed a dereferencing pointer into the parser. + * move the dump configuration to printout conf after daemon initialization. + * VRRP : Added support to start on complete init. VRRP framework and thus + keepalived will start if VRRP instances are properly configured. + +2002-06-13 Alexandre Cassen + * keepalived-0.6.1 released. + * Aneesh Kumar, and I added support to + Cluster Infrastructure checkers. Providing HA-LVS for their cluster + project (http://ci-linux.sourceforge.net/). The new checker added + provide a derivation to the internal CI healthcheck mechanism. + * Enhanced the Kernel netlink reflector to drive global healthcheckers + activity. The policy implemented here is : If healthchecker is performing + test on a service that belong to a VIP not owned by the director, then + the healthchecker is suspended. This suspend/active state is particulary + usefull if runing VRRP for HA => That way the backup LVS will not charge + the realserver pool since LVS VIP is owned by master LVS. + * Cosmetics patches into the vector lib. + * VRRP : Rewrote the previous VRRP synchronization instance policy. + Created a new config block called "vrrp_sync_group" that define VRRP + instances synchronization dependences. That way we replace the previous + "by-pair" sync approach by this "by-group" approach. This can be useefull + for firewall HA with many NICs. Created a dedicated framework to speed up + takeover synchronization. + * VRRP : Added support to CIDR notation for VRRP VIPs definitions + => VRRP VIPs definition like a.b.c.d/e. By default "e" value is set to 32. + * VRRP : Added support to multicast source IP address selection + => "mcast_src_ip" keyword. Can be usefull for strongly filtered env. + The mcast group subscription is done using the NIC default IP after this + mcast_src_ip is used if specified. + * VRRP : Enhanced the link media failure detection. Added support to the + new kernel SIOCETHTOOL probing for ETHTOOL_GLINK command. New drivers + use this ETHTOOL interface to report link failure activity. During + bootstrap a probe is done to determine the proper polling method to + use for link media failure detection. The policy used is : probe for + SIOCGMIIREG if not supported then try SIOCETHTOOL GLINK probe, otherwise + use a ioctl SIOCGIFFLAGS polling function mirroring kernel NIC flags to + localy reflected representation. + * Ramon Kagan, and I updated the UserGuide.pdf. + +2002-05-30 Alexandre Cassen + * keepalived-0.5.9 released. + * Added support to realserver_group. The work is not yet finished since + it introduces new compilation design currently not supported. So please + do not use yet. + * VRRP : Review the script notification. Moved to a script per VRRP + instance state => Created new keywords notify_backup|master|fault + to run a specific script during backup|master|fault state transition. + * VRRP : Added support to quoted strings for notify_backup|master|fault. + Can now launch script passing arguments. + See sample directory for examples. + * VRRP : Added a protocol extension called "virtual_ipaddress_excluded". + This configuration block is similar to "virtual_ipaddress" block => + those VIPs (called E-VIPs) are set throught netlink kernel channel and + gratuitous arp are sent over each E-VIP. The only difference is that + they are not added into VRRP packet adverts. This can be usefull for + big env where you want to run many VRRP VIPs (200 for example). + VRRP packet lenght are limited to a 20 VIPs, if you want more VRRP VIPs + add them to the "virtual_ipaddress_excluded" configuration block. + * VRRP : Added more logging facility when setting/removings VIPs & E-VIPs. + * VRRP : Created a new FSM state called become_master in charge of + VIPs/E-VIPs/notifications handling. The goto_master state is now a state + where the instance send an advert to force a new MASTER election setting + the instance into a transition mode. If election success its finaly + transit to become_master state to own VIPs/E-VIPs and launch scripts. + * VRRP : Force a new MASTER election when receiving a lower prio advert. + * VRRP : Review the vrrp_scheduler.c to use more conventional FSM design. + This reduce and beautifull the code. + * VRRP : Fixed a very noisy flapping issue observed on heavy loaded env. + Simulating big traffic on a backbone figure out this flapping issue. + Added support to a TIMER_MICRO_ADJUST to prevent against timer degradation. + This can be view as a DOS protection policy. VRRP MASTER timers are adjusted + if they are too degradated, due to heavy loaded networking env introducing + latency receiving/sending VRRP protocol adverts. + Thanks goes to Paul, for pointing it out and providing + access to its Internet routing backbone. + +2002-05-21 Alexandre Cassen + * keepalived-0.5.8 released. + * Added an OpenSSL Licence exception to grant Keepalived compilation + with OpenSSL Toolkit. + Thanks to Andres Salomon, for suggesting. + * Added connection port selection for Healthcheckers (TCP_CHECK, + HTTP|SSL_GET). Can be usefull for Healthcheck in fwmark LVS topology + for grouping service. + Thanks to Richard L. Allbery, for suggection. + See samples directory for examples. + * Fixed some IPVS exclusion code when running --disable-lvs. + * Added support to VirtualHost selection when using HTTP|SSL_GET. + See samples directory for examples. + * Added VirtualHost selection into the genhash utility. + * Fixed some IPVS sync daemon initializations issues. + * Cometics patches in IPVS wrapper framework. + * Added support to quoted string. This can be usefull if you are using + MISC_CHECK and you want to pass arguments to called script. See samples. + * Prepare work on real_server_group in order to group some realserver + declaration. + * VRRP : Fixed a password length exception causing an unwanted dropping + issue. + * VRRP : Enhanced the MASTER state to send gratuitous arp if receiving + a remote lower prio advert => This fix a remote stalled ARP cache. + Thanks to Simon Kirby, for discussing this case. + +2002-05-02 Alexandre Cassen + * keepalived-0.5.7 released. + * Review autoconf/automake scripts to be more generic on system and code + selection. Added primitives (configure) : + --disable-lvs-syncd : Do not use IPVS sync daemon + --disable-lvs : Do not use IPVS framework + --disable-vrrp : Do not use VRRP framework + --enable-debug : Compile with debugging flags + * Fixed a SSL stream handling bug. + Thanks to Andres Salomon, for pointing the issue. + * Added a global memory counter to track global memory used. + * Fixed configuration parser. read_line. Remove static allocated + temporary read buffer. Only handle stream if line has been spitted into + vector. + * Limit maximum number of VIPs per VRRP Instance to 20. (for fragmentation, + overhead, and others reasons). + * Added IPVS wrapper support to persistence granularity. + Thanks to Mike Zimmerman, for the suggestion. + * Review smtp notifier to handle VRRP MASTER state transition alert. + Thanks to Paul, for the suggestion. + * Review the UserGuide.pdf to fixe some english issues :) + Thanks to Jacques Thomas, for reviewing. + +2002-04-13 Alexandre Cassen + * keepalived-0.5.6 released. + * VRRP : Review in "GOTO_MASTER_STATE" the IP address handling. + send protocol adverts before registering IP address to the interface. + * VRRP : Review the "LEAVE_MASTER_STATE" to only handle state transition + if wanted states are BACKUP or FAULT. + * VRRP : Review the BACKUP state to force new protocol election if + receiving a lower priority advert. + * VRRP : Fixed a BACKUP to MASTER state transition only if interface is + reported UP. + * VRRP : Fake the "ipvs_syncd_cmd" function if running LVS using a Kernel + 2.2. + +2002-04-10 Alexandre Cassen + * keepalived-0.5.5 released. + * Fixed a gratuitous ARP porting bug. + * VRRP : Review the data structure to be more generic + and clean with the rest of the code. + * VRRP : Remove the interface flags (NIC) ioctl functions + * VRRP : Created an interface (NIC) library giving access + to common interface helpers functions. + * VRRP : Created an interface lookup function creating a global + interface structure during daemon bootstrap. Consist of a netlink + RTM_GETLINK & RTM_GETADDR lookup, so we can work with a userspace + interface representation. + * VRRP : Create a netlink kernel reflection framework updating + dynamically our interface structure according to kernel + netlink broadcast. This design is highly inspired from zebra. + => Reflection mean : wait for netlink kernel broadcast, if received, + wakeup netlink filter to update our userspace representation. + Prefer this design instead of a delayed netlink poller. That way + we reduce global overhead. + * VRRP : VRRP need to detect failure from many places. + If netlink can notify for many troubles like mainly + IFF_UP|DOWN & IFF_RUNNING, those flags are kernel drivers dependent. + To reduce takeover time and performance we need to have informations like + : Does the media link is present ?. The fact is that most of the new NICs + own embended hardware chip providing such informations. So created a + MII transceiver status register thread poller. Monitoring Basic Mode + Status Register (BMSR) of the MII status words. Waiting for kernel + NIC drivers hackers to support this functionnality through netlink + (=> Like a IFF_RUNNING update broadcast). + * VRRP : Linked the state machine to the global interface structure. + NIC failure/events are handled. + * VRRP : Review the whole state machine code to be more realistic. The + State transition diagram described into the RFC2338 is an obtimist + view. The VRRP state transition diagram implemented here is : + + +---------------+ + +--------->| |<-------------+ + | | Initialize | | + | +------| |----------+ | + | | +---------------+ | | + | V V | + +---------------+ +---------------+ + | |---------------------->| | + | Master | | Backup | + | |<----------------------| | + +---------------+ +---------------+ + ^ | | | ^ + | | | +---------------+ | | + | | +------>| Dummy Master | | | + | | +---------------+ | | + | | | | | + | | V | | + | | +---------------+ | | + | +------------>| |<----------+ | + | | Fault | | + +-----------------| |----------------+ + +---------------+ + + * VRRP : Robust multicast handling. Something really strange + is : after a NIC failure (in fallback mode) without closing + the socket, multicast advert can be sent but not received ? + really strange don t know why probably an IGMP resubmit ?. + So multicast group is left during failover (media trouble, + IFF_DOWN or !IFF_RUNNING). In fallback, we register a new + membership and synchronize all the packet dispatcher fds. + * VRRP : Fixed a checksum trouble using password authentication. + * VRRP : Added support to the LVS sync daemon. This permit + LVS sync daemon to be state drived by a specific VRRP instance. + * Review the autoconf/automake to be more generic. + * Some cosmetics patches. + +2002-02-25 Alexandre Cassen + * keepalived-0.5.3 released. + * Added autoconf / automake generic scripts. + * Rewrite the configuration file stream parser. + Using a generic keywords tree. Each keyword refer a specific + stream handler. The main stream processor is a multilevel + recursive function getting file stream and backtracking the + keyword tree. Kind of global compiler structure using event driven + stream processing. + * Re-design the global data structure to be much more generic and + to dissociate LVS configuration related to checkers related. Remove + static char lenght to use dynamic length strings. + * Created a global timer framework. + * Created a global vector template, used in cofiguration file + parsing (both stream process & keywords tree generation). + * Created a global list template, used in most of the code. + * Review the global scheduler to remove repeated code. + * Created a global checkers API. The design and goal here is to + facilitate new checkers creation by localizing specific checker + code into a single file without any other global framework + integration. + * Patched a SSL stream handling race condition finding end of stream. + * Jan Holmberg, review MISC checker to use forked process to not degrade + global scheduler timer. + * Revisited the whole code to use new templates structures. + * Fixed a url lentgh bug into the genhash utility. + * Fabrice Bucher, fixed a timeout_persistence + bug in the IPVS wrapper code. + * Bradley McLean, added support to '0' port number + service in VS manipulation. Useful for balancing all services (host rather + than service). + * Matthijs van der Klip, enhanced smtp + framework to use SMTP header and email enclosed with angle brackets. + +2001-12-20 Alexandre Cassen + * keepalived-0.4.9a released. + * Jan and I patched a memory pointer problems in vrrp_scheduler.c + Thanks to Negrea Mihai, for reporting. + * Jan Holmberg, patched a memory reallocation pointer + exception in memory management framework. + * Jan Holmberg, patched a vrrp vip set/remove retry. + * Some cosmetics/logging patches. + * Created Keepalived UserGuide. + +2001-12-10 Alexandre Cassen + * keepalived-0.4.9 released. + * Jan Holmberg, added a memory managment framework. + In debug mode it is used as a memory leak buster. We can so use it + to debug quickly memory leaks (buffer overrun, allocation errors, ...). + * Jan Holmberg and I added support to SSL. Checker SSL_GET. Can be used + with autogenerated cert or with specific cafile, certfile, keyfile. + * Use the OpenSSL, library for MD5 & SSL functions. + * Jan Holmberg and I Rewrote the HTTP_GET code to use full asynchronous + stream handling. The code use a common part for HTTP/SSL stream handling. + Review the MD5 digest buffer computation, update MD5 over received buffer. + * Patched some memory leaks in smtp handling. + * Jan Holmbarg added support to LVS FWMARK. + * Added command line option for keepalived. Used the libpopt library. + -h, -v, -n, -d, -l, -f. + * Jan Holmberg and I added debugging facility on keepalived console. + * Added a BOOTSTRAP_DELAY of 1sec when registering checkers during + daemon bootstrap. + * VRRP : Jan Holmberg added possibility to run an extra script when + VRRP Instance become or leave MASTER STATE (=> using a forked process). + * Review/fine the whole code to apply cosmetics patch. + * Rewrote the genhash utility. + * Started checkers API specs. + * doc doc doc... + +2001-11-20 Alexandre Cassen + * keepalived-0.4.8 released. + * Rewrite the whole VRRP previous code. + * VRRP : Created a hierarchic scheduling framework. + Handle VRRP instances multiplexing on the same I/O fd. + VRRP I/O events are handled by our global scheduling + framework. Then the global sheduling framework call a VRRP + I/O instance dispatcher to manage VRRP instances. + * VRRP : Created a temporary socket pool to handle register + our VRRP thread instances. + We create & allocate a socket pool here. The soft design + can be sum up by the following sketch : + + fd1 fd2 fd3 fd4 fdi fdi+1 + -----\__/--------\__/---........---\__/--- + | ETH0 | | ETH1 | | ETHn | + +------+ +------+ +------+ + + Here we have n physical NIC. Each NIC own a maximum of 2 fds. + (one for VRRP the other for IPSEC_AH). All our VRRP instances + are multiplexed through this fds. So our design can handle 2*n + multiplexing points. + * VRRP : Review the multicast socket creating. We bind the socket + to a specific NIC. inbound & outbound traffic are bound to the + NIC. + => why IP_ADD_MEMBERSHIP & IP_MULTICAST_IF doesnt set + sk->bound_dev_if themself ??? !!! + Needed for filter multicasted advert per interface. + => For inbound binding we use SO_BINDTODEVICE kernel option. + * VRRP : Created a read dispatcher thread to deal with our sockpool. + Handle VRRP states & transition states. + * VRRP : Created a VRRP synchronization instance circuit. This + functionnality gave you the ability to monitor VRRP instance + each other. This mean that if 2 VRRP instances are monitoring + themself and if one of this instance change state, the other + follow the same state. ex.: With 2 VRRP instances (VI_1 & VI_2) + if VI_1 become backup then VI_2 become backup too. (symetricly + with master VRRP state). + * VRRP : Rewrite the netlink interface to use non blocking socket. + * VRRP : Rewrite the ipaddress handling to use the new netlink + interface. + * VRRP : Remove the VRPP VMAC handling since linux kernel only + permit to use one MAC address on a specific NIC. We use gratuitous + arp when setting up VRRP VIP, to uptade remote host arp caches. + => In certain case this can cause a TCP session renegociation + which can cause a permature session end. + => To be fully compliant with the VRRP RFC, need to patch the + kernel to gave it the possibility to deal with more than one + MAC address at a time. Give me clue on it please ! to same me + a little time :) + * Starting VRRP documentation. + * Patch a pidfile handling bug when forking the keepalived daemon. + Thanks goes to Gianni D'Aprile for pointing it to me. + * Patch a timer race condition into the scheduling framework. + This bug caused tcpcheck to respawn quickly... + Thanks goes to Gianni D'Aprile for pointing it to me. + +2001-11-04 Alexandre Cassen + * keepalived-0.3.8 released. + * Added support to native IPTABLE LVS CODE + => using NAT on 2.4 kernel ipchains kernel support + has been removed. + * Added support to Direct Routing & Tunneling. + * Review the keepalived.init script to be much more generic. + +2001-09-14 Alexandre Cassen + * keepalived-0.4.1 released. + * Added support to LVS kernel 2.4 code + +2001-08-23 Alexandre Cassen + * keepalived-0.4.0 released. + * Patch a race condition into the scheduler timer computation. + * Patch a race condition into the tcp checker thread. Only + register next timer thread if tcp connection is not in progress. + * Patch a race condition into the http checker thread. Handle + empty buffer returned from remote http server. + * Patch a race condition into the dumping configuration process. + A simple dereferencing pointer value...oops... + * Eric Jarman, added MISC CHECKER. + It Perform a system call to run an extra system or script. + => security auditing needed for system call, + buffer overflow over script path must be handled. + + * Added VRRP support using our scheduling I/O multiplexer. + VRRP implementation support to IPSEC-AH using HMAC-96bits digest + with anti-replay. rfc2402 & rfc2104. + * Added routing table fetcher. We ignore route when it is a + cloned route from other router, learn by an ICMP redirect + or set by kernel. Only UNICAST route are stored. + * Added dropping packet support. + +2001-07-15 Alexandre Cassen + * keepalived-0.3.5 released. + * Rewrite the whole signal handling, registering a terminating + thread on signal. + * Move logsystem to syslog using facility LOG_INFO & LOG_DEBUG. + * Added a daemonization function imported from zebra. + * Rewrite the pidfile handling, check if daemon is running, if not + remove eventual stalled pidfile and create new pidfile. + * Added a strong scheduling framework based on an I/O multiplexer + to handle asynchronous process. This code is imported from zebra + and have been enhanced for keepalived purposes. + + Thread types are : + . timeouted read on fd. + . timeouted write on fd. + . timer. + . event. + . terminate event. + + => The zebra framework have been enhanced to add support for timeouted + read/write fds. + + => With this framework keepalived use a Boss/Worker thread model design, + fetching ready thread from a master threading queues. + + * Rewrite the configuration file reader to add flexibility on extending. + The dynamic data structure has been rewritten to use apropriate types. + Right now parsing framework is ready for easy new checker structures + integration. + * Rewrite the smtp connector. The implementation take advantage of the + I/O multiplexer. All read/write operations from/to the remote smtp server + are done asynchronously. The implementation is rfc 821 compliant (multiple + receiver are handled by a multiple RCPT TO command as specified in rfc821.3.1). + * Rewrite the IPFW & IPVS wrappers. + * Added support for NAT mask on IP MASQ rules (keyword nat_mask in configuration + file). Added support for sorry server facility, so when all the server from a + VS server pool are removed, a sorry server is automaticaly added to the VS pool + (typically this is used when you have a spare server online). + * Rewrite the previous checkers. Checkers are now based on a hierarchic layer + stack framework. The protocol implemented for the moment is TCP. All layer 5 + checkers are using layer4.c primitives with the same design : + + . a checker connector thread (creating the socket) registering the connection + checker thread. + . a connection checker thread testing connection states (error, in_progress, + timeout, success). When connection success upper level thread are registered + to handle checks. + * Delay loop is now checkers specifics since we can use a multithreaded framework. + * Update the PDF documentation file. diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..656e9bf --- /dev/null +++ b/INSTALL @@ -0,0 +1,224 @@ +Kernel needs +============== + + Compile a kernel with the following options : + + Kernel/User netlink socket + LinuxVirtualServer + + Keepalived supports all LVS code. + +Library dependencies +==================== + + In order to compile Keepalived needs the following libraries : + + * OpenSSL, + +Linux flavours +============== + +RedHat based systems (RedHat Enterprise/CentOS/Fedora) +------------------------------------------------------ +The following build packages are needed: + make + autoconf automake (to build from git source tree rather than tarball) +The following libraries need to be installed: + openssl-devel libnl3-devel ipset-devel iptables-devel libnfnetlink-devel +For magic file identification support: + file-devel +For SNMP support: + net-snmp-devel +For DBUS support: + glib2-devel +For JSON support: + json-c-devel +For PCRE support + pcre2-devel + +For building the documentation, the following packages need to be installed: + Fedora: python-sphinx (will pull in: python2-sphinx_rtd_theme) + CentOS-and-friends: python-sphinx epel-release python-sphinx_rtd_theme + For latex or pdf files, the following are also needed: + Fedora: latexmk python-sphinx-latex + CentOS-and-friends: latexmk texlive texlive-titlesec texlive-framed texlive-threeparttable texlive-wrapfig texlive-multirow + +Debian/Ubuntu +------------- +On Debian, install: + pkg-config +On Ubuntu, install: + build-essential pkg-config, and to build from git repo automake autoconf +The following libraries need to be installed: + iptables-dev libipset-dev libnfnetlink-dev libnl-3-dev libnl-genl-3-dev libssl-dev +For magic file identification support: + libmagic-dev +For SNMP support: + libsnmp-dev +For DBUS support: + libglib2.0-dev +For JSON support: + libjson-c-dev +For PCRE support: + libpcre2-dev + +For building the documentation, the following packages need to be installed: + python-sphinx python-sphinx-rtd-theme + For latex or pdf files, the following are also needed: + texlive-latex-base texlive-generic-extra texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra + +Alpine Linux +------------ +The following libraries need to be installed: + iptables-dev ipset-dev libnfnetlink-dev libnl3-dev musl-dev and openssl-dev or libressl-dev +For magic file identification support: + TBD +For SNMP support: + net-snmp-dev (requires libressl-dev and not openssl-dev) + +For building the documentation, the following packages need to be installed: + py-sphinx py3-sphinx_rtd_theme + For latex or pdf files, you'll need texlive or similar, which is not yet + available as a distro package. + + +Archlinux +--------- +Run the following to install the required libraries: + pacman -S ipset libnfnetlink libnl1 +For magic file identification support: + TBD +For SNMP support: + pacman -S net-snmp +for PCRE support: + pcre-2 (may be installed by default) + +For building the documentation, the following packages need to be installed: + python-sphinx python-sphinx_rtd_theme + For latex or pdf files, the following are also needed: + texlive-core texlive-bin texlive-latexextra + +Kernel configuration requirements +--------------------------------- +The following list is probably incomplete, and will be updated as other +options become known. + +BPF +EPOLL +SIGNALFD +TIMERFD +SYSCTL +PROC_FS +INET +IP_MULTICAST +IPV6 +IP_VS (unless --disable-lvs is specified) + IP_VS suboptions to match the real_server/virtual_server configuration +NETFILTER_XTABLES - if strict_mode or no_accept. + NETFILTER_XT options and IP_SET +IP_ADVANCED_ROUTER and various associated options if static/dynamic routes specified +FIB_RULES if static or dynamic rules are specified + +Installing from a git repo +========================== +To install from a git repo, execute: + 1. Ensure you have autoconf and automake installed + 2. git clone http://github.com/acassen/keepalived + 3. cd keepalived + 4. ./build_setup # generate the autoconf and automake environment + 5. Follow the instructions below for Installation, omitting the first two steps. + +Installation +============ + + 1. tar -xf TARFILE + 2. cd into the directory + 3. './configure' + 4. 'make' + 5. 'make install'. This will install keepalived on your system, + binaries and configuration file : + * keepalived : The keepalived daemon program. + * genhash : The MD5 url digest generator. You need it to + configure HTTP GET check and SSL GET check in + order to compute MD5SUM digest etalon. + * /etc/keepalived/keepalived.conf + 6. link keepalived.init into your runlevel directory. On Red Hat systems : + ln -s /etc/rc.d/init.d/keepalived.init /etc/rc.d/rc3.d/S99keepalived + + By default the configure script uses /usr/local as base directory. You can + change this value to your own by passing it the --prefix value. + + eg: './configure --prefix=/usr/' + +Building RPM files +================== + + If building from tarball: + 1a. tar -xf TARFILE + 1b. cd into the directory + + If building from git clone: + 1. ./build_setup + + For tarball and git + 2. ./configure + 3. make rpm + + The .rpm files will be created in directory `rpm --eval "%{_rpmdir}"`/ARCH + +Modifying source code +===================== + +If you modify the source code, especially configure.ac or any Makefile.am +file, you will need to regenerate the build files. Keepalived uses automake +and so you will need to have automake and autoconf installed. + +Configuration +============= + + Just take a look at the /etc/keepalived/keepalived.conf file installed. + It will give you all the information needed. Alternativley, run + 'man keepalived.conf' or look at doc/keepalived.conf.SYNOPSIS. + If you want more information about keepalived, please refer to the + keepalived homepage into the documentation section. + + http://www.keepalived.org + + +Creating a docker container +=========================== +There is a very useful github project maintained by osixia for building a +docker container with keepalived. + +To use, run the following: +git clone https://github.com/osixia/docker-keepalived.git +cd docker-keepalived +make build +docker run --name keepalived --cap-add=NET_ADMIN --net=host \ + --env KEEPALIVED_INTERFACE=eth0 -d osixia/keepalived:1.3.5 \ + # or whatever version of keepalived you have + +To update the keepalived source code, put a new tarball in the image +directory (the Dockerfile may need updating with a new version). + +Useful docker commands are: +docker logs keepalvied 2>&1 | lessa # view system logs of container +docker exec it keepalived bash # execute shell in container +docker rm -f keepalived # Remove the container + +keepalived is unable to load the ip_tables, ip6_tables, xt_set and ip_vs +modules from within the container, so ensure they are already loaded in +the host system. + +To generate a core file in the root filesystem of the container, +/proc/sys/kernel/core_pattern needs to be updated in the host system, +and not from the container (or in other words the -M option to keepalived +does not work within a container. Installing gdb in the container (edit +the image/Dockerfile to add it before make build) may be helpful if you +need to examine core files in the container. + + + +Have fun with it ! + +Alexandre, diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..e123117 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,80 @@ +# Makefile.am +# +# Keepalived OpenSource project. +# +# Copyright (C) 2001-2017 Alexandre Cassen, + +export DEBUG_CFLAGS +export DEBUG_CPPFLAGS +export DEBUG_LDFLAGS + +edit = echo " EDIT $@"; \ + sed -e "/^\[\!\[/d" + +SUBDIRS = lib keepalived doc + +if BUILD_GENHASH + SUBDIRS += genhash +endif + +SUBDIRS += bin_install + +EXTRA_DIST = AUTHOR CONTRIBUTORS snap README.md + +doc_DATA = README + +MOSTLYCLEANFILES = README + +MAINTAINERCLEANFILES = @MAINTAINERCLEANFILES@ + +README: $(srcdir)/README.md + @$(edit) '$(srcdir)/$@.md' >$@ + +distclean-local: + @rm -f aclocal.m4 ar-lib compile depcomp install-sh missing keepalived-$(VERSION).tar.gz config.log config.status + @rm -rf autom4te.cache + +dist-hook: + @rm -f $(distdir)/README + +.PHONY: docker +docker: + docker build -t keepalived . + +# clean all files that are generated by automake/autoconf etc +autoclean: + @$(MAKE) distclean + @rm -f configure `find . -name Makefile.in` lib/config.h.in lib/git-commit.h + +git-clean: + @$(MAKE) autoclean + +clean-local: clean-local-snap + +# clean files that are generated by snapcraft +.PHONY: clean-local-snap +clean-local-snap: + -rm -rf parts/ prime/ stage/ keepalived_*.snap + +# Added targets to maintain compatibility with keepalived releases 1.2.22 and earlier +.PHONY: tarball rpm debug profile mrproper + +tarball: dist + +@RPM_TRUE@rpm: +@RPM_TRUE@ @$(MAKE) dist +@RPM_TRUE@@RPM_BIP_TRUE@ rpmbuild -ba --build-in-place keepalived.spec +@RPM_TRUE@@RPM_BIP_FALSE@ @cp -p keepalived-$(VERSION).tar.gz `rpm --eval "%{_sourcedir}"` +@RPM_TRUE@@RPM_BIP_FALSE@ rpmbuild -ba keepalived.spec + +debug: + @$(MAKE) DEBUG_LDFLAGS=-ggdb + +profile: + @$(MAKE) DEBUG_CFLAGS=-pg + +mrproper: + @echo Please use `make distclean` + +DISTCHECK_CONFIGURE_FLAGS = \ + --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..55ed0a3 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,905 @@ +# Makefile.in generated by automake 1.15 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Makefile.am +# +# Keepalived OpenSource project. +# +# Copyright (C) 2001-2017 Alexandre Cassen, + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +@BUILD_GENHASH_TRUE@am__append_1 = genhash +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(am__DIST_COMMON) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/lib/config.h +CONFIG_CLEAN_FILES = keepalived.spec +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(docdir)" +DATA = $(doc_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +CSCOPE = cscope +DIST_SUBDIRS = lib keepalived doc genhash bin_install +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/keepalived.spec.in \ + COPYING ChangeLog INSTALL README TODO ar-lib compile depcomp \ + install-sh missing +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +DIST_TARGETS = dist-gzip +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFAULT_CONFIG_FILE = @DEFAULT_CONFIG_FILE@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GENHASH_LIBS = @GENHASH_LIBS@ +GREP = @GREP@ +HAVE_RPM = @HAVE_RPM@ +HAVE_RPMBUILD = @HAVE_RPMBUILD@ +HAVE_SPHINX_BUILD = @HAVE_SPHINX_BUILD@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KA_CFLAGS = @KA_CFLAGS@ +KA_CPPFLAGS = @KA_CPPFLAGS@ +KA_LDFLAGS = @KA_LDFLAGS@ +KA_LIBS = @KA_LIBS@ +LDD = @LDD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINTAINERCLEANFILES = @MAINTAINERCLEANFILES@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NETSNMP_CONFIG = @NETSNMP_CONFIG@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PID_DIR = @PID_DIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPHINXBUILDNAME = @SPHINXBUILDNAME@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +systemdsystemunitdir = @systemdsystemunitdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +edit = echo " EDIT $@"; \ + sed -e "/^\[\!\[/d" + +SUBDIRS = lib keepalived doc $(am__append_1) bin_install +EXTRA_DIST = AUTHOR CONTRIBUTORS snap README.md +doc_DATA = README +MOSTLYCLEANFILES = README +DISTCHECK_CONFIGURE_FLAGS = \ + --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) + +all: all-recursive + +.SUFFIXES: +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): +keepalived.spec: $(top_builddir)/config.status $(srcdir)/keepalived.spec.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +install-docDATA: $(doc_DATA) + @$(NORMAL_INSTALL) + @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ + done + +uninstall-docDATA: + @$(NORMAL_UNINSTALL) + @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__post_remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile $(DATA) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(docdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-local mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-local \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-docDATA + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-docDATA + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-cscope clean-generic \ + clean-local cscope cscopelist-am ctags ctags-am dist dist-all \ + dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-generic \ + distclean-local distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-docDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-docDATA + +.PRECIOUS: Makefile + + +export DEBUG_CFLAGS +export DEBUG_CPPFLAGS +export DEBUG_LDFLAGS + +README: $(srcdir)/README.md + @$(edit) '$(srcdir)/$@.md' >$@ + +distclean-local: + @rm -f aclocal.m4 ar-lib compile depcomp install-sh missing keepalived-$(VERSION).tar.gz config.log config.status + @rm -rf autom4te.cache + +dist-hook: + @rm -f $(distdir)/README + +.PHONY: docker +docker: + docker build -t keepalived . + +# clean all files that are generated by automake/autoconf etc +autoclean: + @$(MAKE) distclean + @rm -f configure `find . -name Makefile.in` lib/config.h.in lib/git-commit.h + +git-clean: + @$(MAKE) autoclean + +clean-local: clean-local-snap + +# clean files that are generated by snapcraft +.PHONY: clean-local-snap +clean-local-snap: + -rm -rf parts/ prime/ stage/ keepalived_*.snap + +# Added targets to maintain compatibility with keepalived releases 1.2.22 and earlier +.PHONY: tarball rpm debug profile mrproper + +tarball: dist + +@RPM_TRUE@rpm: +@RPM_TRUE@ @$(MAKE) dist +@RPM_TRUE@@RPM_BIP_TRUE@ rpmbuild -ba --build-in-place keepalived.spec +@RPM_TRUE@@RPM_BIP_FALSE@ @cp -p keepalived-$(VERSION).tar.gz `rpm --eval "%{_sourcedir}"` +@RPM_TRUE@@RPM_BIP_FALSE@ rpmbuild -ba keepalived.spec + +debug: + @$(MAKE) DEBUG_LDFLAGS=-ggdb + +profile: + @$(MAKE) DEBUG_CFLAGS=-pg + +mrproper: + @echo Please use `make distclean` + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/README.md b/README.md new file mode 100644 index 0000000..41b6d07 --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +keepalived: Loadbalancing & High-Availability +============================================= + +[![Build Status](https://travis-ci.org/acassen/keepalived.svg?branch=master)](https://travis-ci.org/acassen/keepalived) + +The main goal of the keepalived project is to add a strong & robust +keepalive facility to the Linux Virtual Server project. +It implements a multilayer TCP/IP stack checks. Keepalived implements +a framework based on three family checks : Layer3, Layer4 & Layer5. +This framework gives the daemon the ability of checking a LVS server +pool states. Keepalived can be sumarize as a LVS driving daemon. + +Keepalived implementation is based on an I/O multiplexer to handle a +strong multi-threading framework. All the events process use this I/O +multiplexer. + +To build keepalived from the git source tree, you will need to have +autoconf, automake and various libraries installed. See the INSTALL +file for details of what needs to be installed and what needs to be +executed before building keepalived. + +Keepalived is free software, Copyright (C) Alexandre Cassen. +See the file COPYING for copying conditions. + +OPENSSL TOOLKIT LICENCE EXCEPTION + +In addition, as the copyright holder of Keepalived, +I, Alexandre Cassen, , +grant the following special exception: + + I, Alexandre Cassen, , explicitly allow + the compilation and distribution of the Keepalived software with + the OpenSSL Toolkit. + diff --git a/TODO b/TODO new file mode 100644 index 0000000..cab84bc --- /dev/null +++ b/TODO @@ -0,0 +1,154 @@ +Whatever you want ! + +Real servers +Add quorum_weight, defaults to weight. May want to set different between quorum and IPVS weight + +Rationalise use of timer_now()/gettimeofday()/set_time_now() + + +virtual route: +1. How do we handle + virtual_routes { + 192.168.210.0/24 via 10.1.0.1 + } + if there is no route to 10.1.0.1? If we go to fault state if it cannot + be installed when attempt to transition to master, how do we know to transiton + out of fault state. + + +IPVS +1. Can we have an IPv4 fwmark and specify tunnel to IPv6, and vice versa etc. + What does ipvsadm do? +2. Sort out IP_VS_SO vs LVS_CMD... +3. Make sure log/email messages contain relevant info re VS -> RS. See FMT_CHK + +The following are still outstanding from the ideas for what became v2.0.0: + + * Sort out termination in vrrp and checker - stop_vrrp/check, and phase2 + are inconsistent between vrrp and checker. What about bfd? + * A route with multiple nexthops will only be deleted if all interfaces + are down. Each nexthop needs to record the interface, and only remove + once all down + * Don't add RTNMGRP_IPV4_ADDR/IPV6_ADDR if not monitoring one of those + families + * May want to stop VS down at start for alpha mode RSs (except SNMP) + * Rate limit respawning if a child process dies + * Have a socket to connect to for receiving notifications. A process + can register for what notifications it wants to receive. + * Allow variable parameters to be passed to scripts - see issue #837 + * Make tarball include git version if not a tag + * If an address owner recovers from fault, transition directly to + master + * If configuration_state=MASTER && !OWNER, transition to master after + 1 * advert_int + skew. Sort out all initialisation around states + * Split vrrp_snmp.c into vrrp_snmp_keepalived.c vrrp_snmp_rfcv2.c and + vrrp_snmp_rfcv3.c + * Only send correct type of trap, and respond to correct SNMP version, + controlled by config, defaults to type of instance. Flags snmp_v2 and + snmp_v3 to force other, or both. + * Ensure unicast peers groups check source address of received advert + so that the same VRID can be used between different peer groups on the + same interface. + * Add process checking: + Add track_process for vrrp instances + Add PROCESS_CHECK for checkers + - Find PID and remember it. If PID has gone, try and find new pid + Look at how pidof/killall find processes + * Allow dynamic definitions, e.g. $_VI_NAME + Also $*_INSTANCE net_namspace $_INSTANCE + so $* means only do if $_INSTANCE not blank. */ + * ng-scheduler + + +Other issues awaiting resolution: + +ipvs_group_range_cmd() appears nonsense, and inet_stor returning a uint8_t +doesn't work for IPv6. The virtual_service_entry_t thing needs range to be +uint32_t. Why would mask be 0xffffffff for IPv6? + +ip_vs_daemon_kern vs /usr/include/linux/ip_vs.h ip_vs_daemon_user + +vrrp_timer_fd should return 0 if an fd's timer is in the past? + +Make vrrp->send_buffer a single buffer for all + +Check timers passto to thread_... functions are reasonable, and stacktrace if not. + +In function socket_state, should thread_add_write use timer_long() or -timer_long() + +vrrp_timer_fd() - see comment + +In thread functions with a timer, ensure not > LONG_MAX (or even some lower value); + +Change tcp_socket_state etc to socket_state etc + +Add noreturn function attribute on stop_vrrp/check + +bin/genhash -s 2001:470:69dd:35::188 --port 80 -u /Harriet/ # works, but +bin/genhash -s 2001:470:69dd:35::188 --port 80 -u /Harriet/ # -S doesn't + # but -S is OK with IPv4 address + +in ipvswrapper.c, get rid of static srule etc and make them procedure local and pass as parameters + +Stop passing base_ifp to netlink3_set_interface_parameters() etc + +ipsecah issues +============== +1. sync and vmac ignore counter + +2. Start up just after master dies, but have lowest priority so become master with counter == 1 + +3. cycle won't happen + +4. In vrrp_backup, don't check auth type matches + +5. ? if cycle becomes set, we must become backup. How do we get out of state? + +epoll +===== +Use timerfd (see timerfd_create(2)) for microsecond timing with epoll, and do not bother with its timeout. +If not available, then simply use the epoll timer. + +Optimise calls to timer_now() and see set_time_now() +==================================================== +After select completes, get time. Before calculating next +select expire time, get time again. +To test time processing, save time after select and log time taken +before next select. Also initialise timer at startup. + +Add api +======= + +Add pipe for updates +==================== +track_script like for absolute or relative priority + +Upstream issues +=============== + +1. Kernel. Socket receive buffers growing to fill memory + See issue #839. If the following setting are in place: +net.core.rmem_default = 37748736 +net.core.rmem_max = 37748736 + and vrrp_tx_bufs_policy NO_SEND_RX is configured, then + all system memory can be consumed. Why is it not limited + to 37748736 bytes? + +2. Kernel. Corruption when netlink sends status of large number + of links - see issues #392/#803. + When using default socket receive buffer size, and have 500 + vmac interfaces configured on a physical interface and the + physical interface is downed, lots of netlink messages are + received, and we get an ENOBUFS. However, after that we then + see a repeat of some of the earlier messages, so it looks like + a circular buffer corruption. Running ip -ts monitor link addr route + we see precisely the same problem at exactly the same message, + although which message it is varies each time. + +3. net-snmp. Display-hint only works on indices. + See issue #866. + # snmpwalk -v2c -c public localhost KEEPALIVED-MIB::virtualServerAddress + KEEPALIVED-MIB::virtualServerAddress.1 = STRING: " +0," + The address is attempted to be output as text, rather than using + the display hint diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..3018c54 --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,1488 @@ +# generated automatically by aclocal 1.15 -*- Autoconf -*- + +# Copyright (C) 1996-2014 Free Software Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) + +dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +dnl serial 11 (pkg-config-0.29.1) +dnl +dnl Copyright © 2004 Scott James Remnant . +dnl Copyright © 2012-2015 Dan Nicholson +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +dnl 02111-1307, USA. +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a +dnl configuration script generated by Autoconf, you may include it under +dnl the same distribution terms that you use for the rest of that +dnl program. + +dnl PKG_PREREQ(MIN-VERSION) +dnl ----------------------- +dnl Since: 0.29 +dnl +dnl Verify that the version of the pkg-config macros are at least +dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's +dnl installed version of pkg-config, this checks the developer's version +dnl of pkg.m4 when generating configure. +dnl +dnl To ensure that this macro is defined, also add: +dnl m4_ifndef([PKG_PREREQ], +dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) +dnl +dnl See the "Since" comment for each macro you use to see what version +dnl of the macros you require. +m4_defun([PKG_PREREQ], +[m4_define([PKG_MACROS_VERSION], [0.29.1]) +m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, + [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) +])dnl PKG_PREREQ + +dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) +dnl ---------------------------------- +dnl Since: 0.16 +dnl +dnl Search for the pkg-config tool and set the PKG_CONFIG variable to +dnl first found in the path. Checks that the version of pkg-config found +dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is +dnl used since that's the first version where most current features of +dnl pkg-config existed. +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi +fi[]dnl +])dnl PKG_PROG_PKG_CONFIG + +dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl ------------------------------------------------------------------- +dnl Since: 0.18 +dnl +dnl Check to see whether a particular set of modules exists. Similar to +dnl PKG_CHECK_MODULES(), but does not set variables or print errors. +dnl +dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +dnl only at the first occurence in configure.ac, so if the first place +dnl it's called might be skipped (such as if it is within an "if", you +dnl have to call PKG_CHECK_EXISTS manually +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_default([$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + +dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +dnl --------------------------------------------- +dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting +dnl pkg_failed based on the result. +m4_define([_PKG_CONFIG], +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes ], + [pkg_failed=yes]) + else + pkg_failed=untried +fi[]dnl +])dnl _PKG_CONFIG + +dnl _PKG_SHORT_ERRORS_SUPPORTED +dnl --------------------------- +dnl Internal check to see if pkg-config supports short errors. +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])dnl _PKG_SHORT_ERRORS_SUPPORTED + + +dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +dnl [ACTION-IF-NOT-FOUND]) +dnl -------------------------------------------------------------- +dnl Since: 0.4.0 +dnl +dnl Note that if there is a possibility the first call to +dnl PKG_CHECK_MODULES might not happen, you should be sure to include an +dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + +if test $pkg_failed = yes; then + AC_MSG_RESULT([no]) + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + m4_default([$4], [AC_MSG_ERROR( +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT])[]dnl + ]) +elif test $pkg_failed = untried; then + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +_PKG_TEXT + +To get pkg-config, see .])[]dnl + ]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + $3 +fi[]dnl +])dnl PKG_CHECK_MODULES + + +dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +dnl [ACTION-IF-NOT-FOUND]) +dnl --------------------------------------------------------------------- +dnl Since: 0.29 +dnl +dnl Checks for existence of MODULES and gathers its build flags with +dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags +dnl and VARIABLE-PREFIX_LIBS from --libs. +dnl +dnl Note that if there is a possibility the first call to +dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to +dnl include an explicit call to PKG_PROG_PKG_CONFIG in your +dnl configure.ac. +AC_DEFUN([PKG_CHECK_MODULES_STATIC], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +_save_PKG_CONFIG=$PKG_CONFIG +PKG_CONFIG="$PKG_CONFIG --static" +PKG_CHECK_MODULES($@) +PKG_CONFIG=$_save_PKG_CONFIG[]dnl +])dnl PKG_CHECK_MODULES_STATIC + + +dnl PKG_INSTALLDIR([DIRECTORY]) +dnl ------------------------- +dnl Since: 0.27 +dnl +dnl Substitutes the variable pkgconfigdir as the location where a module +dnl should install pkg-config .pc files. By default the directory is +dnl $libdir/pkgconfig, but the default can be changed by passing +dnl DIRECTORY. The user can override through the --with-pkgconfigdir +dnl parameter. +AC_DEFUN([PKG_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([pkgconfigdir], + [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, + [with_pkgconfigdir=]pkg_default) +AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +])dnl PKG_INSTALLDIR + + +dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) +dnl -------------------------------- +dnl Since: 0.27 +dnl +dnl Substitutes the variable noarch_pkgconfigdir as the location where a +dnl module should install arch-independent pkg-config .pc files. By +dnl default the directory is $datadir/pkgconfig, but the default can be +dnl changed by passing DIRECTORY. The user can override through the +dnl --with-noarch-pkgconfigdir parameter. +AC_DEFUN([PKG_NOARCH_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([noarch-pkgconfigdir], + [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, + [with_noarch_pkgconfigdir=]pkg_default) +AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +])dnl PKG_NOARCH_INSTALLDIR + + +dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl ------------------------------------------- +dnl Since: 0.28 +dnl +dnl Retrieves the value of the pkg-config variable for the given module. +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) + +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])dnl PKG_CHECK_VAR + +# Copyright (C) 2002-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.15' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.15], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.15])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# Copyright (C) 2011-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_AR([ACT-IF-FAIL]) +# ------------------------- +# Try to determine the archiver interface, and trigger the ar-lib wrapper +# if it is needed. If the detection of archiver interface fails, run +# ACT-IF-FAIL (default is to abort configure with a proper error message). +AC_DEFUN([AM_PROG_AR], +[AC_BEFORE([$0], [LT_INIT])dnl +AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl +AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([ar-lib])dnl +AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) +: ${AR=ar} + +AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], + [AC_LANG_PUSH([C]) + am_cv_ar_interface=ar + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], + [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([am_ar_try]) + if test "$ac_status" -eq 0; then + am_cv_ar_interface=ar + else + am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([am_ar_try]) + if test "$ac_status" -eq 0; then + am_cv_ar_interface=lib + else + am_cv_ar_interface=unknown + fi + fi + rm -f conftest.lib libconftest.a + ]) + AC_LANG_POP([C])]) + +case $am_cv_ar_interface in +ar) + ;; +lib) + # Microsoft lib, so override with the ar-lib wrapper script. + # FIXME: It is wrong to rewrite AR. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__AR in this case, + # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something + # similar. + AR="$am_aux_dir/ar-lib $AR" + ;; +unknown) + m4_default([$1], + [AC_MSG_ERROR([could not determine $AR interface])]) + ;; +esac +AC_SUBST([AR])dnl +]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is '.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each '.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.65])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl +]) +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. +]) + +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) + +# Copyright (C) 2003-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + AC_MSG_WARN(['missing' script is too old or missing]) +fi +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) + +# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor 'install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in "make install-strip", and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +# +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' + +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + diff --git a/ar-lib b/ar-lib new file mode 100755 index 0000000..463b9ec --- /dev/null +++ b/ar-lib @@ -0,0 +1,270 @@ +#! /bin/sh +# Wrapper for Microsoft lib.exe + +me=ar-lib +scriptversion=2012-03-01.08; # UTC + +# Copyright (C) 2010-2014 Free Software Foundation, Inc. +# Written by Peter Rosin . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + + +# func_error message +func_error () +{ + echo "$me: $1" 1>&2 + exit 1 +} + +file_conv= + +# func_file_conv build_file +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv in + mingw) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_at_file at_file operation archive +# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE +# for each of them. +# When interpreting the content of the @FILE, do NOT use func_file_conv, +# since the user would need to supply preconverted file names to +# binutils ar, at least for MinGW. +func_at_file () +{ + operation=$2 + archive=$3 + at_file_contents=`cat "$1"` + eval set x "$at_file_contents" + shift + + for member + do + $AR -NOLOGO $operation:"$member" "$archive" || exit $? + done +} + +case $1 in + '') + func_error "no command. Try '$0 --help' for more information." + ;; + -h | --h*) + cat < + +.PHONY: all debug profile + +all debug profile: $(top_builddir)/bin/keepalived $(top_builddir)/bin/genhash + +$(top_builddir)/bin/keepalived: $(top_builddir)/keepalived/keepalived + @$(MKDIR_P) $(top_builddir)/bin + @(if test -f $(top_builddir)/keepalived/keepalived; then \ + if test -z "$(DEBUG_LDFLAGS)$(DEBUG_CFLAGS)$(DEBUG_CPPFLAGS)"; then \ + @STRIP@ -o $(top_builddir)/bin/keepalived $(top_builddir)/keepalived/keepalived; \ + else \ + cp -p $(top_builddir)/keepalived/keepalived $(top_builddir)/bin; \ + fi; \ + else \ + rm -f $(top_builddir)/bin/keepalived; \ + fi) + +$(top_builddir)/bin/genhash: $(top_builddir)/genhash/genhash + @$(MKDIR_P) $(top_builddir)/bin + @(if test -f $(top_builddir)/genhash/genhash; then \ + if test -z "$(DEBUG_LDFLAGS)$(DEBUG_CFLAGS)$(DEBUG_CPPFLAGS)"; then \ + @STRIP@ -o $(top_builddir)/bin/genhash $(top_builddir)/genhash/genhash; \ + else \ + cp -p $(top_builddir)/genhash/genhash $(top_builddir)/bin; \ + fi; \ + else \ + rm -f $(top_builddir)/bin/genhash; \ + fi) + +clean-local: + rm -f $(top_builddir)/bin/keepalived $(top_builddir)/bin/genhash diff --git a/bin_install/Makefile.in b/bin_install/Makefile.in new file mode 100644 index 0000000..da804b6 --- /dev/null +++ b/bin_install/Makefile.in @@ -0,0 +1,457 @@ +# Makefile.in generated by automake 1.15 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Makefile.am +# +# Keepalived OpenSource project. +# +# Copyright (C) 2001-2016 Alexandre Cassen, +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +subdir = bin_install +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/lib/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFAULT_CONFIG_FILE = @DEFAULT_CONFIG_FILE@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GENHASH_LIBS = @GENHASH_LIBS@ +GREP = @GREP@ +HAVE_RPM = @HAVE_RPM@ +HAVE_RPMBUILD = @HAVE_RPMBUILD@ +HAVE_SPHINX_BUILD = @HAVE_SPHINX_BUILD@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KA_CFLAGS = @KA_CFLAGS@ +KA_CPPFLAGS = @KA_CPPFLAGS@ +KA_LDFLAGS = @KA_LDFLAGS@ +KA_LIBS = @KA_LIBS@ +LDD = @LDD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINTAINERCLEANFILES = @MAINTAINERCLEANFILES@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NETSNMP_CONFIG = @NETSNMP_CONFIG@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PID_DIR = @PID_DIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPHINXBUILDNAME = @SPHINXBUILDNAME@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +systemdsystemunitdir = @systemdsystemunitdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bin_install/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign bin_install/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-local \ + cscopelist-am ctags-am distclean distclean-generic distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +.PHONY: all debug profile + +all debug profile: $(top_builddir)/bin/keepalived $(top_builddir)/bin/genhash + +$(top_builddir)/bin/keepalived: $(top_builddir)/keepalived/keepalived + @$(MKDIR_P) $(top_builddir)/bin + @(if test -f $(top_builddir)/keepalived/keepalived; then \ + if test -z "$(DEBUG_LDFLAGS)$(DEBUG_CFLAGS)$(DEBUG_CPPFLAGS)"; then \ + @STRIP@ -o $(top_builddir)/bin/keepalived $(top_builddir)/keepalived/keepalived; \ + else \ + cp -p $(top_builddir)/keepalived/keepalived $(top_builddir)/bin; \ + fi; \ + else \ + rm -f $(top_builddir)/bin/keepalived; \ + fi) + +$(top_builddir)/bin/genhash: $(top_builddir)/genhash/genhash + @$(MKDIR_P) $(top_builddir)/bin + @(if test -f $(top_builddir)/genhash/genhash; then \ + if test -z "$(DEBUG_LDFLAGS)$(DEBUG_CFLAGS)$(DEBUG_CPPFLAGS)"; then \ + @STRIP@ -o $(top_builddir)/bin/genhash $(top_builddir)/genhash/genhash; \ + else \ + cp -p $(top_builddir)/genhash/genhash $(top_builddir)/bin; \ + fi; \ + else \ + rm -f $(top_builddir)/bin/genhash; \ + fi) + +clean-local: + rm -f $(top_builddir)/bin/keepalived $(top_builddir)/bin/genhash + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/compile b/compile new file mode 100755 index 0000000..a85b723 --- /dev/null +++ b/compile @@ -0,0 +1,347 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2012-10-14.11; # UTC + +# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/configure b/configure new file mode 100755 index 0000000..d89984c --- /dev/null +++ b/configure @@ -0,0 +1,13562 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for Keepalived 2.0.10. +# +# Report bugs to . +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: keepalived-devel@lists.sourceforge.net about your +$0: system, including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='Keepalived' +PACKAGE_TARNAME='keepalived' +PACKAGE_VERSION='2.0.10' +PACKAGE_STRING='Keepalived 2.0.10' +PACKAGE_BUGREPORT='keepalived-devel@lists.sourceforge.net' +PACKAGE_URL='http://www.keepalived.org/' + +ac_unique_file="keepalived/core/main.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +INIT_SUSE_FALSE +INIT_SUSE_TRUE +INIT_OPENRC_FALSE +INIT_OPENRC_TRUE +INIT_SYSV_FALSE +INIT_SYSV_TRUE +INIT_SYSTEMD_FALSE +INIT_SYSTEMD_TRUE +INIT_UPSTART_FALSE +INIT_UPSTART_TRUE +systemdsystemunitdir +DEFAULT_CONFIG_FILE +RPM_BIP_FALSE +RPM_BIP_TRUE +RPM_FALSE +RPM_TRUE +HAVE_RPMBUILD +HAVE_RPM +PROFILE_FALSE +PROFILE_TRUE +DEBUG_FALSE +DEBUG_TRUE +BUILD_DOCS_FALSE +BUILD_DOCS_TRUE +HAVE_SPHINX_BUILD +SPHINXBUILDNAME +PID_DIR +WITH_NAMESPACES_FALSE +WITH_NAMESPACES_TRUE +WITH_SHA1_FALSE +WITH_SHA1_TRUE +DBUS_CREATE_INSTANCE_FALSE +DBUS_CREATE_INSTANCE_TRUE +WITH_DBUS_FALSE +WITH_DBUS_TRUE +SNMP_REPLY_V3_FOR_V2_FALSE +SNMP_REPLY_V3_FOR_V2_TRUE +SNMP_RFCV3_FALSE +SNMP_RFCV3_TRUE +SNMP_RFCV2_FALSE +SNMP_RFCV2_TRUE +SNMP_RFC_FALSE +SNMP_RFC_TRUE +SNMP_CHECKER_FALSE +SNMP_CHECKER_TRUE +SNMP_VRRP_FALSE +SNMP_VRRP_TRUE +SNMP_KEEPALIVED_FALSE +SNMP_KEEPALIVED_TRUE +SNMP_FALSE +SNMP_TRUE +NETSNMP_CONFIG +FIB_ROUTING_FALSE +FIB_ROUTING_TRUE +SOCK_NONBLOCK_FALSE +SOCK_NONBLOCK_TRUE +WITH_BFD_FALSE +WITH_BFD_TRUE +WITH_JSON_FALSE +WITH_JSON_TRUE +VMAC_FALSE +VMAC_TRUE +VRRP_AUTH_FALSE +VRRP_AUTH_TRUE +WITH_VRRP_FALSE +WITH_VRRP_TRUE +WITH_REGEX_FALSE +WITH_REGEX_TRUE +WITH_IPVS_FALSE +WITH_IPVS_TRUE +LIBIPSET_FALSE +LIBIPSET_TRUE +LIBIPTC_FALSE +LIBIPTC_TRUE +LIBNL_DYNAMIC_FALSE +LIBNL_DYNAMIC_TRUE +LIBNL3_FALSE +LIBNL3_TRUE +LIBNL1_FALSE +LIBNL1_TRUE +BUILD_GENHASH_FALSE +BUILD_GENHASH_TRUE +GENHASH_LIBS +LIBOBJS +EGREP +CPP +KA_LIBS +KA_LDFLAGS +KA_CFLAGS +KA_CPPFLAGS +ARFLAGS +ac_ct_AR +AR +LDD +SED +LN_S +GREP +RANLIB +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG +MAINTAINERCLEANFILES +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +runstatedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_silent_rules +enable_lvs_syncd +enable_lvs +enable_lvs_64bit_stats +enable_vrrp +enable_bfd +with_kernel_dir +enable_fwmark +enable_snmp +enable_snmp_vrrp +enable_snmp_keepalived +enable_snmp_checker +enable_snmp_rfc +enable_snmp_rfcv2 +enable_snmp_rfcv3 +enable_snmp_reply_v3_for_v2 +enable_dbus +enable_dbus_create_instance +enable_sha1 +enable_regex +enable_regex_timers +enable_json +with_init +enable_vrrp_auth +enable_checksum_compat +enable_routes +enable_gnu_std_paths +enable_dynamic_linking +enable_libiptc_dynamic +enable_libipset_dynamic +enable_libxtables_dynamic +enable_libnl_dynamic +enable_libiptc +enable_libipset +enable_libnl +enable_strict_config_checks +enable_hardening +enable_optimise +enable_mem_check +enable_mem_check_log +enable_timer_check +enable_debug +enable_netlink_timers +enable_smtp_alert_debug +enable_stacktrace +enable_perf +enable_log_file +enable_dump_threads +enable_epoll_debug +enable_epoll_thread_dump +enable_regex_debug +enable_tsm_debug +enable_vrrp_fd_debug +with_fixed_if_type +with_default_config_file +enable_profile +enable_conversion_checks +enable_force_conversion_checks +enable_Werror +with_systemdsystemunitdir +enable_dependency_tracking +' + ac_precious_vars='build_alias +host_alias +target_alias +PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir runstatedir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures Keepalived 2.0.10 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/keepalived] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of Keepalived 2.0.10:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --disable-lvs-syncd do not use LVS synchronization daemon + --disable-lvs do not use the LVS framework + --disable-lvs-64bit-stats + do not use the LVS 64-bit stats + --disable-vrrp do not use the VRRP framework + --enable-bfd use the BFD framework + --disable-fwmark compile without SO_MARK support + --enable-snmp compile with SNMP support + --enable-snmp-vrrp compile with SNMP vrrp support + --enable-snmp-keepalived + obsolete - use --enable-snmp-vrrp + --enable-snmp-checker compile with SNMP checker support + --enable-snmp-rfc compile with SNMP RFC2787 (VRRPv2) and SNMP RFC6527 + (VRRPv3) support + --enable-snmp-rfcv2 compile with SNMP RFC2787 (VRRPv2) support + --enable-snmp-rfcv3 compile with SNMP RFC6257 (VRRPv3) support + --disable-snmp-reply-v3-for-v2 + disable RFC6257 responses for VRRPv2 instances + --enable-dbus compile with dbus support + --enable-dbus-create-instance + compile with dbus support for creating instances + --enable-sha1 compile with SHA1 support + --enable-regex build with HTTP_GET regex checking + --enable-regex-timers build with HTTP_GET regex timers + --enable-json compile with signal to dump configuration and stats + as json + --disable-vrrp-auth compile without VRRP authentication + --disable-checksum-compat + compile without v1.3.6 and earlier VRRPv3 unicast + checksum compatibility + --disable-routes compile without ip rules/routes + --enable-gnu-std-paths use GNU standard paths for pid files etc + --enable-dynamic-linking + compile with/without dynamically linked + libiptc/libipset + --enable-libiptc-dynamic + compile with libiptc dynamically linked + --disable-libipset-dynamic + compile with libipset statically linked + --enable-libxtables-dynamic + compile with libxtables dynamically linked + --enable-libnl-dynamic compile with libnl dynamically linked + --disable-libiptc compile without libiptc + --disable-libipset compile without libipset + --disable-libnl compile without libnl + --enable-strict-config-checks + build with strict configuration checking + --disable-hardening do not build with security hardening + --optimise compiler optimisation level + --enable-mem-check compile with memory alloc checking + --enable-mem-check-log compile with memory alloc checking writing to syslog + --enable-timer-check compile with set time logging + --enable-debug compile with debugging flags + --enable-netlink-timers compile with netlink command timers + --enable-smtp-alert-debug + compile with smtp-alert debugging + --enable-stacktrace compile with stacktrace support + --enable-perf compile with perf performance data recording support + for vrrp process + --enable-log-file enable logging to file (-g) + --enable-dump-threads compile with thread dumping support + --enable-epoll-debug compile with epoll_wait() debugging support + --enable-epoll-thread-dump compile with epoll thread dumping support + --enable-regex-debug compile with regex debugging support + --enable-tsm-debug compile with TSM debugging support + --enable-vrrp-fd-debug compile with vrrp fd debugging support + --enable-profile compile with profiling flags + --enable-conversion-checks + compile with conversion warnings if sensible + --enable-force-conversion-checks + compile with conversion warnings + --enable-Werror compile with warnings being errors + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-kernel-dir=DIR path to linux kernel source directory + --with-init=(upstart|systemd|SYSV|SUSE|openrc) + specify init type + --with-fixed-if-type=TYPE treat interface type TYPE as unchangeable + --with-default-config-file=FILE + Default configuration file + --with-systemdsystemunitdir=DIR + Directory for systemd service files + +Some influential environment variables: + PKG_CONFIG path to pkg-config utility + PKG_CONFIG_PATH + directories to add to pkg-config's search path + PKG_CONFIG_LIBDIR + path overriding pkg-config's built-in search path + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +Keepalived home page: . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +Keepalived configure 2.0.10 +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ----------------------------------------------------- ## +## Report this to keepalived-devel@lists.sourceforge.net ## +## ----------------------------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type + +# ac_fn_c_find_intX_t LINENO BITS VAR +# ----------------------------------- +# Finds a signed integer type with width BITS, setting cache variable VAR +# accordingly. +ac_fn_c_find_intX_t () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5 +$as_echo_n "checking for int$2_t... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + # Order is important - never check a type that is potentially smaller + # than half of the expected target width. + for ac_type in int$2_t 'int' 'long int' \ + 'long long int' 'short int' 'signed char'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default + enum { N = $2 / 2 - 1 }; +int +main () +{ +static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default + enum { N = $2 / 2 - 1 }; +int +main () +{ +static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1) + < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + case $ac_type in #( + int$2_t) : + eval "$3=yes" ;; #( + *) : + eval "$3=\$ac_type" ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if eval test \"x\$"$3"\" = x"no"; then : + +else + break +fi + done +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_find_intX_t + +# ac_fn_c_find_uintX_t LINENO BITS VAR +# ------------------------------------ +# Finds an unsigned integer type with width BITS, setting cache variable VAR +# accordingly. +ac_fn_c_find_uintX_t () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 +$as_echo_n "checking for uint$2_t... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + # Order is important - never check a type that is potentially smaller + # than half of the expected target width. + for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ + 'unsigned long long int' 'unsigned short int' 'unsigned char'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + case $ac_type in #( + uint$2_t) : + eval "$3=yes" ;; #( + *) : + eval "$3=\$ac_type" ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if eval test \"x\$"$3"\" = x"no"; then : + +else + break +fi + done +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_find_uintX_t + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_decl + +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES +# ---------------------------------------------------- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +ac_fn_c_check_member () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if eval \${$4+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$4 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_member +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by Keepalived $as_me 2.0.10, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +am__api_version='1.15' + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='keepalived' + VERSION='2.0.10' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + + + + +ac_config_headers="$ac_config_headers lib/config.h" + + + + +ac_config_files="$ac_config_files Makefile keepalived/Makefile lib/Makefile keepalived/core/Makefile keepalived.spec genhash/Makefile keepalived/check/Makefile keepalived/vrrp/Makefile keepalived/bfd/Makefile doc/Makefile bin_install/Makefile keepalived/dbus/Makefile keepalived/etc/Makefile keepalived/etc/init/Makefile keepalived/etc/init.d/Makefile doc/man/man8/Makefile" + + + +MAINTAINERCLEANFILES="*~ *.orig *.rej core core.*" + +CONFIG_OPTIONS= +SYSTEM_OPTIONS= + +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=0;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + + + + + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi + +# Check whether --enable-lvs-syncd was given. +if test "${enable_lvs_syncd+set}" = set; then : + enableval=$enable_lvs_syncd; +fi + +# Check whether --enable-lvs was given. +if test "${enable_lvs+set}" = set; then : + enableval=$enable_lvs; +fi + +# Check whether --enable-lvs-64bit-stats was given. +if test "${enable_lvs_64bit_stats+set}" = set; then : + enableval=$enable_lvs_64bit_stats; +fi + +# Check whether --enable-vrrp was given. +if test "${enable_vrrp+set}" = set; then : + enableval=$enable_vrrp; +fi + +# Check whether --enable-bfd was given. +if test "${enable_bfd+set}" = set; then : + enableval=$enable_bfd; +fi + + +# Check whether --with-kernel-dir was given. +if test "${with_kernel_dir+set}" = set; then : + withval=$with_kernel_dir; kernel_src_path="$withval" + else kernel_src_path="" +fi + +# Check whether --enable-fwmark was given. +if test "${enable_fwmark+set}" = set; then : + enableval=$enable_fwmark; +fi + +# Check whether --enable-snmp was given. +if test "${enable_snmp+set}" = set; then : + enableval=$enable_snmp; +fi + +# Check whether --enable-snmp-vrrp was given. +if test "${enable_snmp_vrrp+set}" = set; then : + enableval=$enable_snmp_vrrp; +fi + +# Check whether --enable-snmp-keepalived was given. +if test "${enable_snmp_keepalived+set}" = set; then : + enableval=$enable_snmp_keepalived; +fi + +# Check whether --enable-snmp-checker was given. +if test "${enable_snmp_checker+set}" = set; then : + enableval=$enable_snmp_checker; +fi + +# Check whether --enable-snmp-rfc was given. +if test "${enable_snmp_rfc+set}" = set; then : + enableval=$enable_snmp_rfc; +fi + +# Check whether --enable-snmp-rfcv2 was given. +if test "${enable_snmp_rfcv2+set}" = set; then : + enableval=$enable_snmp_rfcv2; +fi + +# Check whether --enable-snmp-rfcv3 was given. +if test "${enable_snmp_rfcv3+set}" = set; then : + enableval=$enable_snmp_rfcv3; +fi + +# Check whether --enable-snmp-reply-v3-for-v2 was given. +if test "${enable_snmp_reply_v3_for_v2+set}" = set; then : + enableval=$enable_snmp_reply_v3_for_v2; +fi + +# Check whether --enable-dbus was given. +if test "${enable_dbus+set}" = set; then : + enableval=$enable_dbus; +fi + +# Check whether --enable-dbus-create-instance was given. +if test "${enable_dbus_create_instance+set}" = set; then : + enableval=$enable_dbus_create_instance; +fi + +# Check whether --enable-sha1 was given. +if test "${enable_sha1+set}" = set; then : + enableval=$enable_sha1; +fi + +# Check whether --enable-regex was given. +if test "${enable_regex+set}" = set; then : + enableval=$enable_regex; +fi + +# Check whether --enable-regex-timers was given. +if test "${enable_regex_timers+set}" = set; then : + enableval=$enable_regex_timers; +fi + +# Check whether --enable-json was given. +if test "${enable_json+set}" = set; then : + enableval=$enable_json; +fi + + +# Check whether --with-init was given. +if test "${with_init+set}" = set; then : + withval=$with_init; init_type="$withval" +else + init_type="" +fi + +# Check whether --enable-vrrp-auth was given. +if test "${enable_vrrp_auth+set}" = set; then : + enableval=$enable_vrrp_auth; +fi + +# Check whether --enable-checksum_compat was given. +if test "${enable_checksum_compat+set}" = set; then : + enableval=$enable_checksum_compat; +fi + +# Check whether --enable-routes was given. +if test "${enable_routes+set}" = set; then : + enableval=$enable_routes; +fi + +# Check whether --enable-gnu-std-paths was given. +if test "${enable_gnu_std_paths+set}" = set; then : + enableval=$enable_gnu_std_paths; +fi + +# Check whether --enable-dynamic-linking was given. +if test "${enable_dynamic_linking+set}" = set; then : + enableval=$enable_dynamic_linking; +fi + +# Check whether --enable-libiptc-dynamic was given. +if test "${enable_libiptc_dynamic+set}" = set; then : + enableval=$enable_libiptc_dynamic; +fi + +# Check whether --enable-libipset-dynamic was given. +if test "${enable_libipset_dynamic+set}" = set; then : + enableval=$enable_libipset_dynamic; +fi + +# Check whether --enable-libxtables-dynamic was given. +if test "${enable_libxtables_dynamic+set}" = set; then : + enableval=$enable_libxtables_dynamic; +fi + +# Check whether --enable-libnl-dynamic was given. +if test "${enable_libnl_dynamic+set}" = set; then : + enableval=$enable_libnl_dynamic; +fi + +# Check whether --enable-libiptc was given. +if test "${enable_libiptc+set}" = set; then : + enableval=$enable_libiptc; +fi + +# Check whether --enable-libipset was given. +if test "${enable_libipset+set}" = set; then : + enableval=$enable_libipset; +fi + +# Check whether --enable-libnl was given. +if test "${enable_libnl+set}" = set; then : + enableval=$enable_libnl; +fi + +# Check whether --enable-strict-config-checks was given. +if test "${enable_strict_config_checks+set}" = set; then : + enableval=$enable_strict_config_checks; +fi + +# Check whether --enable-hardening was given. +if test "${enable_hardening+set}" = set; then : + enableval=$enable_hardening; +fi + +# Check whether --enable-optimise was given. +if test "${enable_optimise+set}" = set; then : + enableval=$enable_optimise; +else + enable_optimise=not-specified +fi + +# Check whether --enable-mem-check was given. +if test "${enable_mem_check+set}" = set; then : + enableval=$enable_mem_check; +fi + +# Check whether --enable-mem-check-log was given. +if test "${enable_mem_check_log+set}" = set; then : + enableval=$enable_mem_check_log; +fi + +# Check whether --enable-timer-check was given. +if test "${enable_timer_check+set}" = set; then : + enableval=$enable_timer_check; +fi + +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then : + enableval=$enable_debug; +fi + +# Check whether --enable-netlink-timers was given. +if test "${enable_netlink_timers+set}" = set; then : + enableval=$enable_netlink_timers; +fi + +# Check whether --enable-smtp-alert-debug was given. +if test "${enable_smtp_alert_debug+set}" = set; then : + enableval=$enable_smtp_alert_debug; +fi + +# Check whether --enable-stacktrace was given. +if test "${enable_stacktrace+set}" = set; then : + enableval=$enable_stacktrace; +fi + +# Check whether --enable-perf was given. +if test "${enable_perf+set}" = set; then : + enableval=$enable_perf; +fi + +# Check whether --enable-log-file was given. +if test "${enable_log_file+set}" = set; then : + enableval=$enable_log_file; +fi + +# Check whether --enable-dump-threads was given. +if test "${enable_dump_threads+set}" = set; then : + enableval=$enable_dump_threads; +fi + +# Check whether --enable-epoll-debug was given. +if test "${enable_epoll_debug+set}" = set; then : + enableval=$enable_epoll_debug; +fi + +# Check whether --enable-epoll-thread-dump was given. +if test "${enable_epoll_thread_dump+set}" = set; then : + enableval=$enable_epoll_thread_dump; +fi + +# Check whether --enable-regex-debug was given. +if test "${enable_regex_debug+set}" = set; then : + enableval=$enable_regex_debug; +fi + +# Check whether --enable-tsm-debug was given. +if test "${enable_tsm_debug+set}" = set; then : + enableval=$enable_tsm_debug; +fi + +# Check whether --enable-vrrp-fd-debug was given. +if test "${enable_vrrp_fd_debug+set}" = set; then : + enableval=$enable_vrrp_fd_debug; +fi + + +# Check whether --with-fixed-if-type was given. +if test "${with_fixed_if_type+set}" = set; then : + withval=$with_fixed_if_type; +fi + + +# Check whether --with-default-config-file was given. +if test "${with_default_config_file+set}" = set; then : + withval=$with_default_config_file; default_config_file="$withval" +else + default_config_file="" +fi + +# Check whether --enable-profile was given. +if test "${enable_profile+set}" = set; then : + enableval=$enable_profile; +fi + +# Check whether --enable-conversion-checks was given. +if test "${enable_conversion_checks+set}" = set; then : + enableval=$enable_conversion_checks; +fi + +# Check whether --enable-force-conversion-checks was given. +if test "${enable_force_conversion_checks+set}" = set; then : + enableval=$enable_force_conversion_checks; +fi + +# Check whether --enable-Werror was given. +if test "${enable_Werror+set}" = set; then : + enableval=$enable_Werror; +fi + + + +# Check whether --with-systemdsystemunitdir was given. +if test "${with_systemdsystemunitdir+set}" = set; then : + withval=$with_systemdsystemunitdir; +else + with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd) +fi + + +# Set the kernel headers path +if test -n "$kernel_src_path"; then + kernelinc="-I$kernel_src_path/include" +elif test ! -d /usr/include/linux -a \ + -d /usr/src/linux/include; then + kernelinc="-I/usr/src/linux/include" +else + kernelinc= +fi + +CPPFLAGS="$kernelinc $CPPFLAGS" + +# Checks for programs. +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ldd", so it can be a program name with args. +set dummy ${ac_tool_prefix}ldd; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LDD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LDD"; then + ac_cv_prog_LDD="$LDD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LDD="${ac_tool_prefix}ldd" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LDD=$ac_cv_prog_LDD +if test -n "$LDD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5 +$as_echo "$LDD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LDD"; then + ac_ct_LDD=$LDD + # Extract the first word of "ldd", so it can be a program name with args. +set dummy ldd; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LDD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LDD"; then + ac_cv_prog_ac_ct_LDD="$ac_ct_LDD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_LDD="ldd" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_LDD=$ac_cv_prog_ac_ct_LDD +if test -n "$ac_ct_LDD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LDD" >&5 +$as_echo "$ac_ct_LDD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LDD" = x; then + LDD="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LDD=$ac_ct_LDD + fi +else + LDD="$ac_cv_prog_LDD" +fi + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar lib "link -lib" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar lib "link -lib" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 +$as_echo_n "checking the archiver ($AR) interface... " >&6; } +if ${am_cv_ar_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + am_cv_ar_interface=ar + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int some_variable = 0; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 + (eval $am_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + am_cv_ar_interface=ar + else + am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 + (eval $am_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + am_cv_ar_interface=lib + else + am_cv_ar_interface=unknown + fi + fi + rm -f conftest.lib libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 +$as_echo "$am_cv_ar_interface" >&6; } + +case $am_cv_ar_interface in +ar) + ;; +lib) + # Microsoft lib, so override with the ar-lib wrapper script. + # FIXME: It is wrong to rewrite AR. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__AR in this case, + # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something + # similar. + AR="$am_aux_dir/ar-lib $AR" + ;; +unknown) + as_fn_error $? "could not determine $AR interface" "$LINENO" 5 + ;; +esac + +ARFLAGS=cr + + +# Default settings +ENABLE_LOG_FILE_APPEND=No + +# AC_PROG_LIBTOOL + +# +# save the configure arguments +# +args=`echo $ac_configure_args | $SED -e "s/'//g"` + +cat >>confdefs.h <<_ACEOF +#define KEEPALIVED_CONFIGURE_OPTIONS "$args" +_ACEOF + + +KA_CPPFLAGS="$kernelinc" +KA_CFLAGS="-Wall -Wunused -Wstrict-prototypes -Wextra -Winit-self -g -D_GNU_SOURCE" +KA_LDFLAGS= +KA_LIBS= +NEED_LIBDL=No +#KA_LIBTOOLFLAGS = + +# We want _GNU_SOURCE defined always +CFLAGS="$CFLAGS -D_GNU_SOURCE" + +# Some sanity checks on configure options +if test .$enable_vrrp = .no; then : + + if test .$enable_perf = .yes; then : + as_fn_error $? "enable-perf requires vrrp" "$LINENO" 5 +fi + if test .$enable_libiptc_dynamic = .yes; then : + as_fn_error $? "enable-libiptc-dynamic requires vrrp" "$LINENO" 5 +fi + if test .$enable_libxtables_dynamic = .yes; then : + as_fn_error $? "enable-libxtables-dynamic requires vrrp" "$LINENO" 5 +fi + if test .$enable_libiptc = .no; then : + as_fn_error $? "disable-libiptc requires vrrp" "$LINENO" 5 +fi + if test .$enable_libipset = .no; then : + as_fn_error $? "disable-libipset requires vrrp" "$LINENO" 5 +fi + if test $with_fixed_if_type; then : + as_fn_error $? "with-fixed-if-type requires vrrp" "$LINENO" 5 +fi + if test .$enable_vrrp_fd_debug = .yes; then : + as_fn_error $? "enable-vrrp-fd-debug requires vrrp" "$LINENO" 5 +fi + if test .$enable_tsm_debug = .yes; then : + as_fn_error $? "enable-tsm-debug requires vrrp" "$LINENO" 5 +fi + if test .$enable_json = .yes; then : + as_fn_error $? "enable-json requires vrrp" "$LINENO" 5 +fi + if test .$enable_snmp_vrrp = .yes; then : + as_fn_error $? "enable-snmp-vrrp requires vrrp" "$LINENO" 5 +fi + if test .$enable_snmp_keepalived = .yes; then : + as_fn_error $? "enable-snmp-keepalived requires vrrp" "$LINENO" 5 +fi + if test .$enable_snmp_rfc = .yes; then : + as_fn_error $? "enable-snmp-rfc requires vrrp" "$LINENO" 5 +fi + if test .$enable_snmp_rfcv2 = .yes; then : + as_fn_error $? "enable-snmp-rfcv2 requires vrrp" "$LINENO" 5 +fi + if test .$enable_snmp_rfcv3 = .yes; then : + as_fn_error $? "enable-snmp-rfcv3 requires vrrp" "$LINENO" 5 +fi + if test .$enable_dbus = .yes; then : + as_fn_error $? "enable-dbus requires vrrp" "$LINENO" 5 +fi + if test .$enable_vrrp_auth = .no; then : + as_fn_error $? "disable-vrrp-auth requires vrrp" "$LINENO" 5 +fi + if test .$enable_checksum_compat = .no; then : + as_fn_error $? "disable-checksum-compat requires vrrp" "$LINENO" 5 +fi + if test .$enable_routes = .no; then : + as_fn_error $? "disable-routes requires vrrp" "$LINENO" 5 +fi + if test .$enable_bfd = yes; then : + as_fn_error $? "enable-bfd requires vrrp" "$LINENO" 5 +fi + +fi +if test .$enable_snmp_rfc != .yes -a .$enable_snmp_rfcv3 != yes; then : + + if test .$enable_snmp_reply_v3_for_v2 = .yes; then : + as_fn_error $? "enable-snmp-reply-v3-for-v2 requires enable-snmp-rfcv3 or enable-snmp-rfc" "$LINENO" 5 +fi + +fi +if test .$enable_dbus != .yes; then : + + if test .$enable_dbus_create_instance = .yes; then : + as_fn_error $? "enable-dbus-create-instance requires enable-dbus" "$LINENO" 5 +fi + +fi +if test .$enable_lvs = .no; then : + if test .$enable_regex = .yes; then : + as_fn_error $? "enable-regex requires lvs" "$LINENO" 5 +fi + if test .$enable_libnl_dynamic = .yes; then : + as_fn_error $? "enable-libnl-dynamic requires lvs" "$LINENO" 5 +fi + if test .$enable_libnl = .no; then : + as_fn_error $? "disable-libnl requires lvs" "$LINENO" 5 +fi + if test .$enable_lvs_syncd = .no; then : + as_fn_error $? "disable-lvs-syncd requires lvs" "$LINENO" 5 +fi + if test .$enable_lvs_64bit_stats = .no; then : + as_fn_error $? "disable-lvs-64bit-stats requires lvs" "$LINENO" 5 +fi + if test .$enable_fwmark = .yes; then : + as_fn_error $? "enable-fwmark requires lvs" "$LINENO" 5 +fi + ] +fi +if test .$enable_regex != .yes; then : + if test .$enable_regex_timers = .yes; then : + as_fn_error $? "enable-regex-timers requires enable-regex" "$LINENO" 5 +fi + if test .$enable_regex_debug = .yes; then : + as_fn_error $? "enable-regex-debug requires enable-regex" "$LINENO" 5 +fi + ] +fi + +if test "$enable_conversion_checks" = yes; then + # Check if we can sensibly enable -Wconversion + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable -Wconversion" >&5 +$as_echo_n "checking for usable -Wconversion... " >&6; } + SAV_CFLAGS="$CFLAGS" + CFLAGS="-Wconversion -O2 -Wp,-D_FORTIFY_SOURCE=2 -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + #include + #include + #include + #include + + #define VAL 255 + + static void + fun(uint8_t val) + { + } + + int main(int argc, char**argv) + { + fd_set set; + uint8_t val = 42; + unsigned u; + bool b; + size_t size = 17; + char c[2]; + char *c_ptr = c; + struct rtattr rta; + struct rtattr *rta_p = &rta; + + FD_SET(argc+1, &set); + + fun(argc == VAL ? VAL : val); + + // vrrp->lower_prio_no_advert = vrrp->strict_mode ? true : global_data->vrrp_lower_prio_no_advert; + u = u ? true : b; + + size = RTA_LENGTH(size); + c_ptr = RTA_DATA(c_ptr); + rta_p = RTA_NEXT(rta_p, size); + + val = (u < 256 ) ? u & 0xff : 0; + } + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + KA_CFLAGS="$KA_CFLAGS -Wconversion" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: -Wconversion is not sensible with this compiler. Use --enable-force-conversion-checks to override." >&5 +$as_echo "$as_me: WARNING: -Wconversion is not sensible with this compiler. Use --enable-force-conversion-checks to override." >&2;} + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$SAV_CFLAGS" +elif test "$enable_force_conversion_checks" = yes; then + KA_CFLAGS="$KA_CFLAGS -Wconversion" +fi + +if test "$enable_Werror" = yes; then + KA_CFLAGS="$KA_CFLAGS -Werror" +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wimplicit-fallthrough" >&5 +$as_echo_n "checking for -Wimplicit-fallthrough... " >&6; } +SAV_CFLAGS="$CFLAGS" +CFLAGS="-Wimplicit-fallthrough=3" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + int main(int argc, char**argv) + { + } + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + KA_CFLAGS="$KA_CFLAGS -Wimplicit-fallthrough=3" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +CFLAGS="$SAV_CFLAGS" + +STRICT_CONFIG=No +if test "$enable_strict_config_checks" = yes; then + +$as_echo "#define _STRICT_CONFIG_ 1 " >>confdefs.h + + STRICT_CONFIG=Yes + CONFIG_OPTIONS="$CONFIG_OPTIONS STRICT_CONFIG" +fi + +if test "$enable_hardening" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIE support" >&5 +$as_echo_n "checking for PIE support... " >&6; } + SAV_CFLAGS="$CFLAGS" + SAV_LDFLAGS="$LDFLAGS" + CFLAGS="$CFLAGS -fPIE" + LDFLAGS="$LDFLAGS -pie" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + int main(int argc, char **argv) + { + int i = 0; + } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + KA_CFLAGS="$KA_CFLAGS -fPIE" + KA_LDFLAGS="$KA_LDFLAGS -pie" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS=$SAV_CFLAGS + LDFLAGS=$SAV_LDFLAGS + + for FLAG in \ + "-Wformat -Werror=format-security" \ + "-Wp,-D_FORTIFY_SOURCE=2" \ + "-fexceptions" \ + "-fstack-protector-strong" \ + "--param=ssp-buffer-size=4" \ + "-grecord-gcc-switches" + do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $FLAG support" >&5 +$as_echo_n "checking for $FLAG support... " >&6; } + CFLAGS="$CFLAGS $FLAG" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + KA_CFLAGS="$KA_CFLAGS $FLAG" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$SAV_CFLAGS + done + + WL_FLAGS= + for FLAG in \ + "-z,relro" \ + "-z,now" + do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,$FLAG support" >&5 +$as_echo_n "checking for -Wl,$FLAG support... " >&6; } + LDFLAGS="$LDFLAGS -Wl,$FLAG" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + int main(int argc, char **argv) + { + int i = 0; + } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ( + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + WL_FLAGS="$WL_FLAGS,$FLAG" + ) +else + ( + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ) + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS=$SAV_CFLAGS + done + if test -n "$WL_FLAGS"; then + KA_LDFLAGS="$KA_LDFLAGS -Wl$WL_FLAGS" + fi +fi + +# enable-optimise +if test "$enable_optimise" = yes -o "$enable_optimise" = not-specified; then : + optimise_level=2 +else + optimise_level=$enable_optimise +fi +if test "$enable_optimise" = no; then : + optimise_level=0 +fi +if test "$optimise_level" -eq 0; then : + + echo $KA_CFLAGS | $GREP -q -- "-D_FORTIFY_SOURCE=[^0]" + if test $ret -eq 0; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --disable-optimise requires --disable-hardening" >&5 +$as_echo "$as_me: WARNING: --disable-optimise requires --disable-hardening" >&2;} +fi + +fi +FLAG="-O$optimise_level" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $FLAG support" >&5 +$as_echo_n "checking for $FLAG support... " >&6; } +SAV_CFLAGS=$CFLAGS +CFLAGS="$CFLAGS $FLAG" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + KA_CFLAGS="$KA_CFLAGS $FLAG" +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + if test "$enable_optimise" != not-specified; then : + as_fn_error $? "Invalid optimisation level specified" "$LINENO" 5 +fi + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +CFLAGS=$SAV_CFLAGS + + + + + +# AC_SUBST(KA_LIBTOOLFLAGS) + +# Checks for libraries. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() requires -lrt" >&5 +$as_echo_n "checking for clock_gettime() requires -lrt... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + int main(int argc, char **argv) + { + int i; + struct timespec ts; + + i = clock_gettime(CLOCK_MONOTONIC, &ts); + } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +else + + SAV_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -lrt" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + int main(int argc, char **argv) + { + int i; + struct timespec ts; + + i = clock_gettime(CLOCK_MONOTONIC, &ts); + } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + KA_LIBS="$KA_LIBS -lrt" +else + as_fn_error $? "clock_gettime() not supported" "$LINENO" 5 +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$SAV_LDFLAGS + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +# Checks for header files. +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/prctl.h sys/socket.h sys/time.h syslog.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +else + as_fn_error $? "Missing/unusable system header file <$ac_header>" "$LINENO" 5 +fi + +done + + +# check for kernel headers +SAV_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $kernelinc" +NETLINK_EXTRA_INCLUDE= +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "#include +" +if test "x$ac_cv_header_linux_netlink_h" = xyes; then : + + +$as_echo "#define NETLINK_H_NEEDS_SYS_SOCKET_H 1 " >>confdefs.h + + NETLINK_EXTRA_INCLUDE="#include " + +else + as_fn_error $? "Missing/unusable kernel header file " "$LINENO" 5 +fi + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +RTNETLINK_EXTRA_INCLUDE= +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_fn_c_check_header_compile "$LINENO" "linux/rtnetlink.h" "ac_cv_header_linux_rtnetlink_h" "#include +" +if test "x$ac_cv_header_linux_rtnetlink_h" = xyes; then : + + +$as_echo "#define RTNETLINK_H_NEEDS_SYS_SOCKET_H 1 " >>confdefs.h + + RTNETLINK_EXTRA_INCLUDE="#include " + +else + as_fn_error $? "Missing/unusable kernel header file " "$LINENO" 5 +fi + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +for ac_header in asm/types.h linux/ethtool.h linux/icmpv6.h linux/if_ether.h linux/if_packet.h linux/ip.h linux/sockios.h linux/types.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +else + as_fn_error $? "Missing/unusable kernel header file <$ac_header>" "$LINENO" 5 +fi + +done + +for ac_header in linux/fib_rules.h linux/if_addr.h linux/if_link.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$NETLINK_EXTRA_INCLUDE +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +else + as_fn_error $? "Missing/unusable kernel header file <$ac_header>" "$LINENO" 5 +fi + +done + +for ac_header in linux/if_arp.h +do : + ac_fn_c_check_header_compile "$LINENO" "linux/if_arp.h" "ac_cv_header_linux_if_arp_h" "#include +" +if test "x$ac_cv_header_linux_if_arp_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LINUX_IF_ARP_H 1 +_ACEOF + +else + as_fn_error $? "Missing/unusable <$ac_header>" "$LINENO" 5 +fi + +done + +CPPFLAGS="$SAV_CPPFLAGS" + +# Checks for typedefs, structures, and compiler characteristics. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 +$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } +if ${ac_cv_header_stdbool_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #ifndef bool + "error: bool is not defined" + #endif + #ifndef false + "error: false is not defined" + #endif + #if false + "error: false is not 0" + #endif + #ifndef true + "error: true is not defined" + #endif + #if true != 1 + "error: true is not 1" + #endif + #ifndef __bool_true_false_are_defined + "error: __bool_true_false_are_defined is not defined" + #endif + + struct s { _Bool s: 1; _Bool t; } s; + + char a[true == 1 ? 1 : -1]; + char b[false == 0 ? 1 : -1]; + char c[__bool_true_false_are_defined == 1 ? 1 : -1]; + char d[(bool) 0.5 == true ? 1 : -1]; + /* See body of main program for 'e'. */ + char f[(_Bool) 0.0 == false ? 1 : -1]; + char g[true]; + char h[sizeof (_Bool)]; + char i[sizeof s.t]; + enum { j = false, k = true, l = false * true, m = true * 256 }; + /* The following fails for + HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ + _Bool n[m]; + char o[sizeof n == m * sizeof n[0] ? 1 : -1]; + char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; + /* Catch a bug in an HP-UX C compiler. See + http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + */ + _Bool q = true; + _Bool *pq = &q; + +int +main () +{ + + bool e = &s; + *pq |= q; + *pq |= ! q; + /* Refer to every declared value, to avoid compiler optimizations. */ + return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + + !m + !n + !o + !p + !q + !pq); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdbool_h=yes +else + ac_cv_header_stdbool_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 +$as_echo "$ac_cv_header_stdbool_h" >&6; } + ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" +if test "x$ac_cv_type__Bool" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE__BOOL 1 +_ACEOF + + +fi + + +if test $ac_cv_header_stdbool_h = yes; then + +$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if ${ac_cv_c_inline+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_inline=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + +ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t" +case $ac_cv_c_int64_t in #( + no|yes) ;; #( + *) + +cat >>confdefs.h <<_ACEOF +#define int64_t $ac_cv_c_int64_t +_ACEOF +;; +esac + +ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +if test "x$ac_cv_type_pid_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + +ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t" +case $ac_cv_c_uint16_t in #( + no|yes) ;; #( + *) + + +cat >>confdefs.h <<_ACEOF +#define uint16_t $ac_cv_c_uint16_t +_ACEOF +;; + esac + +ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" +case $ac_cv_c_uint32_t in #( + no|yes) ;; #( + *) + +$as_echo "#define _UINT32_T 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +#define uint32_t $ac_cv_c_uint32_t +_ACEOF +;; + esac + +ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t" +case $ac_cv_c_uint64_t in #( + no|yes) ;; #( + *) + +$as_echo "#define _UINT64_T 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +#define uint64_t $ac_cv_c_uint64_t +_ACEOF +;; + esac + +ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" +case $ac_cv_c_uint8_t in #( + no|yes) ;; #( + *) + +$as_echo "#define _UINT8_T 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +#define uint8_t $ac_cv_c_uint8_t +_ACEOF +;; + esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if ${ac_cv_c_const+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + +#ifndef __cplusplus + /* Ultrix mips cc rejects this sort of thing. */ + typedef int charset[2]; + const charset cs = { 0, 0 }; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_const=yes +else + ac_cv_c_const=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +$as_echo "#define const /**/" >>confdefs.h + +fi + + +# Checks for library functions. +for ac_header in vfork.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" +if test "x$ac_cv_header_vfork_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_VFORK_H 1 +_ACEOF + +fi + +done + +for ac_func in fork vfork +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +if test "x$ac_cv_func_fork" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 +$as_echo_n "checking for working fork... " >&6; } +if ${ac_cv_func_fork_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_fork_works=cross +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* By Ruediger Kuhlmann. */ + return fork () < 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_fork_works=yes +else + ac_cv_func_fork_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 +$as_echo "$ac_cv_func_fork_works" >&6; } + +else + ac_cv_func_fork_works=$ac_cv_func_fork +fi +if test "x$ac_cv_func_fork_works" = xcross; then + case $host in + *-*-amigaos* | *-*-msdosdjgpp*) + # Override, as these systems have only a dummy fork() stub + ac_cv_func_fork_works=no + ;; + *) + ac_cv_func_fork_works=yes + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 +$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} +fi +ac_cv_func_vfork_works=$ac_cv_func_vfork +if test "x$ac_cv_func_vfork" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 +$as_echo_n "checking for working vfork... " >&6; } +if ${ac_cv_func_vfork_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_vfork_works=cross +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Thanks to Paul Eggert for this test. */ +$ac_includes_default +#include +#ifdef HAVE_VFORK_H +# include +#endif +/* On some sparc systems, changes by the child to local and incoming + argument registers are propagated back to the parent. The compiler + is told about this with #include , but some compilers + (e.g. gcc -O) don't grok . Test for this by using a + static variable whose address is put into a register that is + clobbered by the vfork. */ +static void +#ifdef __cplusplus +sparc_address_test (int arg) +# else +sparc_address_test (arg) int arg; +#endif +{ + static pid_t child; + if (!child) { + child = vfork (); + if (child < 0) { + perror ("vfork"); + _exit(2); + } + if (!child) { + arg = getpid(); + write(-1, "", 0); + _exit (arg); + } + } +} + +int +main () +{ + pid_t parent = getpid (); + pid_t child; + + sparc_address_test (0); + + child = vfork (); + + if (child == 0) { + /* Here is another test for sparc vfork register problems. This + test uses lots of local variables, at least as many local + variables as main has allocated so far including compiler + temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris + 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should + reuse the register of parent for one of the local variables, + since it will think that parent can't possibly be used any more + in this routine. Assigning to the local variable will thus + munge parent in the parent process. */ + pid_t + p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), + p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); + /* Convince the compiler that p..p7 are live; otherwise, it might + use the same hardware register for all 8 local variables. */ + if (p != p1 || p != p2 || p != p3 || p != p4 + || p != p5 || p != p6 || p != p7) + _exit(1); + + /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent + from child file descriptors. If the child closes a descriptor + before it execs or exits, this munges the parent's descriptor + as well. Test for this by closing stdout in the child. */ + _exit(close(fileno(stdout)) != 0); + } else { + int status; + struct stat st; + + while (wait(&status) != child) + ; + return ( + /* Was there some problem with vforking? */ + child < 0 + + /* Did the child fail? (This shouldn't happen.) */ + || status + + /* Did the vfork/compiler bug occur? */ + || parent != getpid() + + /* Did the file descriptor bug occur? */ + || fstat(fileno(stdout), &st) != 0 + ); + } +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_vfork_works=yes +else + ac_cv_func_vfork_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 +$as_echo "$ac_cv_func_vfork_works" >&6; } + +fi; +if test "x$ac_cv_func_fork_works" = xcross; then + ac_cv_func_vfork_works=$ac_cv_func_vfork + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 +$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} +fi + +if test "x$ac_cv_func_vfork_works" = xyes; then + +$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h + +else + +$as_echo "#define vfork fork" >>confdefs.h + +fi +if test "x$ac_cv_func_fork_works" = xyes; then + +$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h + +fi + +for ac_header in stdlib.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDLIB_H 1 +_ACEOF + +fi + +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 +$as_echo_n "checking for GNU libc compatible malloc... " >&6; } +if ${ac_cv_func_malloc_0_nonnull+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_malloc_0_nonnull=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined STDC_HEADERS || defined HAVE_STDLIB_H +# include +#else +char *malloc (); +#endif + +int +main () +{ +return ! malloc (0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_malloc_0_nonnull=yes +else + ac_cv_func_malloc_0_nonnull=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 +$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } +if test $ac_cv_func_malloc_0_nonnull = yes; then : + +$as_echo "#define HAVE_MALLOC 1" >>confdefs.h + +else + $as_echo "#define HAVE_MALLOC 0" >>confdefs.h + + case " $LIBOBJS " in + *" malloc.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS malloc.$ac_objext" + ;; +esac + + +$as_echo "#define malloc rpl_malloc" >>confdefs.h + +fi + + +for ac_header in stdlib.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDLIB_H 1 +_ACEOF + +fi + +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 +$as_echo_n "checking for GNU libc compatible realloc... " >&6; } +if ${ac_cv_func_realloc_0_nonnull+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_realloc_0_nonnull=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined STDC_HEADERS || defined HAVE_STDLIB_H +# include +#else +char *realloc (); +#endif + +int +main () +{ +return ! realloc (0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_realloc_0_nonnull=yes +else + ac_cv_func_realloc_0_nonnull=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 +$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } +if test $ac_cv_func_realloc_0_nonnull = yes; then : + +$as_echo "#define HAVE_REALLOC 1" >>confdefs.h + +else + $as_echo "#define HAVE_REALLOC 0" >>confdefs.h + + case " $LIBOBJS " in + *" realloc.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS realloc.$ac_objext" + ;; +esac + + +$as_echo "#define realloc rpl_realloc" >>confdefs.h + +fi + + +for ac_func in dup2 getcwd gettimeofday memmove memset select setenv socket strcasecmp strchr strdup strerror strpbrk strstr strtol strtoul uname +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +for ac_func in pipe2 +do : + ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" +if test "x$ac_cv_func_pipe2" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PIPE2 1 +_ACEOF + SYSTEM_OPTIONS="$SYSTEM_OPTIONS PIPE2" +fi +done + +for ac_func in signalfd +do : + ac_fn_c_check_func "$LINENO" "signalfd" "ac_cv_func_signalfd" +if test "x$ac_cv_func_signalfd" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SIGNALFD 1 +_ACEOF + SYSTEM_OPTIONS="$SYSTEM_OPTIONS SIGNALFD" +fi +done + +for ac_func in inotify_init1 +do : + ac_fn_c_check_func "$LINENO" "inotify_init1" "ac_cv_func_inotify_init1" +if test "x$ac_cv_func_inotify_init1" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_INOTIFY_INIT1 1 +_ACEOF + SYSTEM_OPTIONS="$SYSTEM_OPTIONS INOTIFY_INIT1" +fi +done + +for ac_func in vsyslog +do : + ac_fn_c_check_func "$LINENO" "vsyslog" "ac_cv_func_vsyslog" +if test "x$ac_cv_func_vsyslog" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_VSYSLOG 1 +_ACEOF + SYSTEM_OPTIONS="$SYSTEM_OPTIONS VSYSLOG" +fi +done + +for ac_func in epoll_create1 +do : + ac_fn_c_check_func "$LINENO" "epoll_create1" "ac_cv_func_epoll_create1" +if test "x$ac_cv_func_epoll_create1" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_EPOLL_CREATE1 1 +_ACEOF + SYSTEM_OPTIONS="$SYSTEM_OPTIONS EPOLL_CREATE1" +fi +done + + +# glibc uses unsigned int as 3rd parameter to __assert_fail(), musl uses int. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + + void __assert_fail(const char * a, const char *b, unsigned int l, const char *c) + { + exit(a[0] + b[0] + c[0] + l == 0); + } + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + LINE_type="unsigned int" +else + LINE_type="int" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +cat >>confdefs.h <<_ACEOF +#define LINE_type $LINE_type +_ACEOF + + +SAV_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -Wattributes -Werror" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + static __always_inline int + test_func(int val) + { + return val; + } + + int + main(int argc, char **argv) + { + int val = test_func(3); + } + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + static __inline __attribute__ ((__always_inline__)) int + test_func(int val) + { + return val; + } + + int + main(int argc, char **argv) + { + int val = test_func(3); + } + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +$as_echo "#define __always_inline __inline __attribute__ ((__always_inline__))" >>confdefs.h + +else + +$as_echo "#define __always_inline inline" >>confdefs.h + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +CFLAGS="$SAV_CFLAGS" + +SAV_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -Wformat -Werror" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + int + main(int argc, char **argv) + { + rlim_t val = 23U; + printf("%llu", val); + } + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +$as_echo "#define PRI_rlim_t \"llu\"" >>confdefs.h + +else + +$as_echo "#define PRI_rlim_t \"lu\"" >>confdefs.h + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +CFLAGS="$SAV_CFLAGS" + +if test "$enable_dynamic_linking"; then : + + if test .$enable_vrrp != .no; then : + + enable_libiptc_dynamic=$enable_dynamic_linking + enable_libipset_dynamic=$enable_dynamic_linking + enable_libxtables_dynamic=$enable_dynamic_linking + +fi + if test .$enable_vrrp != .no; then : + + enable_libnl_dynamic=$enable_dynamic_linking + +fi + +fi + +# check for missing definition - added in glibc 2.8 +ac_fn_c_check_decl "$LINENO" "ETHERTYPE_IPV6" "ac_cv_have_decl_ETHERTYPE_IPV6" "#include +" +if test "x$ac_cv_have_decl_ETHERTYPE_IPV6" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ETHERTYPE_IPV6 $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + +else + + +$as_echo "#define ETHERTYPE_IPV6 0x86dd" >>confdefs.h + + +fi + + +BUILD_GENHASH=Yes +# check for openssl headers +NEED_MD5=no +NEED_SSL=no +if test "$enable_vrrp" != no -a \ + "$enable_vrrp_auth" != no; then + NEED_MD5=yes +fi +if test "$enable_lvs" != no; then + NEED_MD5=yes + NEED_SSL=yes +fi +for ac_header in openssl/ssl.h openssl/err.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +else + + if test $NEED_SSL = yes; then + as_fn_error $? " + !!! OpenSSL is not properly installed on your system. !!! + !!! Can not include OpenSSL headers files. !!!" "$LINENO" 5 + fi + BUILD_GENHASH=No + NEED_SSL=no + break + +fi + +done + +for ac_header in openssl/md5.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "openssl/md5.h" "ac_cv_header_openssl_md5_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_md5_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OPENSSL_MD5_H 1 +_ACEOF + +else + + if test $NEED_MD5 = yes; then + as_fn_error $? " + !!! OpenSSL is not properly installed on your system. !!! + !!! Can not include OpenSSL MD5 headers files. !!!" "$LINENO" 5 + fi + BUILD_GENHASH=No + NEED_MD5=no + break + +fi + +done + +unset LIBS + +$PKG_CONFIG --exists openssl +if test $? -eq 0; then + if test -n "OPENSSL"; then + KA_PKG_PFX=OPENSSL + else + KA_PKG_PFX=KA + fi + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CPPFLAGS + for item in `$PKG_CONFIG --cflags-only-I openssl`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CPPFLAGS=\"\$${KA_PKG_PFX}_CPPFLAGS $ADD_NEW\" + + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CFLAGS + for item in `$PKG_CONFIG --cflags-only-other openssl`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CFLAGS=\"\$${KA_PKG_PFX}_CFLAGS $ADD_NEW\" + + + if test . = .remove-requires; then + REQUIRES=`$PKG_CONFIG --print-requires openssl` + var=`$PKG_CONFIG --libs-only-l openssl` + for r in $REQUIRES; do + REQ_LIBS=`$PKG_CONFIG --libs-only-l $r` + for l in $REQ_LIBS; do + var=`echo " $var " | sed -e "s: $l : :g"` + done + done + var=`echo $var | sed -e "s:^ *::" -e "s: *$::"` + eval ${KA_PKG_PFX}_LIBS="\"$var\"" + + var=`echo $var | sed -e "s/-l//g"` + eval ${KA_PKG_PFX}_LIB_NAMES="\"$var\"" + else + ADD_NEW= + eval var=\$${KA_PKG_PFX}_LIBS + for item in `$PKG_CONFIG --libs openssl`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_LIBS=\"\$${KA_PKG_PFX}_LIBS $ADD_NEW\" + + fi + +else + OPENSSL_LIBS="-lssl -lcrypto" +fi + +EXTRA_LIBS=`echo $OPENSSL_LIBS | sed -e "s/-lcrypto//"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MD5_Init in -lcrypto" >&5 +$as_echo_n "checking for MD5_Init in -lcrypto... " >&6; } +if ${ac_cv_lib_crypto_MD5_Init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $EXTRA_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char MD5_Init (); +int +main () +{ +return MD5_Init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_crypto_MD5_Init=yes +else + ac_cv_lib_crypto_MD5_Init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_MD5_Init" >&5 +$as_echo "$ac_cv_lib_crypto_MD5_Init" >&6; } +if test "x$ac_cv_lib_crypto_MD5_Init" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBCRYPTO 1 +_ACEOF + + LIBS="-lcrypto $LIBS" + +else + + if test $NEED_MD5 = yes; then + as_fn_error $? "OpenSSL MD5 libraries are required" "$LINENO" 5 + fi + BUILD_GENHASH=No + +fi + +if test $NEED_MD5 = yes; then + KA_LIBS="$KA_LIBS $LIBS" +fi +GENHASH_LIBS="$GENHASH_LIBS $LIBS" +unset LIBS + +EXTRA_LIBS=`echo $OPENSSL_LIBS | sed -e "s/-lssl//"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_new in -lssl" >&5 +$as_echo_n "checking for SSL_CTX_new in -lssl... " >&6; } +if ${ac_cv_lib_ssl_SSL_CTX_new+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lssl $EXTRA_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char SSL_CTX_new (); +int +main () +{ +return SSL_CTX_new (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ssl_SSL_CTX_new=yes +else + ac_cv_lib_ssl_SSL_CTX_new=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_CTX_new" >&5 +$as_echo "$ac_cv_lib_ssl_SSL_CTX_new" >&6; } +if test "x$ac_cv_lib_ssl_SSL_CTX_new" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSSL 1 +_ACEOF + + LIBS="-lssl $LIBS" + +else + + if test $NEED_SSL = yes; then + as_fn_error $? "OpenSSL libraries are required" "$LINENO" 5 + fi + BUILD_GENHASH=No + +fi + +if test $NEED_SSL = yes; then + KA_LIBS="$KA_LIBS $LIBS" +fi +GENHASH_LIBS="$GENHASH_LIBS $LIBS" + +# Introduced in OpenSSL ver 0.9.9 +LIBS=$OPENSSL_LIBS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SSL_set_tlsext_host_name() - may be a definition" >&5 +$as_echo_n "checking SSL_set_tlsext_host_name() - may be a definition... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + int main(void) + { + request_t req; + SSL_set_tlsext_host_name(req.ssl, "SSL"); + } + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define _HAVE_SSL_SET_TLSEXT_HOST_NAME_ 1 " >>confdefs.h + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +# SSL_CTX_set_verify_depth() introduced OpenSSL v0.9.5a +for ac_func in SSL_CTX_set_verify_depth +do : + ac_fn_c_check_func "$LINENO" "SSL_CTX_set_verify_depth" "ac_cv_func_SSL_CTX_set_verify_depth" +if test "x$ac_cv_func_SSL_CTX_set_verify_depth" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SSL_CTX_SET_VERIFY_DEPTH 1 +_ACEOF + +fi +done + + +# SSL_set0_rbio(), SSL_set0_wbio() and OPENSSL_init_crypto() introduced OpenSSL v1.1.0 +for ac_func in SSL_set0_rbio OPENSSL_init_crypto +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +# TLS_method() introduced OpenSSL v1.1.0 +for ac_func in TLS_method +do : + ac_fn_c_check_func "$LINENO" "TLS_method" "ac_cv_func_TLS_method" +if test "x$ac_cv_func_TLS_method" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_TLS_METHOD 1 +_ACEOF + +fi +done + + +unset LIBS + +if test $BUILD_GENHASH = No; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Unable to build genhash due to missing openssl headers/libraries" >&5 +$as_echo "$as_me: Unable to build genhash due to missing openssl headers/libraries" >&6;} + GENHASH_LIBS= +fi + + if test $BUILD_GENHASH = Yes; then + BUILD_GENHASH_TRUE= + BUILD_GENHASH_FALSE='#' +else + BUILD_GENHASH_TRUE='#' + BUILD_GENHASH_FALSE= +fi + + +IPV4_DEVCONF=No +if test .$enable_vrrp != .no; then + SAV_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPP_FLAGS $kernelinc" + IPV4_DEVCONF=Yes + ac_fn_c_check_decl "$LINENO" "IPV4_DEVCONF_ARP_IGNORE" "ac_cv_have_decl_IPV4_DEVCONF_ARP_IGNORE" "#include +" +if test "x$ac_cv_have_decl_IPV4_DEVCONF_ARP_IGNORE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IPV4_DEVCONF_ARP_IGNORE $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + +else + + IPV4_DEVCONF=No + break + +fi +ac_fn_c_check_decl "$LINENO" "IPV4_DEVCONF_ACCEPT_LOCAL" "ac_cv_have_decl_IPV4_DEVCONF_ACCEPT_LOCAL" "#include +" +if test "x$ac_cv_have_decl_IPV4_DEVCONF_ACCEPT_LOCAL" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IPV4_DEVCONF_ACCEPT_LOCAL $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + +else + + IPV4_DEVCONF=No + break + +fi +ac_fn_c_check_decl "$LINENO" "IPV4_DEVCONF_RP_FILTER" "ac_cv_have_decl_IPV4_DEVCONF_RP_FILTER" "#include +" +if test "x$ac_cv_have_decl_IPV4_DEVCONF_RP_FILTER" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IPV4_DEVCONF_RP_FILTER $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + +else + + IPV4_DEVCONF=No + break + +fi +ac_fn_c_check_decl "$LINENO" "IPV4_DEVCONF_ARPFILTER" "ac_cv_have_decl_IPV4_DEVCONF_ARPFILTER" "#include +" +if test "x$ac_cv_have_decl_IPV4_DEVCONF_ARPFILTER" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IPV4_DEVCONF_ARPFILTER $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + +else + + IPV4_DEVCONF=No + break + +fi + + if test $IPV4_DEVCONF = Yes; then + +$as_echo "#define _HAVE_IPV4_DEVCONF_ 1 " >>confdefs.h + + SYSTEM_OPTIONS="$SYSTEM_OPTIONS IPV4_DEVCONF" + fi + for ac_header in linux/rtnetlink.h +do : + ac_fn_c_check_header_compile "$LINENO" "linux/rtnetlink.h" "ac_cv_header_linux_rtnetlink_h" "$RTNETLINK_EXTRA_INCLUDE +" +if test "x$ac_cv_header_linux_rtnetlink_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LINUX_RTNETLINK_H 1 +_ACEOF + +else + as_fn_error $? "Unusable linux/rtnetlink.h" "$LINENO" 5 +fi + +done + + CPPFLAGS="$SAV_CPPFLAGS" +fi + +NETLINK_VER=0 +IPVS_USE_NL=No +if test .$enable_lvs != .no -a .${enable_libnl} != .no; then + $PKG_CONFIG --exists libnl-3.0 + if test $? -eq 0; then + if test -n "NL3"; then + KA_PKG_PFX=NL3 + else + KA_PKG_PFX=KA + fi + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CPPFLAGS + for item in `$PKG_CONFIG --cflags-only-I libnl-3.0`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CPPFLAGS=\"\$${KA_PKG_PFX}_CPPFLAGS $ADD_NEW\" + + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CFLAGS + for item in `$PKG_CONFIG --cflags-only-other libnl-3.0`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CFLAGS=\"\$${KA_PKG_PFX}_CFLAGS $ADD_NEW\" + + + if test .remove-requires = .remove-requires; then + REQUIRES=`$PKG_CONFIG --print-requires libnl-3.0` + var=`$PKG_CONFIG --libs-only-l libnl-3.0` + for r in $REQUIRES; do + REQ_LIBS=`$PKG_CONFIG --libs-only-l $r` + for l in $REQ_LIBS; do + var=`echo " $var " | sed -e "s: $l : :g"` + done + done + var=`echo $var | sed -e "s:^ *::" -e "s: *$::"` + eval ${KA_PKG_PFX}_LIBS="\"$var\"" + + var=`echo $var | sed -e "s/-l//g"` + eval ${KA_PKG_PFX}_LIB_NAMES="\"$var\"" + else + ADD_NEW= + eval var=\$${KA_PKG_PFX}_LIBS + for item in `$PKG_CONFIG --libs libnl-3.0`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_LIBS=\"\$${KA_PKG_PFX}_LIBS $ADD_NEW\" + + fi + + as_ac_Lib=`$as_echo "ac_cv_lib_$NL3_LIB_NAMES''_nl_socket_alloc" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -l$NL3_LIB_NAMES" >&5 +$as_echo_n "checking for nl_socket_alloc in -l$NL3_LIB_NAMES... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-l$NL3_LIB_NAMES $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char nl_socket_alloc (); +int +main () +{ +return nl_socket_alloc (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$as_ac_Lib=yes" +else + eval "$as_ac_Lib=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +eval ac_res=\$$as_ac_Lib + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + + NETLINK_VER=3 + NEED_NL3=No + + if test -n "GENL"; then + KA_PKG_PFX=GENL + else + KA_PKG_PFX=KA + fi + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CPPFLAGS + for item in `$PKG_CONFIG --cflags-only-I libnl-genl-3.0`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CPPFLAGS=\"\$${KA_PKG_PFX}_CPPFLAGS $ADD_NEW\" + + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CFLAGS + for item in `$PKG_CONFIG --cflags-only-other libnl-genl-3.0`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CFLAGS=\"\$${KA_PKG_PFX}_CFLAGS $ADD_NEW\" + + + if test .remove-requires = .remove-requires; then + REQUIRES=`$PKG_CONFIG --print-requires libnl-genl-3.0` + var=`$PKG_CONFIG --libs-only-l libnl-genl-3.0` + for r in $REQUIRES; do + REQ_LIBS=`$PKG_CONFIG --libs-only-l $r` + for l in $REQ_LIBS; do + var=`echo " $var " | sed -e "s: $l : :g"` + done + done + var=`echo $var | sed -e "s:^ *::" -e "s: *$::"` + eval ${KA_PKG_PFX}_LIBS="\"$var\"" + + var=`echo $var | sed -e "s/-l//g"` + eval ${KA_PKG_PFX}_LIB_NAMES="\"$var\"" + else + ADD_NEW= + eval var=\$${KA_PKG_PFX}_LIBS + for item in `$PKG_CONFIG --libs libnl-genl-3.0`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_LIBS=\"\$${KA_PKG_PFX}_LIBS $ADD_NEW\" + + fi + + as_ac_Lib=`$as_echo "ac_cv_lib_$GENL_LIB_NAMES''_genl_connect" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for genl_connect in -l$GENL_LIB_NAMES" >&5 +$as_echo_n "checking for genl_connect in -l$GENL_LIB_NAMES... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-l$GENL_LIB_NAMES $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char genl_connect (); +int +main () +{ +return genl_connect (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$as_ac_Lib=yes" +else + eval "$as_ac_Lib=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +eval ac_res=\$$as_ac_Lib + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_LIB$GENL_LIB_NAMES" | $as_tr_cpp` 1 +_ACEOF + + LIBS="-l$GENL_LIB_NAMES $LIBS" + +else + as_fn_error $? "libnl-3 is installed but not libnl-gen-3. Please, install libnl-gen-3/libnl-genl-3." "$LINENO" 5 +fi + + IPVS_USE_NL=Yes + if test .$enable_libnl_dynamic = .yes; then + if test -n ""; then + KA_PKG_PFX= + else + KA_PKG_PFX=KA + fi + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CPPFLAGS + for item in $($PKG_CONFIG --cflags-only-I libnl-genl-3.0); do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CPPFLAGS=\"\$${KA_PKG_PFX}_CPPFLAGS $ADD_NEW\" + + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CFLAGS + for item in $($PKG_CONFIG --cflags-only-other libnl-genl-3.0); do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CFLAGS=\"\$${KA_PKG_PFX}_CFLAGS $ADD_NEW\" + + + + if test $LDD = :; then + as_fn_error $? "ldd is required for dynamic run-time linking support" "$LINENO" 5 + fi + + SAV_LIBS="$LIBS" + LIBS=-l$GENL_LIB_NAMES + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + extern void genl_connect(void); + int main(void) + { + genl_connect(); + return 0; + } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + LIB_DETAILS=`$LDD ./conftest$EXEEXT | grep $GENL_LIB_NAMES.so | sed -e "s/^[ \t]*//"` + LIB_NAME=`echo $LIB_DETAILS | sed -e "s/ .*//"` + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$SAV_LIBS" + + +cat >>confdefs.h <<_ACEOF +#define NL3_GENL_LIB_NAME "$LIB_NAME" +_ACEOF + + else + if test -n ""; then + KA_PKG_PFX= + else + KA_PKG_PFX=KA + fi + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CPPFLAGS + for item in `$PKG_CONFIG --cflags-only-I libnl-genl-3.0`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CPPFLAGS=\"\$${KA_PKG_PFX}_CPPFLAGS $ADD_NEW\" + + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CFLAGS + for item in `$PKG_CONFIG --cflags-only-other libnl-genl-3.0`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CFLAGS=\"\$${KA_PKG_PFX}_CFLAGS $ADD_NEW\" + + + if test . = .remove-requires; then + REQUIRES=`$PKG_CONFIG --print-requires libnl-genl-3.0` + var=`$PKG_CONFIG --libs-only-l libnl-genl-3.0` + for r in $REQUIRES; do + REQ_LIBS=`$PKG_CONFIG --libs-only-l $r` + for l in $REQ_LIBS; do + var=`echo " $var " | sed -e "s: $l : :g"` + done + done + var=`echo $var | sed -e "s:^ *::" -e "s: *$::"` + eval ${KA_PKG_PFX}_LIBS="\"$var\"" + + var=`echo $var | sed -e "s/-l//g"` + eval ${KA_PKG_PFX}_LIB_NAMES="\"$var\"" + else + ADD_NEW= + eval var=\$${KA_PKG_PFX}_LIBS + for item in `$PKG_CONFIG --libs libnl-genl-3.0`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_LIBS=\"\$${KA_PKG_PFX}_LIBS $ADD_NEW\" + + fi + + fi + NEED_NL3=Yes + + if test $NEED_NL3 = Yes; then + +$as_echo "#define _HAVE_LIBNL3_ 1 " >>confdefs.h + + SYSTEM_OPTIONS="$SYSTEM_OPTIONS LIBNL3" + if test .$enable_libnl_dynamic = .yes; then + SYSTEM_OPTIONS="$SYSTEM_OPTIONS LIBNL_DYNAMIC" + if test -n ""; then + KA_PKG_PFX= + else + KA_PKG_PFX=KA + fi + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CPPFLAGS + for item in $($PKG_CONFIG --cflags-only-I libnl-3.0); do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CPPFLAGS=\"\$${KA_PKG_PFX}_CPPFLAGS $ADD_NEW\" + + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CFLAGS + for item in $($PKG_CONFIG --cflags-only-other libnl-3.0); do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CFLAGS=\"\$${KA_PKG_PFX}_CFLAGS $ADD_NEW\" + + + +$as_echo "#define _LIBNL_DYNAMIC_ 1 " >>confdefs.h + + NEED_LIBDL=Yes + + if test $LDD = :; then + as_fn_error $? "ldd is required for dynamic run-time linking support" "$LINENO" 5 + fi + + SAV_LIBS="$LIBS" + LIBS=-l$NL3_LIB_NAMES + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + extern void nl_socket_alloc(void); + int main(void) + { + nl_socket_alloc(); + return 0; + } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + LIB_DETAILS=`$LDD ./conftest$EXEEXT | grep $NL3_LIB_NAMES.so | sed -e "s/^[ \t]*//"` + LIB_NAME=`echo $LIB_DETAILS | sed -e "s/ .*//"` + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$SAV_LIBS" + + +cat >>confdefs.h <<_ACEOF +#define NL3_LIB_NAME "$LIB_NAME" +_ACEOF + + else + if test -n ""; then + KA_PKG_PFX= + else + KA_PKG_PFX=KA + fi + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CPPFLAGS + for item in `$PKG_CONFIG --cflags-only-I libnl-3.0`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CPPFLAGS=\"\$${KA_PKG_PFX}_CPPFLAGS $ADD_NEW\" + + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CFLAGS + for item in `$PKG_CONFIG --cflags-only-other libnl-3.0`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CFLAGS=\"\$${KA_PKG_PFX}_CFLAGS $ADD_NEW\" + + + if test . = .remove-requires; then + REQUIRES=`$PKG_CONFIG --print-requires libnl-3.0` + var=`$PKG_CONFIG --libs-only-l libnl-3.0` + for r in $REQUIRES; do + REQ_LIBS=`$PKG_CONFIG --libs-only-l $r` + for l in $REQ_LIBS; do + var=`echo " $var " | sed -e "s: $l : :g"` + done + done + var=`echo $var | sed -e "s:^ *::" -e "s: *$::"` + eval ${KA_PKG_PFX}_LIBS="\"$var\"" + + var=`echo $var | sed -e "s/-l//g"` + eval ${KA_PKG_PFX}_LIB_NAMES="\"$var\"" + else + ADD_NEW= + eval var=\$${KA_PKG_PFX}_LIBS + for item in `$PKG_CONFIG --libs libnl-3.0`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_LIBS=\"\$${KA_PKG_PFX}_LIBS $ADD_NEW\" + + fi + + fi + fi + +fi + + fi + + if test $NETLINK_VER -eq 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_socket_modify_cb in -lnl" >&5 +$as_echo_n "checking for nl_socket_modify_cb in -lnl... " >&6; } +if ${ac_cv_lib_nl_nl_socket_modify_cb+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char nl_socket_modify_cb (); +int +main () +{ +return nl_socket_modify_cb (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_nl_nl_socket_modify_cb=yes +else + ac_cv_lib_nl_nl_socket_modify_cb=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_nl_socket_modify_cb" >&5 +$as_echo "$ac_cv_lib_nl_nl_socket_modify_cb" >&6; } +if test "x$ac_cv_lib_nl_nl_socket_modify_cb" = xyes; then : + + IPVS_USE_NL=Yes + NETLINK_VER=1 + +$as_echo "#define _HAVE_LIBNL1_ 1 " >>confdefs.h + + SYSTEM_OPTIONS="$SYSTEM_OPTIONS LIBNL1" + if test .$enable_libnl_dynamic = .yes; then + if test -n ""; then + KA_PKG_PFX= + else + KA_PKG_PFX=KA + fi + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CPPFLAGS + for item in $($PKG_CONFIG --cflags-only-I libnl-1); do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CPPFLAGS=\"\$${KA_PKG_PFX}_CPPFLAGS $ADD_NEW\" + + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CFLAGS + for item in $($PKG_CONFIG --cflags-only-other libnl-1); do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CFLAGS=\"\$${KA_PKG_PFX}_CFLAGS $ADD_NEW\" + + + CONFIG_OPTIONS="$CONFIG_OPTIONS LIBNL_DYNAMIC" + +$as_echo "#define _LIBNL_DYNAMIC_ 1 " >>confdefs.h + + NEED_LIBDL=Yes + + if test $LDD = :; then + as_fn_error $? "ldd is required for dynamic run-time linking support" "$LINENO" 5 + fi + + SAV_LIBS="$LIBS" + LIBS=-lnl + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + extern void nl_socket_modify_cb(void); + int main(void) + { + nl_socket_modify_cb(); + return 0; + } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + LIB_DETAILS=`$LDD ./conftest$EXEEXT | grep nl.so | sed -e "s/^[ \t]*//"` + LIB_NAME=`echo $LIB_DETAILS | sed -e "s/ .*//"` + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$SAV_LIBS" + + +cat >>confdefs.h <<_ACEOF +#define NL_LIB_NAME "$LIB_NAME" +_ACEOF + + else + if test -n ""; then + KA_PKG_PFX= + else + KA_PKG_PFX=KA + fi + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CPPFLAGS + for item in `$PKG_CONFIG --cflags-only-I libnl-1`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CPPFLAGS=\"\$${KA_PKG_PFX}_CPPFLAGS $ADD_NEW\" + + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CFLAGS + for item in `$PKG_CONFIG --cflags-only-other libnl-1`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CFLAGS=\"\$${KA_PKG_PFX}_CFLAGS $ADD_NEW\" + + + if test . = .remove-requires; then + REQUIRES=`$PKG_CONFIG --print-requires libnl-1` + var=`$PKG_CONFIG --libs-only-l libnl-1` + for r in $REQUIRES; do + REQ_LIBS=`$PKG_CONFIG --libs-only-l $r` + for l in $REQ_LIBS; do + var=`echo " $var " | sed -e "s: $l : :g"` + done + done + var=`echo $var | sed -e "s:^ *::" -e "s: *$::"` + eval ${KA_PKG_PFX}_LIBS="\"$var\"" + + var=`echo $var | sed -e "s/-l//g"` + eval ${KA_PKG_PFX}_LIB_NAMES="\"$var\"" + else + ADD_NEW= + eval var=\$${KA_PKG_PFX}_LIBS + for item in `$PKG_CONFIG --libs libnl-1`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_LIBS=\"\$${KA_PKG_PFX}_LIBS $ADD_NEW\" + + fi + + fi + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: keepalived will be built without libnl support." >&5 +$as_echo "$as_me: WARNING: keepalived will be built without libnl support." >&2;} + +fi + + fi + + if test $NETLINK_VER -ne 0; then + SAV_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$SAV_CPPFLAGS $NL3_CPPFLAGS" + for ac_header in netlink/netlink.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "netlink/netlink.h" "ac_cv_header_netlink_netlink_h" "$ac_includes_default" +if test "x$ac_cv_header_netlink_netlink_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NETLINK_NETLINK_H 1 +_ACEOF + +else + as_fn_error $? "netlink headers missing" "$LINENO" 5 +fi + +done + + for ac_header in netlink/genl/ctrl.h netlink/genl/genl.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +else + as_fn_error $? "netlink genl headers missing" "$LINENO" 5 +fi + +done + + CPPFLAGS="$SAV_CPPFLAGS" + fi +fi + if test $NETLINK_VER -eq 1; then + LIBNL1_TRUE= + LIBNL1_FALSE='#' +else + LIBNL1_TRUE='#' + LIBNL1_FALSE= +fi + + if test $NETLINK_VER -eq 3; then + LIBNL3_TRUE= + LIBNL3_FALSE='#' +else + LIBNL3_TRUE='#' + LIBNL3_FALSE= +fi + + if test .$enable_lvs != .no -a .$enable_libnl_dynamic = .yes -a $NETLINK_VER -ne 0; then + LIBNL_DYNAMIC_TRUE= + LIBNL_DYNAMIC_FALSE='#' +else + LIBNL_DYNAMIC_TRUE='#' + LIBNL_DYNAMIC_FALSE= +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for magic_open in -lmagic" >&5 +$as_echo_n "checking for magic_open in -lmagic... " >&6; } +if ${ac_cv_lib_magic_magic_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmagic $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char magic_open (); +int +main () +{ +return magic_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_magic_magic_open=yes +else + ac_cv_lib_magic_magic_open=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_magic_magic_open" >&5 +$as_echo "$ac_cv_lib_magic_magic_open" >&6; } +if test "x$ac_cv_lib_magic_magic_open" = xyes; then : + + +$as_echo "#define _HAVE_LIBMAGIC_ 1 " >>confdefs.h + + KA_LIBS="$KA_LIBS -lmagic" + +fi + +unset LIBS + +ac_fn_c_check_decl "$LINENO" "RTA_ENCAP" "ac_cv_have_decl_RTA_ENCAP" "$RTNETLINK_EXTRA_INCLUDES + #include + #include + #include +" +if test "x$ac_cv_have_decl_RTA_ENCAP" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_RTA_ENCAP $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "RTA_EXPIRES" "ac_cv_have_decl_RTA_EXPIRES" "$RTNETLINK_EXTRA_INCLUDES + #include + #include + #include +" +if test "x$ac_cv_have_decl_RTA_EXPIRES" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_RTA_EXPIRES $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "RTA_NEWDST" "ac_cv_have_decl_RTA_NEWDST" "$RTNETLINK_EXTRA_INCLUDES + #include + #include + #include +" +if test "x$ac_cv_have_decl_RTA_NEWDST" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_RTA_NEWDST $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "RTA_PREF" "ac_cv_have_decl_RTA_PREF" "$RTNETLINK_EXTRA_INCLUDES + #include + #include + #include +" +if test "x$ac_cv_have_decl_RTA_PREF" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_RTA_PREF $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "FRA_SUPPRESS_PREFIXLEN" "ac_cv_have_decl_FRA_SUPPRESS_PREFIXLEN" "$RTNETLINK_EXTRA_INCLUDES + #include + #include + #include +" +if test "x$ac_cv_have_decl_FRA_SUPPRESS_PREFIXLEN" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FRA_SUPPRESS_PREFIXLEN $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "FRA_SUPPRESS_IFGROUP" "ac_cv_have_decl_FRA_SUPPRESS_IFGROUP" "$RTNETLINK_EXTRA_INCLUDES + #include + #include + #include +" +if test "x$ac_cv_have_decl_FRA_SUPPRESS_IFGROUP" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FRA_SUPPRESS_IFGROUP $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "FRA_TUN_ID" "ac_cv_have_decl_FRA_TUN_ID" "$RTNETLINK_EXTRA_INCLUDES + #include + #include + #include +" +if test "x$ac_cv_have_decl_FRA_TUN_ID" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FRA_TUN_ID $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "RTAX_CC_ALGO" "ac_cv_have_decl_RTAX_CC_ALGO" "$RTNETLINK_EXTRA_INCLUDES + #include + #include + #include +" +if test "x$ac_cv_have_decl_RTAX_CC_ALGO" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_RTAX_CC_ALGO $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "RTAX_QUICKACK" "ac_cv_have_decl_RTAX_QUICKACK" "$RTNETLINK_EXTRA_INCLUDES + #include + #include + #include +" +if test "x$ac_cv_have_decl_RTAX_QUICKACK" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_RTAX_QUICKACK $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "RTEXT_FILTER_SKIP_STATS" "ac_cv_have_decl_RTEXT_FILTER_SKIP_STATS" "$RTNETLINK_EXTRA_INCLUDES + #include + #include + #include +" +if test "x$ac_cv_have_decl_RTEXT_FILTER_SKIP_STATS" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_RTEXT_FILTER_SKIP_STATS $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "FRA_L3MDEV" "ac_cv_have_decl_FRA_L3MDEV" "$RTNETLINK_EXTRA_INCLUDES + #include + #include + #include +" +if test "x$ac_cv_have_decl_FRA_L3MDEV" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FRA_L3MDEV $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "FRA_UID_RANGE" "ac_cv_have_decl_FRA_UID_RANGE" "$RTNETLINK_EXTRA_INCLUDES + #include + #include + #include +" +if test "x$ac_cv_have_decl_FRA_UID_RANGE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FRA_UID_RANGE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "RTAX_FASTOPEN_NO_COOKIE" "ac_cv_have_decl_RTAX_FASTOPEN_NO_COOKIE" "$RTNETLINK_EXTRA_INCLUDES + #include + #include + #include +" +if test "x$ac_cv_have_decl_RTAX_FASTOPEN_NO_COOKIE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_RTAX_FASTOPEN_NO_COOKIE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "RTA_VIA" "ac_cv_have_decl_RTA_VIA" "$RTNETLINK_EXTRA_INCLUDES + #include + #include + #include +" +if test "x$ac_cv_have_decl_RTA_VIA" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_RTA_VIA $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "FRA_OIFNAME" "ac_cv_have_decl_FRA_OIFNAME" "$RTNETLINK_EXTRA_INCLUDES + #include + #include + #include +" +if test "x$ac_cv_have_decl_FRA_OIFNAME" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FRA_OIFNAME $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "FRA_PROTOCOL" "ac_cv_have_decl_FRA_PROTOCOL" "$RTNETLINK_EXTRA_INCLUDES + #include + #include + #include +" +if test "x$ac_cv_have_decl_FRA_PROTOCOL" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FRA_PROTOCOL $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "FRA_IP_PROTO" "ac_cv_have_decl_FRA_IP_PROTO" "$RTNETLINK_EXTRA_INCLUDES + #include + #include + #include +" +if test "x$ac_cv_have_decl_FRA_IP_PROTO" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FRA_IP_PROTO $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "FRA_SPORT_RANGE" "ac_cv_have_decl_FRA_SPORT_RANGE" "$RTNETLINK_EXTRA_INCLUDES + #include + #include + #include +" +if test "x$ac_cv_have_decl_FRA_SPORT_RANGE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FRA_SPORT_RANGE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "FRA_DPORT_RANGE" "ac_cv_have_decl_FRA_DPORT_RANGE" "$RTNETLINK_EXTRA_INCLUDES + #include + #include + #include +" +if test "x$ac_cv_have_decl_FRA_DPORT_RANGE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FRA_DPORT_RANGE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "RTA_TTL_PROPAGATE" "ac_cv_have_decl_RTA_TTL_PROPAGATE" "$RTNETLINK_EXTRA_INCLUDES + #include + #include + #include +" +if test "x$ac_cv_have_decl_RTA_TTL_PROPAGATE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_RTA_TTL_PROPAGATE $ac_have_decl +_ACEOF + +for flag in RTA_ENCAP RTA_EXPIRES RTA_NEWDST RTA_PREF FRA_SUPPRESS_PREFIXLEN FRA_SUPPRESS_IFGROUP FRA_TUN_ID RTAX_CC_ALGO RTAX_QUICKACK RTEXT_FILTER_SKIP_STATS FRA_L3MDEV FRA_UID_RANGE RTAX_FASTOPEN_NO_COOKIE RTA_VIA FRA_OIFNAME FRA_PROTOCOL FRA_IP_PROTO FRA_SPORT_RANGE FRA_DPORT_RANGE RTA_TTL_PROPAGATE; do + eval decl_var=\$ac_cv_have_decl_$flag + if test ${decl_var} = yes; then + SYSTEM_OPTIONS="$SYSTEM_OPTIONS "${flag} + fi +done + +ac_fn_c_check_decl "$LINENO" "IFA_FLAGS" "ac_cv_have_decl_IFA_FLAGS" "#include +" +if test "x$ac_cv_have_decl_IFA_FLAGS" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IFA_FLAGS $ac_have_decl +_ACEOF + +for flag in IFA_FLAGS; do + eval decl_var=\$ac_cv_have_decl_$flag + if test ${decl_var} = yes; then + SYSTEM_OPTIONS="$SYSTEM_OPTIONS "${flag} + fi +done + +ac_fn_c_check_decl "$LINENO" "IP_MULTICAST_ALL" "ac_cv_have_decl_IP_MULTICAST_ALL" " + #include + #include + +" +if test "x$ac_cv_have_decl_IP_MULTICAST_ALL" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IP_MULTICAST_ALL $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + + SYSTEM_OPTIONS="$SYSTEM_OPTIONS "IP_MULTICAST_ALL + # Check if definition is in netinet/in.h, since we can't include linux/in.h + # due to conflicting definitions + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + #include + int main(int argc, char **argv) + { + int i = IP_MULTICAST_ALL; + } + + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +else + + # No - netinet/in.h doesn't have IP_MULTICAST_ALL + # Build a program that will output the value of the kernel's IP_MULTICAST_ALL + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + #include + #include + #include + int main(int argc, char **argv) + { + printf("%d\n", IP_MULTICAST_ALL); + } + + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + # Create local definition of IP_MULTICAST_ALL + IMA=$(./conftest$EXEEXT) + +cat >>confdefs.h <<_ACEOF +#define IP_MULTICAST_ALL $IMA +_ACEOF + + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi + + +ac_fn_c_check_decl "$LINENO" "LWTUNNEL_ENCAP_MPLS" "ac_cv_have_decl_LWTUNNEL_ENCAP_MPLS" "#include +" +if test "x$ac_cv_have_decl_LWTUNNEL_ENCAP_MPLS" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_LWTUNNEL_ENCAP_MPLS $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "LWTUNNEL_ENCAP_ILA" "ac_cv_have_decl_LWTUNNEL_ENCAP_ILA" "#include +" +if test "x$ac_cv_have_decl_LWTUNNEL_ENCAP_ILA" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_LWTUNNEL_ENCAP_ILA $ac_have_decl +_ACEOF + +if test ${ac_cv_have_decl_RTA_ENCAP}; then + for flag in LWTUNNEL_ENCAP_MPLS LWTUNNEL_ENCAP_ILA; do + eval decl_var=\$ac_cv_have_decl_$flag + if test ${decl_var} = yes; then + SYSTEM_OPTIONS="$SYSTEM_OPTIONS "${flag} + fi + done +fi + +USE_LIBIPTC=No +USE_LIBIPSET=No +if test .${enable_libiptc} != .no -a .$enable_vrrp != .no; then + USE_LIBIPTC=Yes + SAV_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $kernelinc" + for ac_header in linux/netfilter/x_tables.h xtables.h libiptc/libip6tc.h libiptc/libiptc.h libiptc/libxtc.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +else + + USE_LIBIPTC=No + break + +fi + +done + + CPPFLAGS="$SAV_CPPFLAGS" + + if test $USE_LIBIPTC = Yes; then + if test -n "IPTC"; then + KA_PKG_PFX=IPTC + else + KA_PKG_PFX=KA + fi + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CPPFLAGS + for item in `$PKG_CONFIG --cflags-only-I --static libiptc`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CPPFLAGS=\"\$${KA_PKG_PFX}_CPPFLAGS $ADD_NEW\" + + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CFLAGS + for item in `$PKG_CONFIG --cflags-only-other --static libiptc`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CFLAGS=\"\$${KA_PKG_PFX}_CFLAGS $ADD_NEW\" + + + if test . = .remove-requires; then + REQUIRES=`$PKG_CONFIG --print-requires --static libiptc` + var=`$PKG_CONFIG --libs-only-l --static libiptc` + for r in $REQUIRES; do + REQ_LIBS=`$PKG_CONFIG --libs-only-l $r` + for l in $REQ_LIBS; do + var=`echo " $var " | sed -e "s: $l : :g"` + done + done + var=`echo $var | sed -e "s:^ *::" -e "s: *$::"` + eval ${KA_PKG_PFX}_LIBS="\"$var\"" + + var=`echo $var | sed -e "s/-l//g"` + eval ${KA_PKG_PFX}_LIB_NAMES="\"$var\"" + else + ADD_NEW= + eval var=\$${KA_PKG_PFX}_LIBS + for item in `$PKG_CONFIG --libs --static libiptc`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_LIBS=\"\$${KA_PKG_PFX}_LIBS $ADD_NEW\" + + fi + + LIBS="$IPTC_LIBS" + SAV_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $kernelinc" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iptc_init in -liptc" >&5 +$as_echo_n "checking for iptc_init in -liptc... " >&6; } +if ${ac_cv_lib_iptc_iptc_init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-liptc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char iptc_init (); +int +main () +{ +return iptc_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_iptc_iptc_init=yes +else + ac_cv_lib_iptc_iptc_init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iptc_iptc_init" >&5 +$as_echo "$ac_cv_lib_iptc_iptc_init" >&6; } +if test "x$ac_cv_lib_iptc_iptc_init" = xyes; then : + + +$as_echo "#define _HAVE_LIBIPTC_ 1 " >>confdefs.h + + SYSTEM_OPTIONS="$SYSTEM_OPTIONS LIBIPTC" + if test .${enable_libiptc_dynamic} != .yes; then + if test -n ""; then + KA_PKG_PFX= + else + KA_PKG_PFX=KA + fi + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CPPFLAGS + for item in `$PKG_CONFIG --cflags-only-I --static libiptc`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CPPFLAGS=\"\$${KA_PKG_PFX}_CPPFLAGS $ADD_NEW\" + + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CFLAGS + for item in `$PKG_CONFIG --cflags-only-other --static libiptc`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CFLAGS=\"\$${KA_PKG_PFX}_CFLAGS $ADD_NEW\" + + + if test . = .remove-requires; then + REQUIRES=`$PKG_CONFIG --print-requires --static libiptc` + var=`$PKG_CONFIG --libs-only-l --static libiptc` + for r in $REQUIRES; do + REQ_LIBS=`$PKG_CONFIG --libs-only-l $r` + for l in $REQ_LIBS; do + var=`echo " $var " | sed -e "s: $l : :g"` + done + done + var=`echo $var | sed -e "s:^ *::" -e "s: *$::"` + eval ${KA_PKG_PFX}_LIBS="\"$var\"" + + var=`echo $var | sed -e "s/-l//g"` + eval ${KA_PKG_PFX}_LIB_NAMES="\"$var\"" + else + ADD_NEW= + eval var=\$${KA_PKG_PFX}_LIBS + for item in `$PKG_CONFIG --libs --static libiptc`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_LIBS=\"\$${KA_PKG_PFX}_LIBS $ADD_NEW\" + + fi + + KA_LIBS=`echo $KA_LIBS | sed -e "s/ -liptc//"` + IPTC_LIBS=`echo $IPTC_LIBS | sed -e "s/ *-L[^ ]* */ /" -e "s/ *-liptc */ /" -e "s/^ *$//"` + if test ".$IPTC_LIBS" = .; then + KA_LIBS=`echo $KA_LIBS -lip4tc -lip6tc` + fi + else + if test -n ""; then + KA_PKG_PFX= + else + KA_PKG_PFX=KA + fi + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CPPFLAGS + for item in $($PKG_CONFIG --cflags-only-I libiptc); do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CPPFLAGS=\"\$${KA_PKG_PFX}_CPPFLAGS $ADD_NEW\" + + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CFLAGS + for item in $($PKG_CONFIG --cflags-only-other libiptc); do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CFLAGS=\"\$${KA_PKG_PFX}_CFLAGS $ADD_NEW\" + + + CONFIG_OPTIONS="$CONFIG_OPTIONS LIBIPTC_DYNAMIC" + +$as_echo "#define _LIBIPTC_DYNAMIC_ 1 " >>confdefs.h + + NEED_LIBDL=Yes + + if test $LDD = :; then + as_fn_error $? "ldd is required for dynamic run-time linking support" "$LINENO" 5 + fi + + SAV_LIBS="$LIBS" + LIBS=-lip4tc + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + extern void iptc_init(void); + int main(void) + { + iptc_init(); + return 0; + } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + LIB_DETAILS=`$LDD ./conftest$EXEEXT | grep ip4tc.so | sed -e "s/^[ \t]*//"` + LIB_NAME=`echo $LIB_DETAILS | sed -e "s/ .*//"` + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$SAV_LIBS" + + +cat >>confdefs.h <<_ACEOF +#define IP4TC_LIB_NAME "$LIB_NAME" +_ACEOF + + + if test $LDD = :; then + as_fn_error $? "ldd is required for dynamic run-time linking support" "$LINENO" 5 + fi + + SAV_LIBS="$LIBS" + LIBS=-lip6tc + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + extern void ip6tc_init(void); + int main(void) + { + ip6tc_init(); + return 0; + } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + LIB_DETAILS=`$LDD ./conftest$EXEEXT | grep ip6tc.so | sed -e "s/^[ \t]*//"` + LIB_NAME=`echo $LIB_DETAILS | sed -e "s/ .*//"` + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$SAV_LIBS" + + +cat >>confdefs.h <<_ACEOF +#define IP6TC_LIB_NAME "$LIB_NAME" +_ACEOF + + fi + +else + USE_LIBIPTC=No +fi + + CPPFLAGS="$SAV_CPPFLAGS" + fi + + if test $USE_LIBIPTC = Yes; then + if test .$enable_libxtables_dynamic != .yes; then + if test -n ""; then + KA_PKG_PFX= + else + KA_PKG_PFX=KA + fi + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CPPFLAGS + for item in `$PKG_CONFIG --cflags-only-I xtables`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CPPFLAGS=\"\$${KA_PKG_PFX}_CPPFLAGS $ADD_NEW\" + + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CFLAGS + for item in `$PKG_CONFIG --cflags-only-other xtables`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CFLAGS=\"\$${KA_PKG_PFX}_CFLAGS $ADD_NEW\" + + + if test . = .remove-requires; then + REQUIRES=`$PKG_CONFIG --print-requires xtables` + var=`$PKG_CONFIG --libs-only-l xtables` + for r in $REQUIRES; do + REQ_LIBS=`$PKG_CONFIG --libs-only-l $r` + for l in $REQ_LIBS; do + var=`echo " $var " | sed -e "s: $l : :g"` + done + done + var=`echo $var | sed -e "s:^ *::" -e "s: *$::"` + eval ${KA_PKG_PFX}_LIBS="\"$var\"" + + var=`echo $var | sed -e "s/-l//g"` + eval ${KA_PKG_PFX}_LIB_NAMES="\"$var\"" + else + ADD_NEW= + eval var=\$${KA_PKG_PFX}_LIBS + for item in `$PKG_CONFIG --libs xtables`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_LIBS=\"\$${KA_PKG_PFX}_LIBS $ADD_NEW\" + + fi + + else + if test -n ""; then + KA_PKG_PFX= + else + KA_PKG_PFX=KA + fi + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CPPFLAGS + for item in $($PKG_CONFIG --cflags-only-I xtables); do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CPPFLAGS=\"\$${KA_PKG_PFX}_CPPFLAGS $ADD_NEW\" + + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CFLAGS + for item in $($PKG_CONFIG --cflags-only-other xtables); do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CFLAGS=\"\$${KA_PKG_PFX}_CFLAGS $ADD_NEW\" + + + +$as_echo "#define _LIBXTABLES_DYNAMIC_ 1 " >>confdefs.h + + CONFIG_OPTIONS="$CONFIG_OPTIONS XTABLES_DYNAMIC" + NEED_LIBDL=Yes + + if test $LDD = :; then + as_fn_error $? "ldd is required for dynamic run-time linking support" "$LINENO" 5 + fi + + SAV_LIBS="$LIBS" + LIBS=-lxtables + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + extern void xtables_insmod(void); + int main(void) + { + xtables_insmod(); + return 0; + } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + LIB_DETAILS=`$LDD ./conftest$EXEEXT | grep xtables.so | sed -e "s/^[ \t]*//"` + LIB_NAME=`echo $LIB_DETAILS | sed -e "s/ .*//"` + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$SAV_LIBS" + + +cat >>confdefs.h <<_ACEOF +#define XTABLES_LIB_NAME "$LIB_NAME" +_ACEOF + + fi + + SAV_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $kernelinc" + if test "${enable_libipset}" != no; then + $PKG_CONFIG --exists libipset + if test $? -eq 0; then + if test -n "IPSET"; then + KA_PKG_PFX=IPSET + else + KA_PKG_PFX=KA + fi + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CPPFLAGS + for item in `$PKG_CONFIG --cflags-only-I libipset`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CPPFLAGS=\"\$${KA_PKG_PFX}_CPPFLAGS $ADD_NEW\" + + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CFLAGS + for item in `$PKG_CONFIG --cflags-only-other libipset`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CFLAGS=\"\$${KA_PKG_PFX}_CFLAGS $ADD_NEW\" + + + if test . = .remove-requires; then + REQUIRES=`$PKG_CONFIG --print-requires libipset` + var=`$PKG_CONFIG --libs-only-l libipset` + for r in $REQUIRES; do + REQ_LIBS=`$PKG_CONFIG --libs-only-l $r` + for l in $REQ_LIBS; do + var=`echo " $var " | sed -e "s: $l : :g"` + done + done + var=`echo $var | sed -e "s:^ *::" -e "s: *$::"` + eval ${KA_PKG_PFX}_LIBS="\"$var\"" + + var=`echo $var | sed -e "s/-l//g"` + eval ${KA_PKG_PFX}_LIB_NAMES="\"$var\"" + else + ADD_NEW= + eval var=\$${KA_PKG_PFX}_LIBS + for item in `$PKG_CONFIG --libs libipset`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_LIBS=\"\$${KA_PKG_PFX}_LIBS $ADD_NEW\" + + fi + + else + IPSET_LIBS="-lipset" + fi + SAV_LIBS=$LIBS + LIBS="$IPTC_LIBS $IPSET_LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ipset_session_init in -lipset" >&5 +$as_echo_n "checking for ipset_session_init in -lipset... " >&6; } +if ${ac_cv_lib_ipset_ipset_session_init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lipset $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ipset_session_init (); +int +main () +{ +return ipset_session_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ipset_ipset_session_init=yes +else + ac_cv_lib_ipset_ipset_session_init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipset_ipset_session_init" >&5 +$as_echo "$ac_cv_lib_ipset_ipset_session_init" >&6; } +if test "x$ac_cv_lib_ipset_ipset_session_init" = xyes; then : + + USE_LIBIPSET=Yes + for ac_header in libipset/data.h libipset/linux_ip_set.h libipset/session.h libipset/types.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +else + + USE_LIBIPSET=No + break + +fi + +done + + + if test $USE_LIBIPSET = Yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xtables_insmod in -lxtables" >&5 +$as_echo_n "checking for xtables_insmod in -lxtables... " >&6; } +if ${ac_cv_lib_xtables_xtables_insmod+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lxtables $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char xtables_insmod (); +int +main () +{ +return xtables_insmod (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_xtables_xtables_insmod=yes +else + ac_cv_lib_xtables_xtables_insmod=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xtables_xtables_insmod" >&5 +$as_echo "$ac_cv_lib_xtables_xtables_insmod" >&6; } +if test "x$ac_cv_lib_xtables_xtables_insmod" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBXTABLES 1 +_ACEOF + + LIBS="-lxtables $LIBS" + +else + USE_LIBIPSET=No +fi + + fi + + if test $USE_LIBIPSET = Yes; then + EXTRA_INCLUDE= + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + for ac_header in linux/netfilter/xt_set.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "linux/netfilter/xt_set.h" "ac_cv_header_linux_netfilter_xt_set_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_netfilter_xt_set_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LINUX_NETFILTER_XT_SET_H 1 +_ACEOF + +else + USE_LIBIPSET=No +fi + +done + +else + ac_fn_c_check_header_compile "$LINENO" "linux/netfilter/xt_set.h" "ac_cv_header_linux_netfilter_xt_set_h" "#include +" +if test "x$ac_cv_header_linux_netfilter_xt_set_h" = xyes; then : + + +$as_echo "#define USE_LIBIPSET_LINUX_IP_SET_H 1 " >>confdefs.h + + EXTRA_INCLUDE="#include " + +else + USE_LIBIPSET=No +fi + + + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + if test $USE_LIBIPSET = Yes; then + +$as_echo "#define _HAVE_LIBIPSET_ 1 " >>confdefs.h + + $PKG_CONFIG --exists libipset + if test $? -eq 0; then + if test .${enable_libipset_dynamic} = .no; then + if test -n ""; then + KA_PKG_PFX= + else + KA_PKG_PFX=KA + fi + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CPPFLAGS + for item in `$PKG_CONFIG --cflags-only-I libipset`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CPPFLAGS=\"\$${KA_PKG_PFX}_CPPFLAGS $ADD_NEW\" + + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CFLAGS + for item in `$PKG_CONFIG --cflags-only-other libipset`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CFLAGS=\"\$${KA_PKG_PFX}_CFLAGS $ADD_NEW\" + + + if test . = .remove-requires; then + REQUIRES=`$PKG_CONFIG --print-requires libipset` + var=`$PKG_CONFIG --libs-only-l libipset` + for r in $REQUIRES; do + REQ_LIBS=`$PKG_CONFIG --libs-only-l $r` + for l in $REQ_LIBS; do + var=`echo " $var " | sed -e "s: $l : :g"` + done + done + var=`echo $var | sed -e "s:^ *::" -e "s: *$::"` + eval ${KA_PKG_PFX}_LIBS="\"$var\"" + + var=`echo $var | sed -e "s/-l//g"` + eval ${KA_PKG_PFX}_LIB_NAMES="\"$var\"" + else + ADD_NEW= + eval var=\$${KA_PKG_PFX}_LIBS + for item in `$PKG_CONFIG --libs libipset`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_LIBS=\"\$${KA_PKG_PFX}_LIBS $ADD_NEW\" + + fi + + else + if test -n ""; then + KA_PKG_PFX= + else + KA_PKG_PFX=KA + fi + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CPPFLAGS + for item in $($PKG_CONFIG --cflags-only-I libipset); do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CPPFLAGS=\"\$${KA_PKG_PFX}_CPPFLAGS $ADD_NEW\" + + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CFLAGS + for item in $($PKG_CONFIG --cflags-only-other libipset); do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CFLAGS=\"\$${KA_PKG_PFX}_CFLAGS $ADD_NEW\" + + + fi + elif test .${enable_libipset_dynamic} = .no; then + KA_LIBS="$KA_LIBS -lipset" + fi + if test .${enable_libipset_dynamic} != .no; then + +$as_echo "#define _LIBIPSET_DYNAMIC_ 1 " >>confdefs.h + + CONFIG_OPTIONS="$CONFIG_OPTIONS LIBIPSET_DYNAMIC" + NEED_LIBDL=Yes + + if test $LDD = :; then + as_fn_error $? "ldd is required for dynamic run-time linking support" "$LINENO" 5 + fi + + SAV_LIBS="$LIBS" + LIBS=-lipset + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + extern void ipset_session_init(void); + int main(void) + { + ipset_session_init(); + return 0; + } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + LIB_DETAILS=`$LDD ./conftest$EXEEXT | grep ipset.so | sed -e "s/^[ \t]*//"` + LIB_NAME=`echo $LIB_DETAILS | sed -e "s/ .*//"` + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$SAV_LIBS" + + +cat >>confdefs.h <<_ACEOF +#define IPSET_LIB_NAME "$LIB_NAME" +_ACEOF + + else + CONFIG_OPTIONS="$CONFIG_OPTIONS LIBIPSET" + fi + + ac_fn_c_check_member "$LINENO" "struct xt_set_info_match_v1" "match_set.index" "ac_cv_member_struct_xt_set_info_match_v1_match_set_index" " + $EXTRA_INCLUDE + #include + +" +if test "x$ac_cv_member_struct_xt_set_info_match_v1_match_set_index" = xyes; then : + +$as_echo "#define HAVE_XT_SET_INFO_MATCH_V1 1 " >>confdefs.h + +fi + + ac_fn_c_check_member "$LINENO" "struct xt_set_info_match_v3" "match_set.index" "ac_cv_member_struct_xt_set_info_match_v3_match_set_index" " + $EXTRA_INCLUDE + #include + +" +if test "x$ac_cv_member_struct_xt_set_info_match_v3_match_set_index" = xyes; then : + +$as_echo "#define HAVE_XT_SET_INFO_MATCH_V3 1 " >>confdefs.h + +fi + + ac_fn_c_check_member "$LINENO" "struct xt_set_info_match_v4" "match_set.index" "ac_cv_member_struct_xt_set_info_match_v4_match_set_index" " + $EXTRA_INCLUDE + #include + +" +if test "x$ac_cv_member_struct_xt_set_info_match_v4_match_set_index" = xyes; then : + +$as_echo "#define HAVE_XT_SET_INFO_MATCH_V4 1 " >>confdefs.h + +fi + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + int main(void) { int var = IPSET_ATTR_IFACE; } + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +$as_echo "#define HAVE_IPSET_ATTR_IFACE 1 " >>confdefs.h + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + int main(void) {} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #ifdef _UAPI_IP_SET_H + #error _UAPI_IP_SET_H defined + #endif + int main(void) {} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +$as_echo "#define LIBIPSET_H_ADD_UAPI_IP_SET_H_GUARD 1" >>confdefs.h + +else + +$as_echo "#define LIBIPSET_H_ADD_IP_SET_H_GUARD 1" >>confdefs.h + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + if test $USE_LIBIPSET = Yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipset version 7 or later" >&5 +$as_echo_n "checking for libipset version 7 or later... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + + void test_func(void) + { + ipset_session_init(NULL, NULL); + } + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define LIBIPSET_PRE_V7_COMPAT 1 " >>confdefs.h + + SYSTEM_OPTIONS="$SYSTEM_OPTIONS "LIBIPSET_PRE_V7 + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + +fi + + LIBS="$SAV_LIBS" + fi + + ac_fn_c_check_decl "$LINENO" "XT_EXTENSION_MAXNAMELEN" "ac_cv_have_decl_XT_EXTENSION_MAXNAMELEN" "#include +" +if test "x$ac_cv_have_decl_XT_EXTENSION_MAXNAMELEN" = xyes; then : + +else + +$as_echo "#define XT_EXTENSION_MAXNAMELEN (XT_FUNCTION_MAXNAMELEN - 1) " >>confdefs.h + +fi + + + CPPFLAGS="$SAV_CPPFLAGS" + fi +fi + if test $USE_LIBIPTC = Yes; then + LIBIPTC_TRUE= + LIBIPTC_FALSE='#' +else + LIBIPTC_TRUE='#' + LIBIPTC_FALSE= +fi + + if test $USE_LIBIPSET = Yes; then + LIBIPSET_TRUE= + LIBIPSET_FALSE='#' +else + LIBIPSET_TRUE='#' + LIBIPSET_FALSE= +fi + +unset LIBS + +# Including and can cause a namespace collision. +# Later versions of the headers are OK if linux/if.h is included second +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linux/if.h and net/if.h namespace collision" >&5 +$as_echo_n "checking for linux/if.h and net/if.h namespace collision... " >&6; } +SAV_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $kernelinc" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define _HAVE_NET_LINUX_IF_H_COLLISION_ 1 " >>confdefs.h + + SYSTEM_OPTIONS="$SYSTEM_OPTIONS NET_LINUX_IF_H_COLLISION" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +CPPFLAGS="$SAV_CPPFLAGS" + +# Including and causes a namespace collision +# with musl libc, but the collision only occurs if linux/ip_ether.h is included +# before netinet/if_ether.h. The problem is that we want to include them in that +# order. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linux/if_ether.h then netinet/if_ether.h namespace collision" >&5 +$as_echo_n "checking for linux/if_ether.h then netinet/if_ether.h namespace collision... " >&6; } +SAV_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $kernelinc" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define _HAVE_NETINET_LINUX_IF_ETHER_H_COLLISION_ 1 " >>confdefs.h + + SYSTEM_OPTIONS="$SYSTEM_OPTIONS NETINET_LINUX_IF_ETHER_H_COLLISION" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +CPPFLAGS="$SAV_CPPFLAGS" + +# Linux 4.5 to 4.5.4 has indirectly including +# and which causes a namespace collision. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libiptc/libiptc.h linux/if.h and net/if.h namespace collision" >&5 +$as_echo_n "checking for libiptc/libiptc.h linux/if.h and net/if.h namespace collision... " >&6; } +SAV_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $kernelinc" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define _HAVE_LIBIPTC_LINUX_NET_IF_H_COLLISION_ 1 " >>confdefs.h + + SYSTEM_OPTIONS="$SYSTEM_OPTIONS LIBIPTC_LINUX_NET_IF_H_COLLISION" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +CPPFLAGS="$SAV_CPPFLAGS" + +IPVS_SYNCD_ATTRIBUTES=No +IPVS_64BIT_STATS=No +WITH_REGEX=No +ENABLE_REGEX_DEBUG=No +if test "$enable_lvs" != no; then + IPVS_SUPPORT=Yes + CONFIG_OPTIONS="$CONFIG_OPTIONS LVS" + +$as_echo "#define _WITH_LVS_ 1 " >>confdefs.h + + + for ac_header in linux/ip_vs.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "linux/ip_vs.h" "ac_cv_header_linux_ip_vs_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_ip_vs_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LINUX_IP_VS_H 1 +_ACEOF + + ac_fn_c_check_decl "$LINENO" "IP_VS_SVC_F_ONEPACKET" "ac_cv_have_decl_IP_VS_SVC_F_ONEPACKET" "#include +" +if test "x$ac_cv_have_decl_IP_VS_SVC_F_ONEPACKET" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IP_VS_SVC_F_ONEPACKET $ac_have_decl +_ACEOF + + +fi + +done + + + if test $IPVS_USE_NL = Yes; then + +$as_echo "#define LIBIPVS_USE_NL 1 " >>confdefs.h + + SYSTEM_OPTIONS="$SYSTEM_OPTIONS LIBIPVS_NETLINK" + fi + + SAV_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $kernelinc" + + ac_fn_c_check_decl "$LINENO" "IPVS_DEST_ATTR_ADDR_FAMILY" "ac_cv_have_decl_IPVS_DEST_ATTR_ADDR_FAMILY" "#include +" +if test "x$ac_cv_have_decl_IPVS_DEST_ATTR_ADDR_FAMILY" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IPVS_DEST_ATTR_ADDR_FAMILY $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + SYSTEM_OPTIONS="$SYSTEM_OPTIONS IPVS_DEST_ATTR_ADDR_FAMILY" +fi + + + IPVS_SYNCD_ATTRIBUTES=Yes + ac_fn_c_check_decl "$LINENO" "IPVS_DAEMON_ATTR_SYNC_MAXLEN" "ac_cv_have_decl_IPVS_DAEMON_ATTR_SYNC_MAXLEN" "#include +" +if test "x$ac_cv_have_decl_IPVS_DAEMON_ATTR_SYNC_MAXLEN" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IPVS_DAEMON_ATTR_SYNC_MAXLEN $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + +else + + IPVS_SYNCD_ATTRIBUTES=No + break + +fi +ac_fn_c_check_decl "$LINENO" "IPVS_DAEMON_ATTR_MCAST_GROUP" "ac_cv_have_decl_IPVS_DAEMON_ATTR_MCAST_GROUP" "#include +" +if test "x$ac_cv_have_decl_IPVS_DAEMON_ATTR_MCAST_GROUP" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IPVS_DAEMON_ATTR_MCAST_GROUP $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + +else + + IPVS_SYNCD_ATTRIBUTES=No + break + +fi +ac_fn_c_check_decl "$LINENO" "IPVS_DAEMON_ATTR_MCAST_GROUP6" "ac_cv_have_decl_IPVS_DAEMON_ATTR_MCAST_GROUP6" "#include +" +if test "x$ac_cv_have_decl_IPVS_DAEMON_ATTR_MCAST_GROUP6" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IPVS_DAEMON_ATTR_MCAST_GROUP6 $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + +else + + IPVS_SYNCD_ATTRIBUTES=No + break + +fi +ac_fn_c_check_decl "$LINENO" "IPVS_DAEMON_ATTR_MCAST_PORT" "ac_cv_have_decl_IPVS_DAEMON_ATTR_MCAST_PORT" "#include +" +if test "x$ac_cv_have_decl_IPVS_DAEMON_ATTR_MCAST_PORT" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IPVS_DAEMON_ATTR_MCAST_PORT $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + +else + + IPVS_SYNCD_ATTRIBUTES=No + break + +fi +ac_fn_c_check_decl "$LINENO" "IPVS_DAEMON_ATTR_MCAST_TTL" "ac_cv_have_decl_IPVS_DAEMON_ATTR_MCAST_TTL" "#include +" +if test "x$ac_cv_have_decl_IPVS_DAEMON_ATTR_MCAST_TTL" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IPVS_DAEMON_ATTR_MCAST_TTL $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + +else + + IPVS_SYNCD_ATTRIBUTES=No + break + +fi + + + if test $IPVS_SYNCD_ATTRIBUTES = Yes; then + +$as_echo "#define _HAVE_IPVS_SYNCD_ATTRIBUTES_ 1 " >>confdefs.h + + SYSTEM_OPTIONS="$SYSTEM_OPTIONS IPVS_SYNCD_ATTRIBUTES" + fi + + if test "$enable_lvs_64bit_stats" != "no"; then + IPVS_64BIT_STATS=Yes + ac_fn_c_check_decl "$LINENO" "IPVS_SVC_ATTR_STATS64" "ac_cv_have_decl_IPVS_SVC_ATTR_STATS64" "#include +" +if test "x$ac_cv_have_decl_IPVS_SVC_ATTR_STATS64" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IPVS_SVC_ATTR_STATS64 $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + +else + + IPVS_64BIT_STATS=No + break + +fi +ac_fn_c_check_decl "$LINENO" "IPVS_DEST_ATTR_STATS64" "ac_cv_have_decl_IPVS_DEST_ATTR_STATS64" "#include +" +if test "x$ac_cv_have_decl_IPVS_DEST_ATTR_STATS64" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IPVS_DEST_ATTR_STATS64 $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + +else + + IPVS_64BIT_STATS=No + break + +fi + + if test $IPVS_64BIT_STATS = Yes; then + +$as_echo "#define _WITH_LVS_64BIT_STATS_ 1 " >>confdefs.h + + SYSTEM_OPTIONS="$SYSTEM_OPTIONS IPVS_64BIT_STATS" + fi + fi + CPPFLAGS="$SAV_CPPFLAGS" + + if test "$enable_regex" = yes; then : + + $PKG_CONFIG --exists libpcre2-8 + HAVE_PCRE2=$? + if test $HAVE_PCRE2 -ne 0; then : + as_fn_error $? "cannot find pcre library" "$LINENO" 5 +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre.h" >&5 +$as_echo_n "checking for pcre.h... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #define PCRE2_CODE_UNIT_WIDTH 8 + #include + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + WITH_REGEX=Yes + if test -n ""; then + KA_PKG_PFX= + else + KA_PKG_PFX=KA + fi + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CPPFLAGS + for item in `$PKG_CONFIG --cflags-only-I libpcre2-8`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CPPFLAGS=\"\$${KA_PKG_PFX}_CPPFLAGS $ADD_NEW\" + + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CFLAGS + for item in `$PKG_CONFIG --cflags-only-other libpcre2-8`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CFLAGS=\"\$${KA_PKG_PFX}_CFLAGS $ADD_NEW\" + + + if test . = .remove-requires; then + REQUIRES=`$PKG_CONFIG --print-requires libpcre2-8` + var=`$PKG_CONFIG --libs-only-l libpcre2-8` + for r in $REQUIRES; do + REQ_LIBS=`$PKG_CONFIG --libs-only-l $r` + for l in $REQ_LIBS; do + var=`echo " $var " | sed -e "s: $l : :g"` + done + done + var=`echo $var | sed -e "s:^ *::" -e "s: *$::"` + eval ${KA_PKG_PFX}_LIBS="\"$var\"" + + var=`echo $var | sed -e "s/-l//g"` + eval ${KA_PKG_PFX}_LIB_NAMES="\"$var\"" + else + ADD_NEW= + eval var=\$${KA_PKG_PFX}_LIBS + for item in `$PKG_CONFIG --libs libpcre2-8`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_LIBS=\"\$${KA_PKG_PFX}_LIBS $ADD_NEW\" + + fi + + +$as_echo "#define _WITH_REGEX_CHECK_ 1 " >>confdefs.h + + CONFIG_OPTIONS="$CONFIG_OPTIONS REGEX" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "pcre2.h is missing" "$LINENO" 5 + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "$enable_regex_timers" = yes; then + +$as_echo "#define _WITH_REGEX_TIMERS_ 1 " >>confdefs.h + + fi + + if test "${enable_regex_debug}" = yes; then + +$as_echo "#define _REGEX_DEBUG_ 1 " >>confdefs.h + + ENABLE_REGEX_DEBUG=Yes + CONFIG_OPTIONS="$CONFIG_OPTIONS REGEX_DEBUG" + fi + +fi +else + IPVS_SUPPORT=No +fi + if test $IPVS_SUPPORT = Yes; then + WITH_IPVS_TRUE= + WITH_IPVS_FALSE='#' +else + WITH_IPVS_TRUE='#' + WITH_IPVS_FALSE= +fi + + if test $WITH_REGEX = Yes; then + WITH_REGEX_TRUE= + WITH_REGEX_FALSE='#' +else + WITH_REGEX_TRUE='#' + WITH_REGEX_FALSE= +fi + + +VRRP_SUPPORT=No +VRRP_AUTH_SUPPORT=No +MACVLAN_SUPPORT=No +ENABLE_JSON=No +BFD_SUPPORT=No +if test "$enable_vrrp" != no; then + VRRP_SUPPORT=Yes + +$as_echo "#define _WITH_VRRP_ 1 " >>confdefs.h + + CONFIG_OPTIONS="$CONFIG_OPTIONS VRRP" + + if test "${enable_vrrp_auth}" != no; then + VRRP_AUTH_SUPPORT=Yes + +$as_echo "#define _WITH_VRRP_AUTH_ 1 " >>confdefs.h + + CONFIG_OPTIONS="$CONFIG_OPTIONS VRRP_AUTH" + fi + + SAV_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $kernelinc" + MACVLAN_SUPPORT=Yes + ac_fn_c_check_decl "$LINENO" "IFLA_MACVLAN_MODE" "ac_cv_have_decl_IFLA_MACVLAN_MODE" " + #include + #include + +" +if test "x$ac_cv_have_decl_IFLA_MACVLAN_MODE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IFLA_MACVLAN_MODE $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + +else + + MACVLAN_SUPPORT=No + break + +fi +ac_fn_c_check_decl "$LINENO" "MACVLAN_MODE_PRIVATE" "ac_cv_have_decl_MACVLAN_MODE_PRIVATE" " + #include + #include + +" +if test "x$ac_cv_have_decl_MACVLAN_MODE_PRIVATE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_MACVLAN_MODE_PRIVATE $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + +else + + MACVLAN_SUPPORT=No + break + +fi + + if test $MACVLAN_SUPPORT = Yes; then + +$as_echo "#define _HAVE_VRRP_VMAC_ 1 " >>confdefs.h + + SYSTEM_OPTIONS="$SYSTEM_OPTIONS VRRP_VMAC" + fi + CPPFLAGS="$SAV_CPPFLAGS" + + if test "${enable_json}" = yes; then + JSON_HEADERS=$($PKG_CONFIG --cflags-only-I json-c) + SAV_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $JSON_HEADERS" + for ac_header in json.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "json.h" "ac_cv_header_json_h" "$ac_includes_default" +if test "x$ac_cv_header_json_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_JSON_H 1 +_ACEOF + +else + as_fn_error $? "unable to find json.h" "$LINENO" 5 +fi + +done + + CPPFLAGS="$SAV_CPPFLAGS" + +$as_echo "#define _WITH_JSON_ 1 " >>confdefs.h + + if test -n ""; then + KA_PKG_PFX= + else + KA_PKG_PFX=KA + fi + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CPPFLAGS + for item in `$PKG_CONFIG --cflags-only-I json-c`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CPPFLAGS=\"\$${KA_PKG_PFX}_CPPFLAGS $ADD_NEW\" + + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CFLAGS + for item in `$PKG_CONFIG --cflags-only-other json-c`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CFLAGS=\"\$${KA_PKG_PFX}_CFLAGS $ADD_NEW\" + + + if test . = .remove-requires; then + REQUIRES=`$PKG_CONFIG --print-requires json-c` + var=`$PKG_CONFIG --libs-only-l json-c` + for r in $REQUIRES; do + REQ_LIBS=`$PKG_CONFIG --libs-only-l $r` + for l in $REQ_LIBS; do + var=`echo " $var " | sed -e "s: $l : :g"` + done + done + var=`echo $var | sed -e "s:^ *::" -e "s: *$::"` + eval ${KA_PKG_PFX}_LIBS="\"$var\"" + + var=`echo $var | sed -e "s/-l//g"` + eval ${KA_PKG_PFX}_LIB_NAMES="\"$var\"" + else + ADD_NEW= + eval var=\$${KA_PKG_PFX}_LIBS + for item in `$PKG_CONFIG --libs json-c`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_LIBS=\"\$${KA_PKG_PFX}_LIBS $ADD_NEW\" + + fi + + ENABLE_JSON=Yes + CONFIG_OPTIONS="$CONFIG_OPTIONS JSON" + fi + + if test "${enable_bfd}" = yes; then + BFD_SUPPORT=Yes + +$as_echo "#define _WITH_BFD_ 1 " >>confdefs.h + + CONFIG_OPTIONS="$CONFIG_OPTIONS BFD" + fi +fi + if test $VRRP_SUPPORT = Yes; then + WITH_VRRP_TRUE= + WITH_VRRP_FALSE='#' +else + WITH_VRRP_TRUE='#' + WITH_VRRP_FALSE= +fi + + if test $VRRP_AUTH_SUPPORT = Yes; then + VRRP_AUTH_TRUE= + VRRP_AUTH_FALSE='#' +else + VRRP_AUTH_TRUE='#' + VRRP_AUTH_FALSE= +fi + + if test $MACVLAN_SUPPORT = Yes; then + VMAC_TRUE= + VMAC_FALSE='#' +else + VMAC_TRUE='#' + VMAC_FALSE= +fi + + if test $ENABLE_JSON = Yes; then + WITH_JSON_TRUE= + WITH_JSON_FALSE='#' +else + WITH_JSON_TRUE='#' + WITH_JSON_FALSE= +fi + + if test $BFD_SUPPORT = Yes; then + WITH_BFD_TRUE= + WITH_BFD_FALSE='#' +else + WITH_BFD_TRUE='#' + WITH_BFD_FALSE= +fi + + +if test ${IPVS_SUPPORT} = No -a ${VRRP_SUPPORT} = No; then + as_fn_error $? "keepalived MUST be compiled with at least one of LVS or VRRP framework" "$LINENO" 5 +fi + +# Introduced in Linux 2.6.27 and glibc 2.9 +ac_fn_c_check_decl "$LINENO" "SOCK_NONBLOCK" "ac_cv_have_decl_SOCK_NONBLOCK" "#include +" +if test "x$ac_cv_have_decl_SOCK_NONBLOCK" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SOCK_NONBLOCK $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + SYSTEM_OPTIONS="$SYSTEM_OPTIONS SOCK_NONBLOCK" +fi + + if test $ac_cv_have_decl_SOCK_NONBLOCK = yes; then + SOCK_NONBLOCK_TRUE= + SOCK_NONBLOCK_FALSE='#' +else + SOCK_NONBLOCK_TRUE='#' + SOCK_NONBLOCK_FALSE= +fi + + +# Introduced in Linux 2.6.27 and glibc 2.9 +ac_fn_c_check_decl "$LINENO" "SOCK_CLOEXEC" "ac_cv_have_decl_SOCK_CLOEXEC" "#include +" +if test "x$ac_cv_have_decl_SOCK_CLOEXEC" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SOCK_CLOEXEC $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + SYSTEM_OPTIONS="$SYSTEM_OPTIONS SOCK_CLOEXEC" +fi + + +# Introduced in Linux 2.6.37 +ac_fn_c_check_decl "$LINENO" "IPVS_SVC_ATTR_PE_NAME" "ac_cv_have_decl_IPVS_SVC_ATTR_PE_NAME" "#include +" +if test "x$ac_cv_have_decl_IPVS_SVC_ATTR_PE_NAME" = xyes; then : + + +$as_echo "#define _HAVE_PE_NAME_ 1 " >>confdefs.h + + +fi + + +# Introduced in Linux 2.6.39 +SAV_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -D_GNU_SOURCE" +ac_fn_c_check_decl "$LINENO" "O_PATH" "ac_cv_have_decl_O_PATH" "#include +" +if test "x$ac_cv_have_decl_O_PATH" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_O_PATH $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + + SYSTEM_OPTIONS="$SYSTEM_OPTIONS O_PATH" + +fi + +CFLAGS="$SAV_CFLAGS" + +ac_fn_c_check_decl "$LINENO" "GLOB_BRACE" "ac_cv_have_decl_GLOB_BRACE" "#include +" +if test "x$ac_cv_have_decl_GLOB_BRACE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GLOB_BRACE $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + SYSTEM_OPTIONS="$SYSTEM_OPTIONS GLOB_BRACE" +fi + + +UNICAST_CHKSUM_COMPAT_SUPPORT=No +if test .$enable_checksum_compat != .no; then + UNICAST_CHKSUM_COMPAT_SUPPORT=Yes + +$as_echo "#define _WITH_UNICAST_CHKSUM_COMPAT_ 1 " >>confdefs.h + + CONFIG_OPTIONS="$CONFIG_OPTIONS OLD_CHKSUM_COMPAT" +fi + +FIB_ROUTING_SUPPORT=No +if test .$enable_vrrp != .no -a .$enable_routes != .no; then + # Introduced in Linux 2.6.19 + SAV_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $kernelinc" + ac_fn_c_check_decl "$LINENO" "FRA_SRC" "ac_cv_have_decl_FRA_SRC" "#include + #include +" +if test "x$ac_cv_have_decl_FRA_SRC" = xyes; then : + + FIB_ROUTING_SUPPORT=Yes + +$as_echo "#define _HAVE_FIB_ROUTING_ 1 " >>confdefs.h + + CONFIG_OPTIONS="$CONFIG_OPTIONS FIB_ROUTING" + +fi + + CPPFLAGS="$SAV_CPPFLAGS" +fi + if test $FIB_ROUTING_SUPPORT = Yes; then + FIB_ROUTING_TRUE= + FIB_ROUTING_FALSE='#' +else + FIB_ROUTING_TRUE='#' + FIB_ROUTING_FALSE= +fi + + +SAV_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $kernelinc" +if test ${MACVLAN_SUPPORT} = Yes; then + # Introduced in Linux 3.17 + ac_fn_c_check_decl "$LINENO" "IFLA_INET6_ADDR_GEN_MODE" "ac_cv_have_decl_IFLA_INET6_ADDR_GEN_MODE" " + #include + +" +if test "x$ac_cv_have_decl_IFLA_INET6_ADDR_GEN_MODE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IFLA_INET6_ADDR_GEN_MODE $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + + SYSTEM_OPTIONS="$SYSTEM_OPTIONS INET6_ADDR_GEN_MODE" + +fi + +fi +CPPFLAGS="$SAV_CPPFLAGS" + +SAV_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $kernelinc" +if test ${MACVLAN_SUPPORT} = Yes; then + # Introduced in Linux 4.3 + ac_fn_c_check_decl "$LINENO" "IFLA_VRF_MAX" "ac_cv_have_decl_IFLA_VRF_MAX" " + #include + +" +if test "x$ac_cv_have_decl_IFLA_VRF_MAX" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IFLA_VRF_MAX $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + + SYSTEM_OPTIONS="$SYSTEM_OPTIONS VRF" + +$as_echo "#define _HAVE_VRF_ 1 " >>confdefs.h + + +fi + +fi +CPPFLAGS="$SAV_CPPFLAGS" + +SNMP_SUPPORT=No +SNMP_KEEPALIVED_SUPPORT=No +SNMP_VRRP_SUPPORT=No +SNMP_RFC_SUPPORT=No +SNMP_RFCV2_SUPPORT=No +SNMP_RFCV3_SUPPORT=No +SNMP_CHECKER_SUPPORT=No +SNMP_V3_FOR_V2=No +if test "$enable_snmp_keepalived" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-snmp-keepalived is obsolete. Use --enable-snmp-vrrp." >&5 +$as_echo "$as_me: WARNING: --enable-snmp-keepalived is obsolete. Use --enable-snmp-vrrp." >&2;} + enable_snmp_vrrp=$enable_snmp_keepalived +fi +if test "$enable_snmp" = yes -o \ + "$enable_snmp_vrrp" = yes -o \ + "$enable_snmp_checker" = yes -o \ + "$enable_snmp_rfc" = yes -o \ + "$enable_snmp_rfcv2" = yes -o \ + "$enable_snmp_rfcv3" = yes; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}net-snmp-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}net-snmp-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_NETSNMP_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $NETSNMP_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_NETSNMP_CONFIG="$NETSNMP_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_NETSNMP_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +NETSNMP_CONFIG=$ac_cv_path_NETSNMP_CONFIG +if test -n "$NETSNMP_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NETSNMP_CONFIG" >&5 +$as_echo "$NETSNMP_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_NETSNMP_CONFIG"; then + ac_pt_NETSNMP_CONFIG=$NETSNMP_CONFIG + # Extract the first word of "net-snmp-config", so it can be a program name with args. +set dummy net-snmp-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_NETSNMP_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_NETSNMP_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_NETSNMP_CONFIG="$ac_pt_NETSNMP_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_NETSNMP_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_NETSNMP_CONFIG=$ac_cv_path_ac_pt_NETSNMP_CONFIG +if test -n "$ac_pt_NETSNMP_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_NETSNMP_CONFIG" >&5 +$as_echo "$ac_pt_NETSNMP_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_NETSNMP_CONFIG" = x; then + NETSNMP_CONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NETSNMP_CONFIG=$ac_pt_NETSNMP_CONFIG + fi +else + NETSNMP_CONFIG="$ac_cv_path_NETSNMP_CONFIG" +fi + + if test "$NETSNMP_CONFIG" = no; then + as_fn_error $? "*** unable to find net-snmp-config" "$LINENO" 5 + fi + NETSNMP_LIBS_AGENT=`${NETSNMP_CONFIG} --netsnmp-agent-libs` + NETSNMP_LIBS_EXT=`${NETSNMP_CONFIG} --external-libs` + NETSNMP_LIBS="$NETSNMP_LIBS_AGENT $NETSNMP_LIBS_EXT" + NETSNMP_CFLAGS="`${NETSNMP_CONFIG} --base-cflags` -DNETSNMP_NO_INLINE" + + # net-snmp-config adds compiler and linker options that were set at the time + # net-snmp was built, and this can include spec files that may not exist + # on the system building keepalived. We need to check if any spec files + # are specified, and if they do not exist on this system, then remove them + # from NETSNMP_LIBS or NETSNMP_CFLAGS. + # For further information, see https://bugzilla.redhat.com/show_bug.cgi?id=1544527 + # and the other bugs referred to in it. + for spec in `echo $NETSNMP_LIBS | sed -e "s? ?\n?g" | grep "^-specs="`; do + SPEC_FILE=`echo $spec | sed -e "s?^-spaces=??"` + if test ! -f $SPEC_FILE; then + NETSNMP_LIBS=`echo $NETSNMP_LIBS | sed -e "s? *$spec *? ?"` + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Removing $spec from NETSNMP_LIBS since spec file not installed" >&5 +$as_echo "$as_me: WARNING: Removing $spec from NETSNMP_LIBS since spec file not installed" >&2;} + fi + done + for spec in `echo $NETSNMP_CFLAGS | sed -e "s? ?\n?g" | grep "^-specs="`; do + SPEC_FILE=`echo $spec | sed -e "s?^-spaces=??"` + if test ! -f $SPEC_FILE; then + NETSNMP_CFLAGS=`echo $NETSNMP_CFLAGS | sed -e "s? *$spec *? ?"` + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Removing $spec from NETSNMP_CFLAGS since spec file not installed" >&5 +$as_echo "$as_me: WARNING: Removing $spec from NETSNMP_CFLAGS since spec file not installed" >&2;} + fi + done + + SAV_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS ${NETSNMP_CFLAGS}" + SAV_LIBS="$LIBS" + LIBS="$LIBS ${NETSNMP_LIBS}" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler supports flag \"${NETSNMP_CFLAGS} ${NETSNMP_LIBS}\" from Net-SNMP" >&5 +$as_echo_n "checking whether C compiler supports flag \"${NETSNMP_CFLAGS} ${NETSNMP_LIBS}\" from Net-SNMP... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + int main(void) + { + return 0; + } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "*** incorrect CFLAGS from net-snmp-config" "$LINENO" 5 + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + # Do we have subagent support? + for ac_func in netsnmp_enable_subagent +do : + ac_fn_c_check_func "$LINENO" "netsnmp_enable_subagent" "ac_cv_func_netsnmp_enable_subagent" +if test "x$ac_cv_func_netsnmp_enable_subagent" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NETSNMP_ENABLE_SUBAGENT 1 +_ACEOF + +else + as_fn_error $? "*** no subagent support in net-snmp" "$LINENO" 5 +fi +done + + + # check for net-snmp headers + # Some ancient distributions may miss header + SAV_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $NETSNMP_CFLAGS" + for ac_header in net-snmp/agent/agent_sysORTable.h net-snmp/agent/snmp_vars.h net-snmp/agent/util_funcs.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " + #include + #include + #include + +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +else + as_fn_error $? "missing net-snmp headers" "$LINENO" 5 +fi + +done + + + SNMP_SUPPORT=Yes + KA_CFLAGS="$KA_CFLAGS $NETSNMP_CFLAGS" + KA_LIBS="$KA_LIBS $NETSNMP_LIBS" + if test "$enable_snmp_rfc" = yes; then + SNMP_RFCV2_SUPPORT=Yes + SNMP_RFCV3_SUPPORT=Yes + else + if test "$enable_snmp_rfcv2" = yes; then + SNMP_RFCV2_SUPPORT=Yes + fi + if test "$enable_snmp_rfcv3" = yes; then + SNMP_RFCV3_SUPPORT=Yes + fi + fi + if test ${SNMP_RFCV2_SUPPORT} = Yes -o \ + ${SNMP_RFCV3_SUPPORT} = Yes; then + if test ${VRRP_SUPPORT} != Yes; then + as_fn_error $? "RFC SNMP support requires VRRP" "$LINENO" 5 + fi + SNMP_RFC_SUPPORT=Yes + fi + if test ${SNMP_RFCV3_SUPPORT} = Yes -a \ + "$enable_snmp_reply_v3_for_v2" != no; then + +$as_echo "#define _SNMP_REPLY_V3_FOR_V2_ 1 " >>confdefs.h + + SNMP_V3_FOR_V2=Yes + CONFIG_OPTIONS="$CONFIG_OPTIONS SNMP_V3_FOR_V2" + fi + + if test "$enable_snmp" = yes; then + SNMP_VRRP_SUPPORT=Yes + SNMP_CHECKER_SUPPORT=Yes + else + if test "$enable_snmp_vrrp" = yes; then + SNMP_VRRP_SUPPORT=Yes + fi + if test "$enable_snmp_checker" = yes; then + SNMP_CHECKER_SUPPORT=Yes + fi + fi + if test ${VRRP_SUPPORT} != Yes -a \ + ${SNMP_VRRP_SUPPORT} = Yes; then + as_fn_error $? "VRRP SNMP support requires VRRP" "$LINENO" 5 + fi + if test ${IPVS_SUPPORT} = No -a \ + ${SNMP_CHECKER_SUPPORT} = Yes; then + as_fn_error $? "CHECKER SNMP support requires checker" "$LINENO" 5 + fi + + if test ${SNMP_VRRP_SUPPORT} = Yes -o \ + ${SNMP_CHECKER_SUPPORT} = Yes; then + SNMP_KEEPALIVED_SUPPORT=Yes + fi + + CPPFLAGS="$SAV_CPPFLAGS" + CPPFLAGS="$SAV_CPPFLAGS" + CFLAGS="$SAV_CFLAGS" + LIBS="$SAV_LIBS" +fi + +if test $SNMP_SUPPORT = Yes; then + +$as_echo "#define _WITH_SNMP_ 1 " >>confdefs.h + +fi +if test $SNMP_KEEPALIVED_SUPPORT = Yes; then + +$as_echo "#define _WITH_SNMP_KEEPALIVED_ 1 " >>confdefs.h + +fi +if test $SNMP_VRRP_SUPPORT = Yes; then + +$as_echo "#define _WITH_SNMP_VRRP_ 1 " >>confdefs.h + + CONFIG_OPTIONS="$CONFIG_OPTIONS SNMP_VRRP" +fi +if test $SNMP_CHECKER_SUPPORT = Yes; then + +$as_echo "#define _WITH_SNMP_CHECKER_ 1 " >>confdefs.h + + CONFIG_OPTIONS="$CONFIG_OPTIONS SNMP_CHECKER" +fi +if test $SNMP_RFC_SUPPORT = Yes; then + +$as_echo "#define _WITH_SNMP_RFC_ 1 " >>confdefs.h + +fi +if test $SNMP_RFCV2_SUPPORT = Yes; then + +$as_echo "#define _WITH_SNMP_RFCV2_ 1 " >>confdefs.h + + CONFIG_OPTIONS="$CONFIG_OPTIONS SNMP_RFCV2" +fi +if test $SNMP_RFCV3_SUPPORT = Yes; then + +$as_echo "#define _WITH_SNMP_RFCV3_ 1 " >>confdefs.h + + CONFIG_OPTIONS="$CONFIG_OPTIONS SNMP_RFCV3" +fi + if test $SNMP_SUPPORT = Yes; then + SNMP_TRUE= + SNMP_FALSE='#' +else + SNMP_TRUE='#' + SNMP_FALSE= +fi + + if test $SNMP_KEEPALIVED_SUPPORT = Yes; then + SNMP_KEEPALIVED_TRUE= + SNMP_KEEPALIVED_FALSE='#' +else + SNMP_KEEPALIVED_TRUE='#' + SNMP_KEEPALIVED_FALSE= +fi + + if test $SNMP_VRRP_SUPPORT = Yes -o $SNMP_RFC_SUPPORT = Yes; then + SNMP_VRRP_TRUE= + SNMP_VRRP_FALSE='#' +else + SNMP_VRRP_TRUE='#' + SNMP_VRRP_FALSE= +fi + + if test $SNMP_CHECKER_SUPPORT = Yes; then + SNMP_CHECKER_TRUE= + SNMP_CHECKER_FALSE='#' +else + SNMP_CHECKER_TRUE='#' + SNMP_CHECKER_FALSE= +fi + + if test $SNMP_RFCV2_SUPPORT = Yes -o $SNMP_RFCV3_SUPPORT = Yes; then + SNMP_RFC_TRUE= + SNMP_RFC_FALSE='#' +else + SNMP_RFC_TRUE='#' + SNMP_RFC_FALSE= +fi + + if test $SNMP_RFCV2_SUPPORT = Yes; then + SNMP_RFCV2_TRUE= + SNMP_RFCV2_FALSE='#' +else + SNMP_RFCV2_TRUE='#' + SNMP_RFCV2_FALSE= +fi + + if test $SNMP_RFCV3_SUPPORT = Yes; then + SNMP_RFCV3_TRUE= + SNMP_RFCV3_FALSE='#' +else + SNMP_RFCV3_TRUE='#' + SNMP_RFCV3_FALSE= +fi + + if test $SNMP_V3_FOR_V2 = Yes; then + SNMP_REPLY_V3_FOR_V2_TRUE= + SNMP_REPLY_V3_FOR_V2_FALSE='#' +else + SNMP_REPLY_V3_FOR_V2_TRUE='#' + SNMP_REPLY_V3_FOR_V2_FALSE= +fi + + +DBUS_SUPPORT=No +DBUS_CREATE_INSTANCE=No +if test "$enable_dbus" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for g_bus_own_name in -lgio-2.0" >&5 +$as_echo_n "checking for g_bus_own_name in -lgio-2.0... " >&6; } +if ${ac_cv_lib_gio_2_0_g_bus_own_name+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgio-2.0 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char g_bus_own_name (); +int +main () +{ +return g_bus_own_name (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_gio_2_0_g_bus_own_name=yes +else + ac_cv_lib_gio_2_0_g_bus_own_name=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gio_2_0_g_bus_own_name" >&5 +$as_echo "$ac_cv_lib_gio_2_0_g_bus_own_name" >&6; } +if test "x$ac_cv_lib_gio_2_0_g_bus_own_name" = xyes; then : + + if test -n ""; then + KA_PKG_PFX= + else + KA_PKG_PFX=KA + fi + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CPPFLAGS + for item in `$PKG_CONFIG --cflags-only-I gio-2.0`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CPPFLAGS=\"\$${KA_PKG_PFX}_CPPFLAGS $ADD_NEW\" + + ADD_NEW= + eval var=\$${KA_PKG_PFX}_CFLAGS + for item in `$PKG_CONFIG --cflags-only-other gio-2.0`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_CFLAGS=\"\$${KA_PKG_PFX}_CFLAGS $ADD_NEW\" + + + if test . = .remove-requires; then + REQUIRES=`$PKG_CONFIG --print-requires gio-2.0` + var=`$PKG_CONFIG --libs-only-l gio-2.0` + for r in $REQUIRES; do + REQ_LIBS=`$PKG_CONFIG --libs-only-l $r` + for l in $REQ_LIBS; do + var=`echo " $var " | sed -e "s: $l : :g"` + done + done + var=`echo $var | sed -e "s:^ *::" -e "s: *$::"` + eval ${KA_PKG_PFX}_LIBS="\"$var\"" + + var=`echo $var | sed -e "s/-l//g"` + eval ${KA_PKG_PFX}_LIB_NAMES="\"$var\"" + else + ADD_NEW= + eval var=\$${KA_PKG_PFX}_LIBS + for item in `$PKG_CONFIG --libs gio-2.0`; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + ADD_NEW="$ADD_NEW $item" + fi + done + eval ${KA_PKG_PFX}_LIBS=\"\$${KA_PKG_PFX}_LIBS $ADD_NEW\" + + fi + + DBUS_SUPPORT=Yes + +$as_echo "#define _WITH_DBUS_ 1 " >>confdefs.h + + CONFIG_OPTIONS="$CONFIG_OPTIONS DBUS" + + CFLAGS="$($PKG_CONFIG --cflags gio-2.0)" + LIBS="$($PKG_CONFIG --libs gio-2.0)" + if test "$cross_compiling" = yes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot determine if need to call g_type_init(). Assuming yes for safety." >&5 +$as_echo "$as_me: WARNING: Cannot determine if need to call g_type_init(). Assuming yes for safety." >&2;} + need_g_type_init=1 + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +int +main () +{ +return !g_thread_functions_for_glib_use.mutex_lock; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + need_g_type_init=0 +else + need_g_type_init=1 +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + if test $need_g_type_init -eq 1; then + +$as_echo "#define DBUS_NEED_G_TYPE_INIT 1 " >>confdefs.h + + fi + LIBS= + CFLAGS= + if test "$enable_dbus_create_instance" = yes; then + +$as_echo "#define _WITH_DBUS_CREATE_INSTANCE_ 1 " >>confdefs.h + + DBUS_CREATE_INSTANCE=Yes + CONFIG_OPTIONS="$CONFIG_OPTIONS DBUS_CREATE_INSTANCE" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DBus create instance functionality is dangerous - why do you want it?" >&5 +$as_echo "$as_me: WARNING: DBus create instance functionality is dangerous - why do you want it?" >&2;} + fi + +else + as_fn_error $? "DBUS support requested but libgio-2.0 not found." "$LINENO" 5 +fi + +fi + if test $DBUS_SUPPORT = Yes; then + WITH_DBUS_TRUE= + WITH_DBUS_FALSE='#' +else + WITH_DBUS_TRUE='#' + WITH_DBUS_FALSE= +fi + + if test $DBUS_CREATE_INSTANCE = Yes; then + DBUS_CREATE_INSTANCE_TRUE= + DBUS_CREATE_INSTANCE_FALSE='#' +else + DBUS_CREATE_INSTANCE_TRUE='#' + DBUS_CREATE_INSTANCE_FALSE= +fi + + +SHA1_SUPPORT=No +if test "${enable_sha1}" = yes; then + for ac_header in openssl/sha.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "openssl/sha.h" "ac_cv_header_openssl_sha_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_sha_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OPENSSL_SHA_H 1 +_ACEOF + +else + as_fn_error $? "unable to find openssl/sha.h" "$LINENO" 5 +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA1_Init in -lcrypto" >&5 +$as_echo_n "checking for SHA1_Init in -lcrypto... " >&6; } +if ${ac_cv_lib_crypto_SHA1_Init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char SHA1_Init (); +int +main () +{ +return SHA1_Init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_crypto_SHA1_Init=yes +else + ac_cv_lib_crypto_SHA1_Init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA1_Init" >&5 +$as_echo "$ac_cv_lib_crypto_SHA1_Init" >&6; } +if test "x$ac_cv_lib_crypto_SHA1_Init" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBCRYPTO 1 +_ACEOF + + LIBS="-lcrypto $LIBS" + +else + + { ac_cv_lib_crypto_SHA1_Init=; unset ac_cv_lib_crypto_SHA1_Init;} + SAV_CFLAGS=$CFLAGS + CFLAGS=-fpic + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA1_Init in -lcrypto" >&5 +$as_echo_n "checking for SHA1_Init in -lcrypto... " >&6; } +if ${ac_cv_lib_crypto_SHA1_Init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char SHA1_Init (); +int +main () +{ +return SHA1_Init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_crypto_SHA1_Init=yes +else + ac_cv_lib_crypto_SHA1_Init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA1_Init" >&5 +$as_echo "$ac_cv_lib_crypto_SHA1_Init" >&6; } +if test "x$ac_cv_lib_crypto_SHA1_Init" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBCRYPTO 1 +_ACEOF + + LIBS="-lcrypto $LIBS" + +else + as_fn_error $? "SHA1 in OpenSSL required" "$LINENO" 5 +fi + + CFLAGS=$SAV_CFLAGS + KA_CFLAGS="$KA_CFLAGS -fpic" + +fi + + SHA1_SUPPORT=Yes + +$as_echo "#define _WITH_SHA1_ 1 " >>confdefs.h + +fi + if test $SHA1_SUPPORT = Yes; then + WITH_SHA1_TRUE= + WITH_SHA1_FALSE='#' +else + WITH_SHA1_TRUE='#' + WITH_SHA1_FALSE= +fi + + +SO_MARK_SUPPORT=No +if test "${enable_fwmark}" != no; then + ac_fn_c_check_decl "$LINENO" "SO_MARK" "ac_cv_have_decl_SO_MARK" "#include +" +if test "x$ac_cv_have_decl_SO_MARK" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SO_MARK $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + + SO_MARK_SUPPORT=Yes + +$as_echo "#define _WITH_SO_MARK_ 1 " >>confdefs.h + + SYSTEM_OPTIONS="$SYSTEM_OPTIONS SO_MARK" + +fi + +fi + +SAV_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -D_GNU_SOURCE" +ac_fn_c_check_decl "$LINENO" "CLONE_NEWNET" "ac_cv_have_decl_CLONE_NEWNET" "#include +" +if test "x$ac_cv_have_decl_CLONE_NEWNET" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_CLONE_NEWNET $ac_have_decl +_ACEOF + +for ac_func in setns +do : + ac_fn_c_check_func "$LINENO" "setns" "ac_cv_func_setns" +if test "x$ac_cv_func_setns" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SETNS 1 +_ACEOF + +fi +done + +CFLAGS="$SAV_CFLAGS" + if test $ac_cv_have_decl_CLONE_NEWNET = yes; then + WITH_NAMESPACES_TRUE= + WITH_NAMESPACES_FALSE='#' +else + WITH_NAMESPACES_TRUE='#' + WITH_NAMESPACES_FALSE= +fi + + +SAV_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -D_GNU_SOURCE" +ac_fn_c_check_decl "$LINENO" "SCHED_RR" "ac_cv_have_decl_SCHED_RR" "#include +" +if test "x$ac_cv_have_decl_SCHED_RR" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SCHED_RR $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + + SCHED_RT_SUPPORT=Yes + +$as_echo "#define _HAVE_SCHED_RT_ 1 " >>confdefs.h + + SYSTEM_OPTIONS="$SYSTEM_OPTIONS SCHED_RT" + + ac_fn_c_check_decl "$LINENO" "RLIMIT_RTTIME" "ac_cv_have_decl_RLIMIT_RTTIME" "#include +" +if test "x$ac_cv_have_decl_RLIMIT_RTTIME" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_RLIMIT_RTTIME $ac_have_decl +_ACEOF + + + ac_fn_c_check_decl "$LINENO" "SCHED_RESET_ON_FORK" "ac_cv_have_decl_SCHED_RESET_ON_FORK" "#include +" +if test "x$ac_cv_have_decl_SCHED_RESET_ON_FORK" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SCHED_RESET_ON_FORK $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + SYSTEM_OPTIONS="$SYSTEM_OPTIONS SCHED_RESET_ON_FORK" +else + +$as_echo "#define SCHED_RESET_ON_FORK 0 " >>confdefs.h + +fi + + +else + + SCHED_RT_SUPPORT=No + +fi + +CFLAGS="$SAV_CFLAGS" + +GNU_STD_PATHS=No +if test "${enable_gnu_std_paths}" = "yes"; then + +$as_echo "#define GNU_STD_PATHS 1 " >>confdefs.h + + PID_DIR=$localstatedir +else + PID_DIR=/var +fi + + +if test -z "$SPHINXBUILD"; then + SPHINXBUILDNAME=sphinx-build +else + SPHINXBUILDNAME=${SPHINXBUILD} +fi + +# Extract the first word of "$SPHINXBUILDNAME", so it can be a program name with args. +set dummy $SPHINXBUILDNAME; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_HAVE_SPHINX_BUILD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$HAVE_SPHINX_BUILD"; then + ac_cv_prog_HAVE_SPHINX_BUILD="$HAVE_SPHINX_BUILD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_HAVE_SPHINX_BUILD="Yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_HAVE_SPHINX_BUILD" && ac_cv_prog_HAVE_SPHINX_BUILD="No" +fi +fi +HAVE_SPHINX_BUILD=$ac_cv_prog_HAVE_SPHINX_BUILD +if test -n "$HAVE_SPHINX_BUILD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_SPHINX_BUILD" >&5 +$as_echo "$HAVE_SPHINX_BUILD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test $HAVE_SPHINX_BUILD = Yes; then + BUILD_DOCS_TRUE= + BUILD_DOCS_FALSE='#' +else + BUILD_DOCS_TRUE='#' + BUILD_DOCS_FALSE= +fi + + +MEM_CHECK=No +MEM_CHECK_LOG=No +if test "${enable_mem_check}" = "yes"; then + MEM_CHECK=Yes + +$as_echo "#define _MEM_CHECK_ 1 " >>confdefs.h + + CONFIG_OPTIONS="$CONFIG_OPTIONS MEM_CHECK" + if test "${enable_mem_check_log}" = "yes"; then + MEM_CHECK_LOG=Yes + +$as_echo "#define _MEM_CHECK_LOG_ 1 " >>confdefs.h + + CONFIG_OPTIONS="$CONFIG_OPTIONS MEM_CHECK_LOG" + fi +fi + +TIMER_CHECK=No +if test "${enable_timer_check}" = "yes"; then + TIMER_CHECK=Yes + +$as_echo "#define _TIMER_CHECK_ 1 " >>confdefs.h + + CONFIG_OPTIONS="$CONFIG_OPTIONS TIMER_CHECK" +fi + +if test "${enable_debug}" = yes; then + +$as_echo "#define _DEBUG_ 1 " >>confdefs.h + + ENABLE_DEBUG=Yes + CONFIG_OPTIONS="$CONFIG_OPTIONS DEBUG" +else + ENABLE_DEBUG=No +fi + if test $ENABLE_DEBUG = Yes; then + DEBUG_TRUE= + DEBUG_FALSE='#' +else + DEBUG_TRUE='#' + DEBUG_FALSE= +fi + + +if test "${enable_netlink_timers}" = yes; then + +$as_echo "#define _NETLINK_TIMERS_ 1 " >>confdefs.h + + ENABLE_NETLINK_TIMERS=Yes + CONFIG_OPTIONS="$CONFIG_OPTIONS NETLINK_TIMERS" +else + ENABLE_NETLINK_TIMERS=No +fi + +if test "${enable_smtp_alert_debug}" = yes; then + +$as_echo "#define _SMTP_ALERT_DEBUG_ 1 " >>confdefs.h + + ENABLE_SMTP_ALERT_DEBUG=Yes + CONFIG_OPTIONS="$CONFIG_OPTIONS SMTP_ALERT_DEBUG" + ENABLE_LOG_FILE_APPEND=Yes +else + ENABLE_SMTP_ALERT_DEBUG=No +fi + +if test "${enable_stacktrace}" = yes; then + +$as_echo "#define _WITH_STACKTRACE_ 1 " >>confdefs.h + + ENABLE_STACKTRACE=Yes + CONFIG_OPTIONS="$CONFIG_OPTIONS STACKTRACE" + KA_LDFLAGS="$KA_LDFLAGS -rdynamic" +else + ENABLE_STACKTRACE=No +fi + +if test "${enable_dump_threads}" = yes; then + +$as_echo "#define _WITH_DUMP_THREADS_ 1 " >>confdefs.h + + ENABLE_DUMP_THREADS=Yes + CONFIG_OPTIONS="$CONFIG_OPTIONS DUMP_THREADS" +else + ENABLE_DUMP_THREADS=No +fi + +if test "${enable_epoll_debug}" = yes; then + +$as_echo "#define _EPOLL_DEBUG_ 1 " >>confdefs.h + + ENABLE_EPOLL_DEBUG=Yes + CONFIG_OPTIONS="$CONFIG_OPTIONS EPOLL_DEBUG" +else + ENABLE_EPOLL_DEBUG=No +fi + +if test "${enable_epoll_thread_dump}" = yes; then + +$as_echo "#define _EPOLL_THREAD_DUMP_ 1 " >>confdefs.h + + ENABLE_EPOLL_THREAD_DUMP=Yes + CONFIG_OPTIONS="$CONFIG_OPTIONS EPOLL_THREAD_DUMP" +else + ENABLE_EPOLL_THREAD_DUMP=No +fi + +if test $ENABLE_EPOLL_THREAD_DUMP = Yes -o $ENABLE_DUMP_THREADS = Yes -o $ENABLE_EPOLL_DEBUG = Yes; then + +$as_echo "#define THREAD_DUMP 1 " >>confdefs.h + +fi + +if test "${enable_tsm_debug}" = yes; then + +$as_echo "#define _TSM_DEBUG_ 1 " >>confdefs.h + + ENABLE_TSM_DEBUG=Yes + CONFIG_OPTIONS="$CONFIG_OPTIONS TSM_DEBUG" +else + ENABLE_TSM_DEBUG=No +fi + +if test "${enable_vrrp_fd_debug}" = yes; then + +$as_echo "#define _VRRP_FD_DEBUG_ 1 " >>confdefs.h + + ENABLE_VRRP_FD_DEBUG=Yes + CONFIG_OPTIONS="$CONFIG_OPTIONS VRRP_FD_DEBUG" +else + ENABLE_VRRP_FD_DEBUG=No +fi + +if test "${with_fixed_if_type}"; then + if test "${with_fixed_if_type}" = yes -o ${with_fixed_if_type} = no; then + as_fn_error $? "An interface type must be specified with --with-fixed-if-type" "$LINENO" 5 + fi + +cat >>confdefs.h <<_ACEOF +#define _FIXED_IF_TYPE_ "${with_fixed_if_type}" +_ACEOF + + FIXED_IF_TYPE=${with_fixed_if_type} + CONFIG_OPTIONS="$CONFIG_OPTIONS FIXED_IF_TYPE=${with_fixed_if_type}" +else + FIXED_IF_TYPE= +fi + +WITH_PROFILING=No +if test "${enable_profile}" = yes; then + WITH_PROFILING=Yes + CONFIG_OPTIONS="$CONFIG_OPTIONS PROFILING" + KA_CFLAGS="$KA_CFLAGS -pg" +fi + if test $WITH_PROFILING = Yes; then + PROFILE_TRUE= + PROFILE_FALSE='#' +else + PROFILE_TRUE='#' + PROFILE_FALSE= +fi + + +if test "${enable_perf}" = yes; then + +$as_echo "#define _WITH_PERF_ 1 " >>confdefs.h + + ENABLE_PERF=Yes + CONFIG_OPTIONS="$CONFIG_OPTIONS PERF" + KA_CFLAGS="$KA_CFLAGS -pg" +else + ENABLE_PERF=No +fi + +if test ${enable_log_file} = yes; then + +$as_echo "#define ENABLE_LOG_TO_FILE 1 " >>confdefs.h + + ENABLE_LOG_FILE_APPEND=Yes + CONFIG_OPTIONS="$CONFIG_OPTIONS FILE_LOGGING" +fi + +if test ${ENABLE_LOG_FILE_APPEND} = Yes; then + +$as_echo "#define ENABLE_LOG_FILE_APPEND 1 " >>confdefs.h + + CONFIG_OPTIONS="$CONFIG_OPTIONS LOG_FILE_APPEND" +fi + +if test ${NEED_LIBDL} = Yes; then + KA_LIBS="$KA_LIBS -ldl" +fi + +echo " $KA_LIBS" | grep -qE -- " -l?pthread " +if test $? -eq 0 ;then + +$as_echo "#define _WITH_PTHREADS_ 1 " >>confdefs.h + +fi + +RPM_NO_BIP=1 +# Extract the first word of "rpm", so it can be a program name with args. +set dummy rpm; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_HAVE_RPM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$HAVE_RPM"; then + ac_cv_prog_HAVE_RPM="$HAVE_RPM" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_HAVE_RPM="Yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_HAVE_RPM" && ac_cv_prog_HAVE_RPM="No" +fi +fi +HAVE_RPM=$ac_cv_prog_HAVE_RPM +if test -n "$HAVE_RPM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_RPM" >&5 +$as_echo "$HAVE_RPM" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test $HAVE_RPM = Yes; then + # Extract the first word of "rpmbuild", so it can be a program name with args. +set dummy rpmbuild; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_HAVE_RPMBUILD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$HAVE_RPMBUILD"; then + ac_cv_prog_HAVE_RPMBUILD="$HAVE_RPMBUILD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_HAVE_RPMBUILD="Yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_HAVE_RPMBUILD" && ac_cv_prog_HAVE_RPMBUILD="No" +fi +fi +HAVE_RPMBUILD=$ac_cv_prog_HAVE_RPMBUILD +if test -n "$HAVE_RPMBUILD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_RPMBUILD" >&5 +$as_echo "$HAVE_RPMBUILD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + RPM_SRC_DIR=`rpm --eval "%{_sourcedir}"` + if ! test -d $RPM_SRC_DIR; then + HAVE_RPMBUILD=No + fi + if test $HAVE_RPMBUILD = Yes; then + rpmbuild --help | grep -q -- --build-in-place + RPM_NO_BIP=$? + fi +fi + if test $HAVE_RPM = Yes; then + RPM_TRUE= + RPM_FALSE='#' +else + RPM_TRUE='#' + RPM_FALSE= +fi + + if test $RPM_NO_BIP -eq 0; then + RPM_BIP_TRUE= + RPM_BIP_FALSE='#' +else + RPM_BIP_TRUE='#' + RPM_BIP_FALSE= +fi + + +INIT_TYPE= +if test -z $init_type; then + /sbin/init --version 2>/dev/null | grep -q upstart + if test $? -eq 0; then + INIT_TYPE=upstart + else + init_path=`which systemctl 2>/dev/null` + if test \( $? -eq 0 -a -x "$init_path" \); then + systemctl | grep -q -- "-\.mount" + if test $? -eq 0; then + INIT_TYPE=systemd + fi + fi + if test \( -z "$INIT_TYPE" -a -f /etc/init.d/networking \); then + init_path=`which openrc-run 2>/dev/null` + if test \( $? -eq 0 -a -x "$init_path" \); then + head -1 /etc/init.d/networking | grep -q "^#! */.*/openrc-run$" + if test $? -eq 0; then + INIT_TYPE=openrc + fi + fi + fi + if test \( -z "$INIT_TYPE" -a -f /etc/init.d/cron -a ! -h /etc/init.d/cron \); then + INIT_TYPE=SYSV + fi + fi +else + INIT_TYPE=$init_type +fi + +if test $default_config_file; then : + + if test $default_config_file = yes -o $default_config_file = no; then : + as_fn_error $? "A filename must be specified for default-config-file" "$LINENO" 5 + +fi + CONFIG_FILE=$default_config_file + CONFIG_OPTIONS="$CONFIG_OPTIONS DEFAULT_CONFIG_FILE=${default_config_file}" + ] +else + default_config_file="/etc/$PACKAGE/$PACKAGE.conf" +fi + +cat >>confdefs.h <<_ACEOF +#define DEFAULT_CONFIG_FILE "$default_config_file" +_ACEOF + +DEFAULT_CONFIG_FILE=$default_config_file + + +if test -z $INIT_TYPE; then + INIT_TYPE=undetected +elif test $INIT_TYPE = systemd; then + systemdsystemunitdir=$with_systemdsystemunitdir + +fi + + if test $INIT_TYPE = upstart; then + INIT_UPSTART_TRUE= + INIT_UPSTART_FALSE='#' +else + INIT_UPSTART_TRUE='#' + INIT_UPSTART_FALSE= +fi + + if test $INIT_TYPE = systemd; then + INIT_SYSTEMD_TRUE= + INIT_SYSTEMD_FALSE='#' +else + INIT_SYSTEMD_TRUE='#' + INIT_SYSTEMD_FALSE= +fi + + if test $INIT_TYPE = SYSV; then + INIT_SYSV_TRUE= + INIT_SYSV_FALSE='#' +else + INIT_SYSV_TRUE='#' + INIT_SYSV_FALSE= +fi + + if test $INIT_TYPE = openrc; then + INIT_OPENRC_TRUE= + INIT_OPENRC_FALSE='#' +else + INIT_OPENRC_TRUE='#' + INIT_OPENRC_FALSE= +fi + + if test $INIT_TYPE = SUSE; then + INIT_SUSE_TRUE= + INIT_SUSE_FALSE='#' +else + INIT_SUSE_TRUE='#' + INIT_SUSE_FALSE= +fi + + + +cat >>confdefs.h <<_ACEOF +#define CONFIGURATION_OPTIONS "$CONFIG_OPTIONS" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define SYSTEM_OPTIONS "$SYSTEM_OPTIONS" +_ACEOF + + +if test $NETLINK_VER -eq 0; then + NETLINK_VER=None +fi + +echo + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_GENHASH_TRUE}" && test -z "${BUILD_GENHASH_FALSE}"; then + as_fn_error $? "conditional \"BUILD_GENHASH\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${LIBNL1_TRUE}" && test -z "${LIBNL1_FALSE}"; then + as_fn_error $? "conditional \"LIBNL1\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${LIBNL3_TRUE}" && test -z "${LIBNL3_FALSE}"; then + as_fn_error $? "conditional \"LIBNL3\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${LIBNL_DYNAMIC_TRUE}" && test -z "${LIBNL_DYNAMIC_FALSE}"; then + as_fn_error $? "conditional \"LIBNL_DYNAMIC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${LIBIPTC_TRUE}" && test -z "${LIBIPTC_FALSE}"; then + as_fn_error $? "conditional \"LIBIPTC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${LIBIPSET_TRUE}" && test -z "${LIBIPSET_FALSE}"; then + as_fn_error $? "conditional \"LIBIPSET\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_IPVS_TRUE}" && test -z "${WITH_IPVS_FALSE}"; then + as_fn_error $? "conditional \"WITH_IPVS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_REGEX_TRUE}" && test -z "${WITH_REGEX_FALSE}"; then + as_fn_error $? "conditional \"WITH_REGEX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_VRRP_TRUE}" && test -z "${WITH_VRRP_FALSE}"; then + as_fn_error $? "conditional \"WITH_VRRP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${VRRP_AUTH_TRUE}" && test -z "${VRRP_AUTH_FALSE}"; then + as_fn_error $? "conditional \"VRRP_AUTH\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${VMAC_TRUE}" && test -z "${VMAC_FALSE}"; then + as_fn_error $? "conditional \"VMAC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_JSON_TRUE}" && test -z "${WITH_JSON_FALSE}"; then + as_fn_error $? "conditional \"WITH_JSON\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_BFD_TRUE}" && test -z "${WITH_BFD_FALSE}"; then + as_fn_error $? "conditional \"WITH_BFD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${SOCK_NONBLOCK_TRUE}" && test -z "${SOCK_NONBLOCK_FALSE}"; then + as_fn_error $? "conditional \"SOCK_NONBLOCK\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${FIB_ROUTING_TRUE}" && test -z "${FIB_ROUTING_FALSE}"; then + as_fn_error $? "conditional \"FIB_ROUTING\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${SNMP_TRUE}" && test -z "${SNMP_FALSE}"; then + as_fn_error $? "conditional \"SNMP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${SNMP_KEEPALIVED_TRUE}" && test -z "${SNMP_KEEPALIVED_FALSE}"; then + as_fn_error $? "conditional \"SNMP_KEEPALIVED\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${SNMP_VRRP_TRUE}" && test -z "${SNMP_VRRP_FALSE}"; then + as_fn_error $? "conditional \"SNMP_VRRP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${SNMP_CHECKER_TRUE}" && test -z "${SNMP_CHECKER_FALSE}"; then + as_fn_error $? "conditional \"SNMP_CHECKER\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${SNMP_RFC_TRUE}" && test -z "${SNMP_RFC_FALSE}"; then + as_fn_error $? "conditional \"SNMP_RFC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${SNMP_RFCV2_TRUE}" && test -z "${SNMP_RFCV2_FALSE}"; then + as_fn_error $? "conditional \"SNMP_RFCV2\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${SNMP_RFCV3_TRUE}" && test -z "${SNMP_RFCV3_FALSE}"; then + as_fn_error $? "conditional \"SNMP_RFCV3\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${SNMP_REPLY_V3_FOR_V2_TRUE}" && test -z "${SNMP_REPLY_V3_FOR_V2_FALSE}"; then + as_fn_error $? "conditional \"SNMP_REPLY_V3_FOR_V2\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_DBUS_TRUE}" && test -z "${WITH_DBUS_FALSE}"; then + as_fn_error $? "conditional \"WITH_DBUS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DBUS_CREATE_INSTANCE_TRUE}" && test -z "${DBUS_CREATE_INSTANCE_FALSE}"; then + as_fn_error $? "conditional \"DBUS_CREATE_INSTANCE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_SHA1_TRUE}" && test -z "${WITH_SHA1_FALSE}"; then + as_fn_error $? "conditional \"WITH_SHA1\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_NAMESPACES_TRUE}" && test -z "${WITH_NAMESPACES_FALSE}"; then + as_fn_error $? "conditional \"WITH_NAMESPACES\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_DOCS_TRUE}" && test -z "${BUILD_DOCS_FALSE}"; then + as_fn_error $? "conditional \"BUILD_DOCS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DEBUG_TRUE}" && test -z "${DEBUG_FALSE}"; then + as_fn_error $? "conditional \"DEBUG\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${PROFILE_TRUE}" && test -z "${PROFILE_FALSE}"; then + as_fn_error $? "conditional \"PROFILE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${RPM_TRUE}" && test -z "${RPM_FALSE}"; then + as_fn_error $? "conditional \"RPM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${RPM_BIP_TRUE}" && test -z "${RPM_BIP_FALSE}"; then + as_fn_error $? "conditional \"RPM_BIP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${INIT_UPSTART_TRUE}" && test -z "${INIT_UPSTART_FALSE}"; then + as_fn_error $? "conditional \"INIT_UPSTART\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${INIT_SYSTEMD_TRUE}" && test -z "${INIT_SYSTEMD_FALSE}"; then + as_fn_error $? "conditional \"INIT_SYSTEMD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${INIT_SYSV_TRUE}" && test -z "${INIT_SYSV_FALSE}"; then + as_fn_error $? "conditional \"INIT_SYSV\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${INIT_OPENRC_TRUE}" && test -z "${INIT_OPENRC_FALSE}"; then + as_fn_error $? "conditional \"INIT_OPENRC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${INIT_SUSE_TRUE}" && test -z "${INIT_SUSE_FALSE}"; then + as_fn_error $? "conditional \"INIT_SUSE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by Keepalived $as_me 2.0.10, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to . +Keepalived home page: ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +Keepalived config.status 2.0.10 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "keepalived/Makefile") CONFIG_FILES="$CONFIG_FILES keepalived/Makefile" ;; + "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; + "keepalived/core/Makefile") CONFIG_FILES="$CONFIG_FILES keepalived/core/Makefile" ;; + "keepalived.spec") CONFIG_FILES="$CONFIG_FILES keepalived.spec" ;; + "genhash/Makefile") CONFIG_FILES="$CONFIG_FILES genhash/Makefile" ;; + "keepalived/check/Makefile") CONFIG_FILES="$CONFIG_FILES keepalived/check/Makefile" ;; + "keepalived/vrrp/Makefile") CONFIG_FILES="$CONFIG_FILES keepalived/vrrp/Makefile" ;; + "keepalived/bfd/Makefile") CONFIG_FILES="$CONFIG_FILES keepalived/bfd/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "bin_install/Makefile") CONFIG_FILES="$CONFIG_FILES bin_install/Makefile" ;; + "keepalived/dbus/Makefile") CONFIG_FILES="$CONFIG_FILES keepalived/dbus/Makefile" ;; + "keepalived/etc/Makefile") CONFIG_FILES="$CONFIG_FILES keepalived/etc/Makefile" ;; + "keepalived/etc/init/Makefile") CONFIG_FILES="$CONFIG_FILES keepalived/etc/init/Makefile" ;; + "keepalived/etc/init.d/Makefile") CONFIG_FILES="$CONFIG_FILES keepalived/etc/init.d/Makefile" ;; + "doc/man/man8/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man8/Makefile" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + + +cat < + +AC_DEFUN([add_to_var], [$1="$$1 $2"]) +AC_DEFUN([add_to_var_ind], [eval $1=\"\$$1 $2\"]) dnl " + +AC_DEFUN([add_to_var_ind_unique], + ADD_NEW= + [ eval var=\$$1 + for item in $2; do + echo " $var " | $GREP -q " $item " + if test $? -ne 0; then + add_to_var([ADD_NEW], [$item]) + fi + done + add_to_var_ind([$1], [$ADD_NEW]) + ]) + +AC_DEFUN([add_pkg_config], + [ if test -n "$2"; then + KA_PKG_PFX=$2 + else + KA_PKG_PFX=KA + fi + add_to_var_ind_unique([${KA_PKG_PFX}_CPPFLAGS], [`$PKG_CONFIG --cflags-only-I $1`]) + add_to_var_ind_unique([${KA_PKG_PFX}_CFLAGS], [`$PKG_CONFIG --cflags-only-other $1`]) + + if test .$3 = .remove-requires; then + REQUIRES=`$PKG_CONFIG --print-requires $1` + var=`$PKG_CONFIG --libs-only-l $1` + for r in $REQUIRES; do + REQ_LIBS=`$PKG_CONFIG --libs-only-l $r` + for l in $REQ_LIBS; do + var=`echo " $var " | sed -e "s: $l : :g"` + done + done + var=`echo $var | sed -e "s:^ *::" -e "s: *$::"` + eval ${KA_PKG_PFX}_LIBS="\"$var\"" + + var=`echo $var | sed -e "s/-l//g"` + eval ${KA_PKG_PFX}_LIB_NAMES="\"$var\"" + else + add_to_var_ind_unique([${KA_PKG_PFX}_LIBS], [`$PKG_CONFIG --libs $1`]) + fi + ]) + +AC_DEFUN([add_pkg_config_without_libs], + [ if test -n "$2"; then + KA_PKG_PFX=$2 + else + KA_PKG_PFX=KA + fi + add_to_var_ind_unique([${KA_PKG_PFX}_CPPFLAGS], [$($PKG_CONFIG --cflags-only-I $1)]) + add_to_var_ind_unique([${KA_PKG_PFX}_CFLAGS], [$($PKG_CONFIG --cflags-only-other $1)]) + ]) + +AC_DEFUN([add_config_opt], [add_to_var([CONFIG_OPTIONS], [$1])]) + +AC_DEFUN([add_system_opt], [add_to_var([SYSTEM_OPTIONS], [$1])]) + +AC_DEFUN([get_lib_name], + [ + if test $LDD = :; then + AC_MSG_ERROR([ldd is required for dynamic run-time linking support]) + fi + + SAV_LIBS="$LIBS" + LIBS=-l$1 + AC_LINK_IFELSE([AC_LANG_SOURCE([[ + extern void $2(void); + int main(void) + { + $2(); + return 0; + } + ]])], [ + LIB_DETAILS=`$LDD ./conftest$EXEEXT | grep $1.so | sed -e "s/^[[ \t]]*//"` + LIB_NAME=`echo $LIB_DETAILS | sed -e "s/ .*//"` + ],[ + ]) + LIBS="$SAV_LIBS" + ]) + +# AS_VAR_COPY was introduced in autoconf 2.63b. +# Remove the following definition once require autoconf >= 2.64. +m4_ifndef([AS_VAR_COPY], +[m4_define([AS_VAR_COPY], +[AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])])]) + +dnl ----[ Process this file with autoconf to produce a configure script ]---- +AC_PREREQ([2.63]) +AC_INIT([Keepalived], [2.0.10], [keepalived-devel@lists.sourceforge.net], [], [http://www.keepalived.org/]) +AM_INIT_AUTOMAKE([-Wall -Werror -Woverride foreign]) + +AC_CONFIG_SRCDIR([keepalived/core/main.c]) + +AC_CONFIG_HEADERS([lib/config.h]) +AH_TOP( + [ +#ifndef _CONFIG_H +#define _CONFIG_H + ]) +AH_BOTTOM( + [ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + +#endif]) + +AC_CONFIG_FILES([Makefile keepalived/Makefile lib/Makefile keepalived/core/Makefile keepalived.spec \ + genhash/Makefile keepalived/check/Makefile keepalived/vrrp/Makefile \ + keepalived/bfd/Makefile doc/Makefile bin_install/Makefile keepalived/dbus/Makefile \ + keepalived/etc/Makefile keepalived/etc/init/Makefile keepalived/etc/init.d/Makefile \ + doc/man/man8/Makefile]) + + +MAINTAINERCLEANFILES="*~ *.orig *.rej core core.*" +AC_SUBST(MAINTAINERCLEANFILES) +CONFIG_OPTIONS= +SYSTEM_OPTIONS= + +AM_SILENT_RULES([yes]) + +PKG_PROG_PKG_CONFIG + +dnl ----[ Keepalived specific configure options ]---- +AC_ARG_ENABLE(lvs-syncd, + [AS_HELP_STRING([--disable-lvs-syncd], [do not use LVS synchronization daemon])]) +AC_ARG_ENABLE(lvs, + [AS_HELP_STRING([--disable-lvs], [do not use the LVS framework])]) +AC_ARG_ENABLE(lvs-64bit-stats, + [AS_HELP_STRING([--disable-lvs-64bit-stats], [do not use the LVS 64-bit stats])]) +AC_ARG_ENABLE(vrrp, + [AS_HELP_STRING([--disable-vrrp], [do not use the VRRP framework])]) +AC_ARG_ENABLE(bfd, + [AS_HELP_STRING([--enable-bfd], [use the BFD framework])]) +AC_ARG_WITH(kernel-dir, + [AS_HELP_STRING([--with-kernel-dir=DIR], [path to linux kernel source directory])], + [AS_HELP_STRING([kernel_src_path="$withval"],], [[kernel_src_path=""])]) +AC_ARG_ENABLE(fwmark, + [AS_HELP_STRING([--disable-fwmark], [compile without SO_MARK support])]) +AC_ARG_ENABLE(snmp, + [AS_HELP_STRING([--enable-snmp], [compile with SNMP support])]) +AC_ARG_ENABLE(snmp-vrrp, + [AS_HELP_STRING([--enable-snmp-vrrp], [compile with SNMP vrrp support])]) +AC_ARG_ENABLE(snmp-keepalived, + [AS_HELP_STRING([--enable-snmp-keepalived], [obsolete - use --enable-snmp-vrrp])]) +AC_ARG_ENABLE(snmp-checker, + [AS_HELP_STRING([--enable-snmp-checker], [compile with SNMP checker support])]) +AC_ARG_ENABLE(snmp-rfc, + [AS_HELP_STRING([--enable-snmp-rfc], [compile with SNMP RFC2787 (VRRPv2) and SNMP RFC6527 (VRRPv3) support])]) +AC_ARG_ENABLE(snmp-rfcv2, + [AS_HELP_STRING([--enable-snmp-rfcv2], [compile with SNMP RFC2787 (VRRPv2) support])]) +AC_ARG_ENABLE(snmp-rfcv3, + [AS_HELP_STRING([--enable-snmp-rfcv3], [compile with SNMP RFC6257 (VRRPv3) support])]) +AC_ARG_ENABLE(snmp-reply-v3-for-v2, + [AS_HELP_STRING([--disable-snmp-reply-v3-for-v2], [disable RFC6257 responses for VRRPv2 instances])]) +AC_ARG_ENABLE(dbus, + [AS_HELP_STRING([--enable-dbus], [compile with dbus support])]) +AC_ARG_ENABLE(dbus-create-instance, + [AS_HELP_STRING([--enable-dbus-create-instance], [compile with dbus support for creating instances])]) +AC_ARG_ENABLE(sha1, + [AS_HELP_STRING([--enable-sha1], [compile with SHA1 support])]) +AC_ARG_ENABLE(regex, + [AS_HELP_STRING([--enable-regex], [build with HTTP_GET regex checking])]) +AC_ARG_ENABLE(regex-timers, + [AS_HELP_STRING([--enable-regex-timers], [build with HTTP_GET regex timers])]) +AC_ARG_ENABLE(json, + [AS_HELP_STRING([--enable-json], [compile with signal to dump configuration and stats as json])]) +AC_ARG_WITH(init, + [AS_HELP_STRING([--with-init=(upstart|systemd|SYSV|SUSE|openrc)], [specify init type])], + [init_type="$withval"], [init_type=""]) +AC_ARG_ENABLE(vrrp-auth, + [AS_HELP_STRING([--disable-vrrp-auth], [compile without VRRP authentication])]) +AC_ARG_ENABLE(checksum_compat, + [AS_HELP_STRING([--disable-checksum-compat], [compile without v1.3.6 and earlier VRRPv3 unicast checksum compatibility])]) +AC_ARG_ENABLE(routes, + [AS_HELP_STRING([--disable-routes], [compile without ip rules/routes])]) +AC_ARG_ENABLE(gnu-std-paths, + [AS_HELP_STRING([--enable-gnu-std-paths], [use GNU standard paths for pid files etc])]) +AC_ARG_ENABLE(dynamic-linking, + [AS_HELP_STRING([--enable-dynamic-linking], [compile with/without dynamically linked libiptc/libipset])]) +AC_ARG_ENABLE(libiptc-dynamic, + [AS_HELP_STRING([--enable-libiptc-dynamic], [compile with libiptc dynamically linked])]) +AC_ARG_ENABLE(libipset-dynamic, + [AS_HELP_STRING([--disable-libipset-dynamic], [compile with libipset statically linked])]) +AC_ARG_ENABLE(libxtables-dynamic, + [AS_HELP_STRING([--enable-libxtables-dynamic], [compile with libxtables dynamically linked])]) +AC_ARG_ENABLE(libnl-dynamic, + [AS_HELP_STRING([--enable-libnl-dynamic], [compile with libnl dynamically linked])]) +AC_ARG_ENABLE(libiptc, + [AS_HELP_STRING([--disable-libiptc], [compile without libiptc])]) +AC_ARG_ENABLE(libipset, + [AS_HELP_STRING([--disable-libipset], [compile without libipset])]) +AC_ARG_ENABLE(libnl, + [AS_HELP_STRING([--disable-libnl], [compile without libnl])]) +AC_ARG_ENABLE(strict-config-checks, + [AS_HELP_STRING([--enable-strict-config-checks], [build with strict configuration checking])]) +AC_ARG_ENABLE(hardening, + [AS_HELP_STRING([--disable-hardening], [do not build with security hardening])]) +AC_ARG_ENABLE(optimise, + [AS_HELP_STRING([--optimise], [compiler optimisation level])], [], [enable_optimise=not-specified]) +AC_ARG_ENABLE(mem-check, + [AS_HELP_STRING([--enable-mem-check], [compile with memory alloc checking])]) +AC_ARG_ENABLE(mem-check-log, + [AS_HELP_STRING([--enable-mem-check-log], [compile with memory alloc checking writing to syslog])]) +AC_ARG_ENABLE(timer-check, + [AS_HELP_STRING([--enable-timer-check], [compile with set time logging])]) +AC_ARG_ENABLE(debug, + [AS_HELP_STRING([--enable-debug], [compile with debugging flags])]) +AC_ARG_ENABLE(netlink-timers, + [AS_HELP_STRING([--enable-netlink-timers], [compile with netlink command timers])]) +AC_ARG_ENABLE(smtp-alert-debug, + [AS_HELP_STRING([--enable-smtp-alert-debug], [compile with smtp-alert debugging])]) +AC_ARG_ENABLE(stacktrace, + [AS_HELP_STRING([--enable-stacktrace], [compile with stacktrace support])]) +AC_ARG_ENABLE(perf, + [AS_HELP_STRING([--enable-perf], [compile with perf performance data recording support for vrrp process])]) +AC_ARG_ENABLE(log-file, + [AS_HELP_STRING([--enable-log-file], [enable logging to file (-g)])]) +AC_ARG_ENABLE(dump-threads, + [ --enable-dump-threads compile with thread dumping support]) +AC_ARG_ENABLE(epoll-debug, + [ --enable-epoll-debug compile with epoll_wait() debugging support]) +AC_ARG_ENABLE(epoll-thread-dump, + [ --enable-epoll-thread-dump compile with epoll thread dumping support]) +AC_ARG_ENABLE(regex-debug, + [ --enable-regex-debug compile with regex debugging support]) +AC_ARG_ENABLE(tsm-debug, + [ --enable-tsm-debug compile with TSM debugging support]) +AC_ARG_ENABLE(vrrp-fd-debug, + [ --enable-vrrp-fd-debug compile with vrrp fd debugging support]) +AC_ARG_WITH(fixed-if-type, + [ --with-fixed-if-type=TYPE treat interface type TYPE as unchangeable]) +AC_ARG_WITH(default-config-file, + AS_HELP_STRING([--with-default-config-file=FILE], [Default configuration file]), + [default_config_file="$withval"], [default_config_file=""]) +AC_ARG_ENABLE(profile, + [AS_HELP_STRING([--enable-profile], [compile with profiling flags])]) +AC_ARG_ENABLE(conversion-checks, + [AS_HELP_STRING([--enable-conversion-checks], [compile with conversion warnings if sensible])]) +AC_ARG_ENABLE(force-conversion-checks, + [AS_HELP_STRING([--enable-force-conversion-checks], [compile with conversion warnings])]) +AC_ARG_ENABLE(Werror, + [AS_HELP_STRING([--enable-Werror], [compile with warnings being errors])]) + +AC_ARG_WITH([systemdsystemunitdir], + AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), + [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) + +# Set the kernel headers path +if test -n "$kernel_src_path"; then + kernelinc="-I$kernel_src_path/include" +elif test ! -d /usr/include/linux -a \ + -d /usr/src/linux/include; then + kernelinc="-I/usr/src/linux/include" +else + kernelinc= +fi + +CPPFLAGS="$kernelinc $CPPFLAGS" + +# Checks for programs. +AC_PROG_CC +AC_PROG_MAKE_SET +AC_PROG_INSTALL +AC_PROG_RANLIB +AC_PROG_GREP +AC_PROG_LN_S +AC_PROG_SED +AC_CHECK_TOOL(STRIP,strip) +AC_CHECK_TOOL(LDD,ldd) + +m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) +ARFLAGS=cr +AC_SUBST(ARFLAGS) + +# Default settings +ENABLE_LOG_FILE_APPEND=No + +# AC_PROG_LIBTOOL + +# +# save the configure arguments +# +args=`echo $ac_configure_args | $SED -e "s/'//g"` +AC_DEFINE_UNQUOTED(KEEPALIVED_CONFIGURE_OPTIONS,"$args", [configure options specified]) + +KA_CPPFLAGS="$kernelinc" +KA_CFLAGS="-Wall -Wunused -Wstrict-prototypes -Wextra -Winit-self -g -D_GNU_SOURCE" +KA_LDFLAGS= +KA_LIBS= +NEED_LIBDL=No +#KA_LIBTOOLFLAGS = + +# We want _GNU_SOURCE defined always +add_to_var([CFLAGS], [-D_GNU_SOURCE]) + +# Some sanity checks on configure options +AS_IF([test .$enable_vrrp = .no], + [ + AS_IF([test .$enable_perf = .yes], [AC_MSG_ERROR([enable-perf requires vrrp])]) + AS_IF([test .$enable_libiptc_dynamic = .yes], [AC_MSG_ERROR([enable-libiptc-dynamic requires vrrp])]) + AS_IF([test .$enable_libxtables_dynamic = .yes], [AC_MSG_ERROR([enable-libxtables-dynamic requires vrrp])]) + AS_IF([test .$enable_libiptc = .no], [AC_MSG_ERROR([disable-libiptc requires vrrp])]) + AS_IF([test .$enable_libipset = .no], [AC_MSG_ERROR([disable-libipset requires vrrp])]) + AS_IF([test $with_fixed_if_type], [AC_MSG_ERROR([with-fixed-if-type requires vrrp])]) + AS_IF([test .$enable_vrrp_fd_debug = .yes], [AC_MSG_ERROR([enable-vrrp-fd-debug requires vrrp])]) + AS_IF([test .$enable_tsm_debug = .yes], [AC_MSG_ERROR([enable-tsm-debug requires vrrp])]) + AS_IF([test .$enable_json = .yes], [AC_MSG_ERROR([enable-json requires vrrp])]) + AS_IF([test .$enable_snmp_vrrp = .yes], [AC_MSG_ERROR([enable-snmp-vrrp requires vrrp])]) + AS_IF([test .$enable_snmp_keepalived = .yes], [AC_MSG_ERROR([enable-snmp-keepalived requires vrrp])]) + AS_IF([test .$enable_snmp_rfc = .yes], [AC_MSG_ERROR([enable-snmp-rfc requires vrrp])]) + AS_IF([test .$enable_snmp_rfcv2 = .yes], [AC_MSG_ERROR([enable-snmp-rfcv2 requires vrrp])]) + AS_IF([test .$enable_snmp_rfcv3 = .yes], [AC_MSG_ERROR([enable-snmp-rfcv3 requires vrrp])]) + AS_IF([test .$enable_dbus = .yes], [AC_MSG_ERROR([enable-dbus requires vrrp])]) + AS_IF([test .$enable_vrrp_auth = .no], [AC_MSG_ERROR([disable-vrrp-auth requires vrrp])]) + AS_IF([test .$enable_checksum_compat = .no], [AC_MSG_ERROR([disable-checksum-compat requires vrrp])]) + AS_IF([test .$enable_routes = .no], [AC_MSG_ERROR([disable-routes requires vrrp])]) + AS_IF([test .$enable_bfd = yes], [AC_MSG_ERROR([enable-bfd requires vrrp])]) + ]) +AS_IF([test .$enable_snmp_rfc != .yes -a .$enable_snmp_rfcv3 != yes], + [ + AS_IF([test .$enable_snmp_reply_v3_for_v2 = .yes], [AC_MSG_ERROR([enable-snmp-reply-v3-for-v2 requires enable-snmp-rfcv3 or enable-snmp-rfc])]) + ]) +AS_IF([test .$enable_dbus != .yes], + [ + AS_IF([test .$enable_dbus_create_instance = .yes], [AC_MSG_ERROR([enable-dbus-create-instance requires enable-dbus])]) + ]) +AS_IF([test .$enable_lvs = .no], + AS_IF([test .$enable_regex = .yes], [AC_MSG_ERROR([enable-regex requires lvs])]) + AS_IF([test .$enable_libnl_dynamic = .yes], [AC_MSG_ERROR([enable-libnl-dynamic requires lvs])]) + AS_IF([test .$enable_libnl = .no], [AC_MSG_ERROR([disable-libnl requires lvs])]) + AS_IF([test .$enable_lvs_syncd = .no], [AC_MSG_ERROR([disable-lvs-syncd requires lvs])]) + AS_IF([test .$enable_lvs_64bit_stats = .no], [AC_MSG_ERROR([disable-lvs-64bit-stats requires lvs])]) + AS_IF([test .$enable_fwmark = .yes], [AC_MSG_ERROR([enable-fwmark requires lvs])]) + ]) +AS_IF([test .$enable_regex != .yes], + AS_IF([test .$enable_regex_timers = .yes], [AC_MSG_ERROR([enable-regex-timers requires enable-regex])]) + AS_IF([test .$enable_regex_debug = .yes], [AC_MSG_ERROR([enable-regex-debug requires enable-regex])]) + ]) + +if test "$enable_conversion_checks" = yes; then + # Check if we can sensibly enable -Wconversion + AC_MSG_CHECKING([for usable -Wconversion]) + SAV_CFLAGS="$CFLAGS" + CFLAGS="-Wconversion -O2 -Wp,-D_FORTIFY_SOURCE=2 -Werror" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include + #include + #include + #include + #include + #include + + #define VAL 255 + + static void + fun(uint8_t val) + { + } + + int main(int argc, char**argv) + { + fd_set set; + uint8_t val = 42; + unsigned u; + bool b; + size_t size = 17; + char c[2]; + char *c_ptr = c; + struct rtattr rta; + struct rtattr *rta_p = &rta; + + FD_SET(argc+1, &set); + + fun(argc == VAL ? VAL : val); + + // vrrp->lower_prio_no_advert = vrrp->strict_mode ? true : global_data->vrrp_lower_prio_no_advert; + u = u ? true : b; + + size = RTA_LENGTH(size); + c_ptr = RTA_DATA(c_ptr); + rta_p = RTA_NEXT(rta_p, size); + + val = (u < 256 ) ? u & 0xff : 0; + } + ]])], + [ + AC_MSG_RESULT([yes]) + add_to_var([KA_CFLAGS], [-Wconversion]) + ], + [ + AC_MSG_RESULT([no]) + AC_MSG_WARN([-Wconversion is not sensible with this compiler. Use --enable-force-conversion-checks to override.]) + ]) + CFLAGS="$SAV_CFLAGS" +elif test "$enable_force_conversion_checks" = yes; then + add_to_var([KA_CFLAGS], [-Wconversion]) +fi + +if test "$enable_Werror" = yes; then + add_to_var([KA_CFLAGS], [-Werror]) +fi + +AC_MSG_CHECKING([for -Wimplicit-fallthrough]) +SAV_CFLAGS="$CFLAGS" +CFLAGS="-Wimplicit-fallthrough=3" +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + int main(int argc, char**argv) + { + } + ]])], + [ + AC_MSG_RESULT([yes]) + add_to_var([KA_CFLAGS], [-Wimplicit-fallthrough=3]) + ], + [ + AC_MSG_RESULT([no]) + ]) +CFLAGS="$SAV_CFLAGS" + +dnl ---- [ Do we want stricter configuration checking? ] ---- +STRICT_CONFIG=No +if test "$enable_strict_config_checks" = yes; then + AC_DEFINE([_STRICT_CONFIG_], [ 1 ], [Define to 1 if want stricter configuration checking]) + STRICT_CONFIG=Yes + add_config_opt([STRICT_CONFIG]) +fi + +if test "$enable_hardening" != no; then + AC_MSG_CHECKING([for PIE support]) + SAV_CFLAGS="$CFLAGS" + SAV_LDFLAGS="$LDFLAGS" + CFLAGS="$CFLAGS -fPIE" + LDFLAGS="$LDFLAGS -pie" + AC_LINK_IFELSE([AC_LANG_SOURCE([[ + int main(int argc, char **argv) + { + int i = 0; + } + ]])], + AC_MSG_RESULT([yes]) + add_to_var([KA_CFLAGS], [-fPIE]) + add_to_var([KA_LDFLAGS], [-pie]), + AC_MSG_RESULT([no])) + CFLAGS=$SAV_CFLAGS + LDFLAGS=$SAV_LDFLAGS + + for FLAG in \ + "-Wformat -Werror=format-security" \ + "-Wp,-D_FORTIFY_SOURCE=2" \ + "-fexceptions" \ + "-fstack-protector-strong" \ + "--param=ssp-buffer-size=4" \ + "-grecord-gcc-switches" + do + AC_MSG_CHECKING([for $FLAG support]) + CFLAGS="$CFLAGS $FLAG" + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE([[ ]])], + [AC_MSG_RESULT([yes])] + add_to_var([KA_CFLAGS], [$FLAG]), + [AC_MSG_RESULT([no])]) + CFLAGS=$SAV_CFLAGS + done + + WL_FLAGS= + for FLAG in \ + "-z,relro" \ + "-z,now" + do + AC_MSG_CHECKING([for -Wl,$FLAG support]) + LDFLAGS="$LDFLAGS -Wl,$FLAG" + AC_LINK_IFELSE( + [AC_LANG_SOURCE([[ + int main(int argc, char **argv) + { + int i = 0; + } + ]])], + ( + AC_MSG_RESULT([yes]) + [WL_FLAGS="$WL_FLAGS,$FLAG"] + ), + ( + [AC_MSG_RESULT([no])] + ) + ) + CFLAGS=$SAV_CFLAGS + done + if test -n "$WL_FLAGS"; then + add_to_var([KA_LDFLAGS], [-Wl$WL_FLAGS]) + fi +fi + +# enable-optimise +AS_IF([test "$enable_optimise" = yes -o "$enable_optimise" = not-specified], [optimise_level=2], [optimise_level=$enable_optimise]) +AS_IF([test "$enable_optimise" = no], [optimise_level=0]) +AS_IF([test "$optimise_level" -eq 0], + [ + echo $KA_CFLAGS | $GREP -q -- "-D_FORTIFY_SOURCE=[[^0]]" + AS_IF([test $ret -eq 0], [AC_MSG_WARN([--disable-optimise requires --disable-hardening])]) + ]) +FLAG="-O$optimise_level" +AC_MSG_CHECKING([for $FLAG support]) +SAV_CFLAGS=$CFLAGS +CFLAGS="$CFLAGS $FLAG" +AC_COMPILE_IFELSE( + [AC_LANG_SOURCE([[ ]])], + [AC_MSG_RESULT([yes])] + add_to_var([KA_CFLAGS], [$FLAG]), + [ + AC_MSG_RESULT([no]) + AS_IF([test "$enable_optimise" != not-specified], [AC_MSG_ERROR([Invalid optimisation level specified])]) + ]) +CFLAGS=$SAV_CFLAGS + +AC_SUBST(KA_CPPFLAGS) +AC_SUBST(KA_CFLAGS) +AC_SUBST(KA_LDFLAGS) +AC_SUBST(KA_LIBS) +# AC_SUBST(KA_LIBTOOLFLAGS) + +# Checks for libraries. +dnl clock_gettime() required -lt before glibc 2.17 +AC_MSG_CHECKING([for clock_gettime() requires -lrt]) +AC_LINK_IFELSE([AC_LANG_SOURCE([[ + #include + int main(int argc, char **argv) + { + int i; + struct timespec ts; + + i = clock_gettime(CLOCK_MONOTONIC, &ts); + } + ]])], + [AC_MSG_RESULT([no])], + [ + SAV_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -lrt" + AC_LINK_IFELSE([AC_LANG_SOURCE([[ + #include + int main(int argc, char **argv) + { + int i; + struct timespec ts; + + i = clock_gettime(CLOCK_MONOTONIC, &ts); + } + ]])], + [AC_MSG_RESULT([yes])] + add_to_var([KA_LIBS], [-lrt]), + [AC_MSG_ERROR([clock_gettime() not supported])]) + LDFLAGS=$SAV_LDFLAGS + ]) + +# Checks for header files. +AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/prctl.h sys/socket.h sys/time.h syslog.h unistd.h], + [], [AC_MSG_ERROR([Missing/unusable system header file <$ac_header>])]) + +# check for kernel headers +SAV_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $kernelinc" +dnl -- needed until Linux 3.1 +dnl -- using AC_CHECK_HEADER causes a horrible error message for the user +NETLINK_EXTRA_INCLUDE= +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include + ]])], [], + [AC_CHECK_HEADER([linux/netlink.h], + [ + AC_DEFINE([NETLINK_H_NEEDS_SYS_SOCKET_H], [ 1 ], [Define to 1 if needs ]) + NETLINK_EXTRA_INCLUDE="#include " + ], [AC_MSG_ERROR([Missing/unusable kernel header file ])], + [[#include ]])]) + +dnl -- needed until ? Linux 3.1 +dnl -- using AC_CHECK_HEADER causes a horrible error message for the user +RTNETLINK_EXTRA_INCLUDE= +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include + ]])], [], + [AC_CHECK_HEADER([linux/rtnetlink.h], + [ + AC_DEFINE([RTNETLINK_H_NEEDS_SYS_SOCKET_H], [ 1 ], [Define to 1 if needs ]) + RTNETLINK_EXTRA_INCLUDE="#include " + ], [AC_MSG_ERROR([Missing/unusable kernel header file ])], + [[#include ]])]) + +AC_CHECK_HEADERS([asm/types.h linux/ethtool.h linux/icmpv6.h linux/if_ether.h linux/if_packet.h linux/ip.h linux/sockios.h linux/types.h], + [], [AC_MSG_ERROR([Missing/unusable kernel header file <$ac_header>])]) +AC_CHECK_HEADERS([linux/fib_rules.h linux/if_addr.h linux/if_link.h], + [], [AC_MSG_ERROR([Missing/unusable kernel header file <$ac_header>])], + [[$NETLINK_EXTRA_INCLUDE]]) +AC_CHECK_HEADERS([linux/if_arp.h], + [], [AC_MSG_ERROR([Missing/unusable <$ac_header>])], + [[#include ]]) +CPPFLAGS="$SAV_CPPFLAGS" + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_C_INLINE +AC_TYPE_INT64_T +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_TYPE_UINT16_T +AC_TYPE_UINT32_T +AC_TYPE_UINT64_T +AC_TYPE_UINT8_T +AC_C_CONST + +# Checks for library functions. +AC_FUNC_FORK +AC_FUNC_MALLOC +AC_FUNC_REALLOC +AC_CHECK_FUNCS([dup2 getcwd gettimeofday memmove memset select setenv socket strcasecmp strchr strdup strerror strpbrk strstr strtol strtoul uname]) +dnl - pipe2() since Linux 2.6.27 and glibc 2.9. +AC_CHECK_FUNCS([pipe2], [add_system_opt([PIPE2])]) +dnl - signalfd() since Linux 2.6.22 and glibc 2.8 +AC_CHECK_FUNCS([signalfd], [add_system_opt([SIGNALFD])]) +dnl - inotify_init1() since Linux 2.6.27 +AC_CHECK_FUNCS([inotify_init1], [add_system_opt([INOTIFY_INIT1])]) +dnl - vsyslog() Not defined by Posix, but available in glibc and musl +AC_CHECK_FUNCS([vsyslog], [add_system_opt([VSYSLOG])]) +dnl - epoll_create1() since Linux 2.6.27 and glibc 2.9 +AC_CHECK_FUNCS([epoll_create1], [add_system_opt([EPOLL_CREATE1])]) + +# glibc uses unsigned int as 3rd parameter to __assert_fail(), musl uses int. +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include + #include + + void __assert_fail(const char * a, const char *b, unsigned int l, const char *c) + { + exit(a[0] + b[0] + c[0] + l == 0); + } + ]])], + [LINE_type="unsigned int"], [LINE_type="int"]) +AC_DEFINE_UNQUOTED([LINE_type], [ $LINE_type ], [The type of parameter __line passed to __assert_fail()]) + +dnl Check if libc supports __always_inline +dnl See glibc sys/cdefs.h definition of __always_inline and comment +SAV_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -Wattributes -Werror" +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include + static __always_inline int + test_func(int val) + { + return val; + } + + int + main(int argc, char **argv) + { + int val = test_func(3); + } + ]])], + [], + [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + static __inline __attribute__ ((__always_inline__)) int + test_func(int val) + { + return val; + } + + int + main(int argc, char **argv) + { + int val = test_func(3); + } + ]])], + [AC_DEFINE([__always_inline], [__inline __attribute__ ((__always_inline__))], [Define __always_inline if libc does not define it])], + [AC_DEFINE([__always_inline], [inline], [Define __always_inline if libc does not define it])] + )]) +CFLAGS="$SAV_CFLAGS" + +dnl - Check type of rlim_t for printf() +SAV_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -Wformat -Werror" +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include + #include + int + main(int argc, char **argv) + { + rlim_t val = 23U; + printf("%llu", val); + } + ]])], + [AC_DEFINE([PRI_rlim_t], ["llu"], [Define printf format specifier for rlim_t])], + [AC_DEFINE([PRI_rlim_t], ["lu"], [Define printf format specifier for rlim_t])], + ) +CFLAGS="$SAV_CFLAGS" + +dnl - Do we want to override dynamic/static linking? +AS_IF([test "$enable_dynamic_linking"], + [ + AS_IF([test .$enable_vrrp != .no], + [ + enable_libiptc_dynamic=$enable_dynamic_linking + enable_libipset_dynamic=$enable_dynamic_linking + enable_libxtables_dynamic=$enable_dynamic_linking + ]) + AS_IF([test .$enable_vrrp != .no], + [ + enable_libnl_dynamic=$enable_dynamic_linking + ]) + ]) + +# check for missing definition - added in glibc 2.8 +AC_CHECK_DECLS([ETHERTYPE_IPV6], [], + [ + AC_DEFINE([ETHERTYPE_IPV6], [0x86dd], [Defined here if not found in .]) + ], + [[#include ]]) + +BUILD_GENHASH=Yes +dnl ----[ Checks for openssl ]---- +# check for openssl headers +NEED_MD5=no +NEED_SSL=no +if test "$enable_vrrp" != no -a \ + "$enable_vrrp_auth" != no; then + NEED_MD5=yes +fi +if test "$enable_lvs" != no; then + NEED_MD5=yes + NEED_SSL=yes +fi +AC_CHECK_HEADERS([openssl/ssl.h openssl/err.h], [], + [ + if test $NEED_SSL = yes; then + AC_MSG_ERROR([ + !!! OpenSSL is not properly installed on your system. !!! + !!! Can not include OpenSSL headers files. !!!]) + fi + BUILD_GENHASH=No + NEED_SSL=no + break + ]) +AC_CHECK_HEADERS([openssl/md5.h], [], + [ + if test $NEED_MD5 = yes; then + AC_MSG_ERROR([ + !!! OpenSSL is not properly installed on your system. !!! + !!! Can not include OpenSSL MD5 headers files. !!!]) + fi + BUILD_GENHASH=No + NEED_MD5=no + break + ]) +unset LIBS + +$PKG_CONFIG --exists openssl +if test $? -eq 0; then + add_pkg_config([openssl], [OPENSSL]) +else + OPENSSL_LIBS="-lssl -lcrypto" +fi + +EXTRA_LIBS=`echo $OPENSSL_LIBS | sed -e "s/-lcrypto//"` +AC_CHECK_LIB(crypto, MD5_Init, [], + [ + if test $NEED_MD5 = yes; then + AC_MSG_ERROR([OpenSSL MD5 libraries are required]) + fi + BUILD_GENHASH=No + ], [$EXTRA_LIBS]) +if test $NEED_MD5 = yes; then + add_to_var([KA_LIBS], [$LIBS]) +fi +add_to_var([GENHASH_LIBS], [$LIBS]) +unset LIBS + +EXTRA_LIBS=`echo $OPENSSL_LIBS | sed -e "s/-lssl//"` +AC_CHECK_LIB(ssl, SSL_CTX_new, [], + [ + if test $NEED_SSL = yes; then + AC_MSG_ERROR([OpenSSL libraries are required]) + fi + BUILD_GENHASH=No + ], [$EXTRA_LIBS]) +if test $NEED_SSL = yes; then + add_to_var([KA_LIBS], [$LIBS]) +fi +add_to_var([GENHASH_LIBS], [$LIBS]) + +# Introduced in OpenSSL ver 0.9.9 +LIBS=$OPENSSL_LIBS +AC_MSG_CHECKING([SSL_set_tlsext_host_name() - may be a definition]) +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include + int main(void) + { + request_t req; + SSL_set_tlsext_host_name(req.ssl, "SSL"); + } + ]])], [ + AC_MSG_RESULT([no]) + ], [ + AC_MSG_RESULT([yes]) + AC_DEFINE([_HAVE_SSL_SET_TLSEXT_HOST_NAME_], [ 1 ], [Define to 1 if have SSL_set_tlsext_host_name()]) +]) + +# SSL_CTX_set_verify_depth() introduced OpenSSL v0.9.5a +AC_CHECK_FUNCS([SSL_CTX_set_verify_depth]) + +# SSL_set0_rbio(), SSL_set0_wbio() and OPENSSL_init_crypto() introduced OpenSSL v1.1.0 +AC_CHECK_FUNCS([SSL_set0_rbio OPENSSL_init_crypto]) + +# TLS_method() introduced OpenSSL v1.1.0 +AC_CHECK_FUNCS([TLS_method]) + +unset LIBS + +if test $BUILD_GENHASH = No; then + AC_MSG_NOTICE([Unable to build genhash due to missing openssl headers/libraries]) + GENHASH_LIBS= +fi +AC_SUBST([GENHASH_LIBS]) +AM_CONDITIONAL([BUILD_GENHASH], [test $BUILD_GENHASH = Yes]) + +dnl ----[ Check for IPv4 devconf netlink support ]---- +IPV4_DEVCONF=No +if test .$enable_vrrp != .no; then + dnl ----[Check have IPV4_DEVCONF defines - since Linux 3.11]---- + SAV_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPP_FLAGS $kernelinc" + IPV4_DEVCONF=Yes + AC_CHECK_DECLS([ + IPV4_DEVCONF_ARP_IGNORE, + IPV4_DEVCONF_ACCEPT_LOCAL, + IPV4_DEVCONF_RP_FILTER, + IPV4_DEVCONF_ARPFILTER], + [], + [ + IPV4_DEVCONF=No + break + ], + [[#include ]]) + if test $IPV4_DEVCONF = Yes; then + AC_DEFINE([_HAVE_IPV4_DEVCONF_], [ 1 ], [Define to 1 if have IPv4 netlink device configuration]) + add_system_opt([IPV4_DEVCONF]) + fi + AC_CHECK_HEADERS([linux/rtnetlink.h], [], [AC_MSG_ERROR([Unusable linux/rtnetlink.h])], [$RTNETLINK_EXTRA_INCLUDE]) + CPPFLAGS="$SAV_CPPFLAGS" +fi + +dnl ----[ Checks for libraries ]---- +NETLINK_VER=0 +IPVS_USE_NL=No +if test .$enable_lvs != .no -a .${enable_libnl} != .no; then + $PKG_CONFIG --exists libnl-3.0 + if test $? -eq 0; then + add_pkg_config([libnl-3.0], [NL3], [remove-requires]) + AC_CHECK_LIB($NL3_LIB_NAMES, nl_socket_alloc, + [ + NETLINK_VER=3 + NEED_NL3=No + + add_pkg_config([libnl-genl-3.0], [GENL], [remove-requires]) + AC_CHECK_LIB($GENL_LIB_NAMES, genl_connect, [], + [AC_MSG_ERROR([libnl-3 is installed but not libnl-gen-3. Please, install libnl-gen-3/libnl-genl-3.])]) + IPVS_USE_NL=Yes + if test .$enable_libnl_dynamic = .yes; then + add_pkg_config_without_libs([libnl-genl-3.0]) + get_lib_name([$GENL_LIB_NAMES], [genl_connect]) + AC_DEFINE_UNQUOTED([NL3_GENL_LIB_NAME], [ "$LIB_NAME" ], [Define the nl-genl-3.0 library name]) + else + add_pkg_config([libnl-genl-3.0]) + fi + NEED_NL3=Yes + + if test $NEED_NL3 = Yes; then + AC_DEFINE([_HAVE_LIBNL3_], [ 1 ], [Define to 1 if using libnl-3]) + add_system_opt([LIBNL3]) + if test .$enable_libnl_dynamic = .yes; then + add_system_opt([LIBNL_DYNAMIC]) + add_pkg_config_without_libs([libnl-3.0]) + AC_DEFINE([_LIBNL_DYNAMIC_], [ 1 ], [Define to 1 if building with libnl dynamic linking]) + NEED_LIBDL=Yes + get_lib_name([$NL3_LIB_NAMES], [nl_socket_alloc]) + AC_DEFINE_UNQUOTED([NL3_LIB_NAME], [ "$LIB_NAME" ], [Define the nl-3 library name]) + else + add_pkg_config([libnl-3.0]) + fi + fi + ], []) + fi + + if test $NETLINK_VER -eq 0; then + AC_CHECK_LIB(nl, nl_socket_modify_cb, + [ + IPVS_USE_NL=Yes + NETLINK_VER=1 + AC_DEFINE([_HAVE_LIBNL1_], [ 1 ], [Define to 1 if using libnl-1]) + add_system_opt([LIBNL1]) + if test .$enable_libnl_dynamic = .yes; then + add_pkg_config_without_libs([libnl-1]) + add_config_opt([LIBNL_DYNAMIC]) + AC_DEFINE([_LIBNL_DYNAMIC_], [ 1 ], [Define to 1 if building with libnl dynamic linking]) + NEED_LIBDL=Yes + get_lib_name([nl], [nl_socket_modify_cb]) + AC_DEFINE_UNQUOTED([NL_LIB_NAME], [ "$LIB_NAME" ], [Define the nl library name]) + else + add_pkg_config([libnl-1]) + fi + ], + [AC_MSG_WARN([keepalived will be built without libnl support.]) + ]) + fi + + if test $NETLINK_VER -ne 0; then + SAV_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$SAV_CPPFLAGS $NL3_CPPFLAGS" + AC_CHECK_HEADERS([netlink/netlink.h], [], [AC_MSG_ERROR([netlink headers missing])]) + AC_CHECK_HEADERS([netlink/genl/ctrl.h netlink/genl/genl.h], [], [AC_MSG_ERROR([netlink genl headers missing])]) + CPPFLAGS="$SAV_CPPFLAGS" + fi +fi +AM_CONDITIONAL([LIBNL1], [test $NETLINK_VER -eq 1]) +AM_CONDITIONAL([LIBNL3], [test $NETLINK_VER -eq 3]) +AM_CONDITIONAL([LIBNL_DYNAMIC], [test .$enable_lvs != .no -a .$enable_libnl_dynamic = .yes -a $NETLINK_VER -ne 0]) + +AC_CHECK_LIB(magic, magic_open, + [ + AC_DEFINE([_HAVE_LIBMAGIC_], [ 1 ], [Define to 1 if have magic library]) + add_to_var([KA_LIBS], [-lmagic]) + ]) +unset LIBS + +dnl -- Check for the following variables introduced at various times into Linux +dnl --FRA_OIFNAME dnl -- Linux 2.6.33 +dnl --RTAX_QUICKACK dnl -- Linux 3.11 +dnl --FRA_SUPPRESS_PREFIXLEN dnl -- Linux 3.12 +dnl --FRA_SUPPRESS_IFGROUP dnl -- Linux 3.12 +dnl --RTAX_CC_ALGO dnl -- Linux 4.0 +dnl --RTA_VIA dnl -- Linux 4.1 +dnl --RTA_NEWDST dnl -- Linux 4.1 +dnl --RTA_PREF dnl -- Linux 4.1 +dnl --FRA_TUN_ID dnl -- Linux 4.3 +dnl --RTA_ENCAP dnl -- Linux 4.3 +dnl --RTEXT_FILTER_SKIP_STATS dnl -- Linux 4.4 +dnl --RTA_EXPIRES dnl -- Linux 4.5 +dnl --FRA_L3MDEV dnl -- Linux 4.8 +dnl --FRA_UID_RANGE dnl -- Linux 4.10 +dnl --RTAX_FASTOPEN_NO_COOKIE dnl -- Linux 4.15 +dnl --FRA_PROTOCOL dnl -- Linux 4.17 +dnl --FRA_IP_PROTO dnl -- Linux 4.17 +dnl --FRA_SPORT_RANGE dnl -- Linux 4.17 +dnl --FRA_DPORT_RANGE dnl -- Linux 4.17 +dnl --RTA_TTL_PROPAGATE dnl -- Linux 4.12 +AC_CHECK_DECLS([RTA_ENCAP, RTA_EXPIRES, RTA_NEWDST, RTA_PREF, FRA_SUPPRESS_PREFIXLEN, FRA_SUPPRESS_IFGROUP, FRA_TUN_ID, RTAX_CC_ALGO, RTAX_QUICKACK, RTEXT_FILTER_SKIP_STATS, FRA_L3MDEV, FRA_UID_RANGE, RTAX_FASTOPEN_NO_COOKIE, RTA_VIA, FRA_OIFNAME, FRA_PROTOCOL, FRA_IP_PROTO, FRA_SPORT_RANGE, FRA_DPORT_RANGE, RTA_TTL_PROPAGATE], [], [], + [[$RTNETLINK_EXTRA_INCLUDES + #include + #include + #include ]]) +for flag in RTA_ENCAP RTA_EXPIRES RTA_NEWDST RTA_PREF FRA_SUPPRESS_PREFIXLEN FRA_SUPPRESS_IFGROUP FRA_TUN_ID RTAX_CC_ALGO RTAX_QUICKACK RTEXT_FILTER_SKIP_STATS FRA_L3MDEV FRA_UID_RANGE RTAX_FASTOPEN_NO_COOKIE RTA_VIA FRA_OIFNAME FRA_PROTOCOL FRA_IP_PROTO FRA_SPORT_RANGE FRA_DPORT_RANGE RTA_TTL_PROPAGATE; do + AS_VAR_COPY([decl_var], [ac_cv_have_decl_$flag]) + if test ${decl_var} = yes; then + add_system_opt[${flag}] + fi +done + +dnl - Introduced in Linux 3.14 +AC_CHECK_DECLS([IFA_FLAGS], [], [], [[#include ]]) +for flag in IFA_FLAGS; do + AS_VAR_COPY([decl_var], [ac_cv_have_decl_$flag]) + if test ${decl_var} = yes; then + add_system_opt[${flag}] + fi +done + +dnl - Introduced in Linux 2.6.31, but not until glibc 2.17 +AC_CHECK_DECLS([IP_MULTICAST_ALL], + [ + add_system_opt[IP_MULTICAST_ALL] + # Check if definition is in netinet/in.h, since we can't include linux/in.h + # due to conflicting definitions + AC_LINK_IFELSE( + [ + AC_LANG_SOURCE( + [[ + #include + int main(int argc, char **argv) + { + int i = IP_MULTICAST_ALL; + } + ]]) + ], + [], + [ + # No - netinet/in.h doesn't have IP_MULTICAST_ALL + # Build a program that will output the value of the kernel's IP_MULTICAST_ALL + AC_LINK_IFELSE( + [ + AC_LANG_SOURCE( + [[ + #include + #include + #include + int main(int argc, char **argv) + { + printf("%d\n", IP_MULTICAST_ALL); + } + ]]) + ], + [ + # Create local definition of IP_MULTICAST_ALL + IMA=$(./conftest$EXEEXT) + AC_DEFINE_UNQUOTED([IP_MULTICAST_ALL], [ $IMA ], [Defined to value in if not in ]) + ]) + ] + ) + ], + [], + [[ + #include + #include + ]]) + +dnl -- RedHat backported ENCAP_IP and ENCAP_IP6 without MPLS and ILA +AC_CHECK_DECLS([LWTUNNEL_ENCAP_MPLS, LWTUNNEL_ENCAP_ILA], [], [], + [[#include ]]) +if test ${ac_cv_have_decl_RTA_ENCAP}; then + for flag in LWTUNNEL_ENCAP_MPLS LWTUNNEL_ENCAP_ILA; do + AS_VAR_COPY([decl_var], [ac_cv_have_decl_$flag]) + if test ${decl_var} = yes; then + add_system_opt[${flag}] + fi + done +fi + +dnl ----[Check for iptables libraries]---- +USE_LIBIPTC=No +USE_LIBIPSET=No +if test .${enable_libiptc} != .no -a .$enable_vrrp != .no; then + USE_LIBIPTC=Yes + dnl -- linux/netfilter/x_tables.h since Linux 2.6.16 + SAV_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $kernelinc" + AC_CHECK_HEADERS([linux/netfilter/x_tables.h xtables.h libiptc/libip6tc.h libiptc/libiptc.h libiptc/libxtc.h], [], + [ + USE_LIBIPTC=No + break + ]) + CPPFLAGS="$SAV_CPPFLAGS" + + if test $USE_LIBIPTC = Yes; then + add_pkg_config([--static libiptc], [IPTC]) + LIBS="$IPTC_LIBS" + SAV_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $kernelinc" + AC_CHECK_LIB(iptc, iptc_init, + [ + AC_DEFINE([_HAVE_LIBIPTC_], [ 1 ], [Define to 1 if have iptables libraries]) + add_system_opt([LIBIPTC]) + if test .${enable_libiptc_dynamic} != .yes; then + add_pkg_config([--static libiptc]) + dnl - Older versions of libiptc produced a requirement for -liptc, but we don't need it + KA_LIBS=`echo $KA_LIBS | sed -e "s/ -liptc//"` + dnl - Even older versions of libiptc don't produce any requirement other than -liptc + IPTC_LIBS=`echo $IPTC_LIBS | sed -e "s/ *-L[[^ ]]* */ /" -e "s/ *-liptc */ /" -e "s/^ *$//"` + if test ".$IPTC_LIBS" = .; then + KA_LIBS=`echo $KA_LIBS -lip4tc -lip6tc` + fi + else + add_pkg_config_without_libs([libiptc]) + add_config_opt([LIBIPTC_DYNAMIC]) + AC_DEFINE([_LIBIPTC_DYNAMIC_], [ 1 ], [Define to 1 if building with libiptc dynamic linking]) + NEED_LIBDL=Yes + get_lib_name([ip4tc], [iptc_init]) + AC_DEFINE_UNQUOTED([IP4TC_LIB_NAME], [ "$LIB_NAME" ], [Define the ip4tc library name]) + get_lib_name([ip6tc], [ip6tc_init]) + AC_DEFINE_UNQUOTED([IP6TC_LIB_NAME], [ "$LIB_NAME" ], [Define the ip6tc library name]) + fi + ], + [USE_LIBIPTC=No]) + CPPFLAGS="$SAV_CPPFLAGS" + fi + + if test $USE_LIBIPTC = Yes; then + if test .$enable_libxtables_dynamic != .yes; then + add_pkg_config([xtables]) + else + add_pkg_config_without_libs([xtables]) + AC_DEFINE([_LIBXTABLES_DYNAMIC_], [ 1 ], [Define to 1 if building with libxtables dynamic linking]) + add_config_opt([XTABLES_DYNAMIC]) + NEED_LIBDL=Yes + get_lib_name([xtables], [xtables_insmod]) + AC_DEFINE_UNQUOTED([XTABLES_LIB_NAME], [ "$LIB_NAME" ], [Define the xtables library name]) + fi + + dnl ----[Check for ipset libraries]---- + SAV_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $kernelinc" + if test "${enable_libipset}" != no; then + $PKG_CONFIG --exists libipset + if test $? -eq 0; then + add_pkg_config([libipset], [IPSET]) + else + IPSET_LIBS="-lipset" + fi + SAV_LIBS=$LIBS + LIBS="$IPTC_LIBS $IPSET_LIBS" + + AC_CHECK_LIB(ipset, ipset_session_init, + [ + USE_LIBIPSET=Yes + AC_CHECK_HEADERS([libipset/data.h libipset/linux_ip_set.h libipset/session.h libipset/types.h], [], + [ + USE_LIBIPSET=No + break + ]) + + if test $USE_LIBIPSET = Yes; then + AC_CHECK_LIB(xtables, xtables_insmod, [], [USE_LIBIPSET=No]) + fi + + if test $USE_LIBIPSET = Yes; then + dnl -- Need to use for prior to Linux 3.4 + EXTRA_INCLUDE= + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include + ]])], + [AC_CHECK_HEADERS([linux/netfilter/xt_set.h], [], [USE_LIBIPSET=No], [])], + [AC_CHECK_HEADER([linux/netfilter/xt_set.h], + [ + AC_DEFINE([USE_LIBIPSET_LINUX_IP_SET_H], [ 1 ], [Define to 1 if needs ]) + EXTRA_INCLUDE="#include " + ], [USE_LIBIPSET=No], + [[#include ]]) + ] + ) + fi + + if test $USE_LIBIPSET = Yes; then + AC_DEFINE([_HAVE_LIBIPSET_], [ 1 ], [Define to 1 if have ipset library]) + $PKG_CONFIG --exists libipset + if test $? -eq 0; then + if test .${enable_libipset_dynamic} = .no; then + add_pkg_config([libipset]) + else + add_pkg_config_without_libs([libipset]) + fi + elif test .${enable_libipset_dynamic} = .no; then + add_to_var([KA_LIBS], [-lipset]) + fi + if test .${enable_libipset_dynamic} != .no; then + AC_DEFINE([_LIBIPSET_DYNAMIC_], [ 1 ], [Define to 1 if building with libipset dynamic linking]) + add_config_opt([LIBIPSET_DYNAMIC]) + NEED_LIBDL=Yes + get_lib_name([ipset], [ipset_session_init]) + AC_DEFINE_UNQUOTED([IPSET_LIB_NAME], [ "$LIB_NAME" ], [Define the ipset library name]) + else + add_config_opt([LIBIPSET]) + fi + + dnl -- xt_set_info_match first introduced in Linux 2.6.39 (initial implementation of ipsets) + dnl -- xt_set_info_match_v1 declared since Linux 3.1 + AC_CHECK_MEMBER([struct xt_set_info_match_v1.match_set.index], [AC_DEFINE([HAVE_XT_SET_INFO_MATCH_V1], [ 1 ], [Define to 1 if have struct xt_set_info_match_v1])], [], + [ + $EXTRA_INCLUDE + #include + ]) + dnl -- xt_set_info_match_v3 declared since Linux 3.10 + AC_CHECK_MEMBER([struct xt_set_info_match_v3.match_set.index], [AC_DEFINE([HAVE_XT_SET_INFO_MATCH_V3], [ 1 ], [Define to 1 if have struct xt_set_info_match_v3])], [], + [ + $EXTRA_INCLUDE + #include + ]) + dnl -- xt_set_info_match_v4 declared since Linux 3.19 + AC_CHECK_MEMBER([struct xt_set_info_match_v4.match_set.index], [AC_DEFINE([HAVE_XT_SET_INFO_MATCH_V4], [ 1 ], [Define to 1 if have struct xt_set_info_match_v4])], [], + [ + $EXTRA_INCLUDE + #include + ]) + + dnl - ipset type iface introduced in Linux 3.1 + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include + int main(void) { int var = IPSET_ATTR_IFACE; } + ]])], + [AC_DEFINE([HAVE_IPSET_ATTR_IFACE], [ 1 ], [Define to 1 if ipset supports iface type])]) + + dnl - The include guard for has the leading _UAPI remove when + dnl - the source code is processed to produce the actual header files. + dnl - Unfortunately libipset provides a copy of the kernel headers, as , + dnl - but it doesn't remove the _UAPI from the header files when installing them. + dnl - Unfortunately we need to include some libipset header files, which include the + dnl - libipset version, and also which includes the kernel version. + dnl - To get around this problem, after include one of these we need to define the header guard + dnl - for the other, to stop it being included as well. + dnl - This is reported as a bug against ipset at https://bugzilla.netfilter.org/show_bug.cgi?id=1139 + dnl - We will take the kernel version if there is an inclusion collision. + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include + #include + int main(void) {} + ]])], [], + [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include + #ifdef _UAPI_IP_SET_H + #error _UAPI_IP_SET_H defined + #endif + int main(void) {} + ]])], + [AC_DEFINE([LIBIPSET_H_ADD_UAPI_IP_SET_H_GUARD], [1], [Define to add guard _UAPI_IP_SET_H before including ])], + [AC_DEFINE([LIBIPSET_H_ADD_IP_SET_H_GUARD], [1], [Define to add guard _IP_SET_H before including ])]) + ]) + fi + + if test $USE_LIBIPSET = Yes; then + AC_MSG_CHECKING([for libipset version 7 or later]) + AC_COMPILE_IFELSE([AC_LANG_SOURCE( + [[ + #include + + void test_func(void) + { + ipset_session_init(NULL, NULL); + } + ]])], + [ + AC_MSG_RESULT([yes]) + ], + [ + AC_MSG_RESULT([no]) + AC_DEFINE([LIBIPSET_PRE_V7_COMPAT], [ 1 ], [Define to 1 if libipset library version prior to v7]) + add_system_opt[LIBIPSET_PRE_V7] + ]) + fi + ]) + LIBS="$SAV_LIBS" + fi + + dnl -- XT_EXTENSION_MAXNAMELEN not defined until Linux 2.6.35 + AC_CHECK_DECL([XT_EXTENSION_MAXNAMELEN], [], + [AC_DEFINE([XT_EXTENSION_MAXNAMELEN], [ (XT_FUNCTION_MAXNAMELEN - 1) ], [Define if doesnt define it])], + [#include ]) + + CPPFLAGS="$SAV_CPPFLAGS" + fi +fi +AM_CONDITIONAL([LIBIPTC], [test $USE_LIBIPTC = Yes]) +AM_CONDITIONAL([LIBIPSET], [test $USE_LIBIPSET = Yes]) +unset LIBS + +dnl ----[Check if have linux/if.h and net/if.h namespace collision]---- +# Including and can cause a namespace collision. +# Later versions of the headers are OK if linux/if.h is included second +AC_MSG_CHECKING([for linux/if.h and net/if.h namespace collision]) +SAV_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $kernelinc" +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include + #include + ]])], + [ + AC_MSG_RESULT([no]) + ], + [ + AC_MSG_RESULT([yes]) + AC_DEFINE([_HAVE_NET_LINUX_IF_H_COLLISION_], [ 1 ], [Define to 1 if have linux/if.h followed by net/if.h namespace collision]) + add_system_opt([NET_LINUX_IF_H_COLLISION]) + ]) +CPPFLAGS="$SAV_CPPFLAGS" + +dnl ----[Check if have linux/if_ether.h and netinet/if_ether.h namespace collision]---- +# Including and causes a namespace collision +# with musl libc, but the collision only occurs if linux/ip_ether.h is included +# before netinet/if_ether.h. The problem is that we want to include them in that +# order. +AC_MSG_CHECKING([for linux/if_ether.h then netinet/if_ether.h namespace collision]) +SAV_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $kernelinc" +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include + #include + ]])], + [ + AC_MSG_RESULT([no]) + ], + [ + AC_MSG_RESULT([yes]) + AC_DEFINE([_HAVE_NETINET_LINUX_IF_ETHER_H_COLLISION_], [ 1 ], [Define to 1 if have linux/if_ether.h then netinet/if_ether.h namespace collision]) + add_system_opt([NETINET_LINUX_IF_ETHER_H_COLLISION]) + ]) +CPPFLAGS="$SAV_CPPFLAGS" + +# Linux 4.5 to 4.5.4 has indirectly including +# and which causes a namespace collision. +AC_MSG_CHECKING([for libiptc/libiptc.h linux/if.h and net/if.h namespace collision]) +SAV_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $kernelinc" +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include + ]])], + [ + AC_MSG_RESULT([no]) + ], + [ + AC_MSG_RESULT([yes]) + AC_DEFINE([_HAVE_LIBIPTC_LINUX_NET_IF_H_COLLISION_], [ 1 ], [Define to 1 if have libiptc/libiptc.h linux/if.h and net/if.h namespace collision]) + add_system_opt([LIBIPTC_LINUX_NET_IF_H_COLLISION]) + ]) +CPPFLAGS="$SAV_CPPFLAGS" + +dnl ----[ Checks for LVS, VRRP and BFD support ]---- +IPVS_SYNCD_ATTRIBUTES=No +IPVS_64BIT_STATS=No +WITH_REGEX=No +ENABLE_REGEX_DEBUG=No +if test "$enable_lvs" != no; then + IPVS_SUPPORT=Yes + add_config_opt([LVS]) + AC_DEFINE([_WITH_LVS_], [ 1 ], [Define to 1 if have IPVS support]) + + dnl -- exists from Linux 2.6.27; prior to that is used + AC_CHECK_HEADERS([linux/ip_vs.h], + [ + dnl -- From Linux 2.6.35 (but CentOS has it in 2.6.32) + AC_CHECK_DECLS([IP_VS_SVC_F_ONEPACKET], [], [], + [[#include ]]) + ]) + + if test $IPVS_USE_NL = Yes; then + AC_DEFINE([LIBIPVS_USE_NL], [ 1 ], [Define to 1 if libipvs can use netlink]) + add_system_opt([LIBIPVS_NETLINK]) + fi + + dnl ----[ IPVS syncd options ]--- + SAV_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $kernelinc" + + dnl -- Since Linux 3.18 + AC_CHECK_DECLS([IPVS_DEST_ATTR_ADDR_FAMILY], [add_system_opt([IPVS_DEST_ATTR_ADDR_FAMILY])], [], [#include ]) + + dnl -- Since Linux ?.?.? + IPVS_SYNCD_ATTRIBUTES=Yes + AC_CHECK_DECLS([ + IPVS_DAEMON_ATTR_SYNC_MAXLEN, + IPVS_DAEMON_ATTR_MCAST_GROUP, + IPVS_DAEMON_ATTR_MCAST_GROUP6, + IPVS_DAEMON_ATTR_MCAST_PORT, + IPVS_DAEMON_ATTR_MCAST_TTL], [], + [ + IPVS_SYNCD_ATTRIBUTES=No + break + ], + [[#include ]]) + + dnl -- Since Linux 4.3 + if test $IPVS_SYNCD_ATTRIBUTES = Yes; then + AC_DEFINE([_HAVE_IPVS_SYNCD_ATTRIBUTES_], [ 1 ], [Define to 1 if have IPVS syncd attributes]) + add_system_opt([IPVS_SYNCD_ATTRIBUTES]) + fi + + dnl ----[ IPVS 64-bit stats ]---- + dnl -- Since Linux 4.1 + if test "$enable_lvs_64bit_stats" != "no"; then + IPVS_64BIT_STATS=Yes + AC_CHECK_DECLS([ + IPVS_SVC_ATTR_STATS64, + IPVS_DEST_ATTR_STATS64], [], + [ + IPVS_64BIT_STATS=No + break + ], + [[#include ]]) + if test $IPVS_64BIT_STATS = Yes; then + AC_DEFINE([_WITH_LVS_64BIT_STATS_], [ 1 ], [Define to 1 if have IPVS 64 bit stats]) + add_system_opt([IPVS_64BIT_STATS]) + fi + fi + CPPFLAGS="$SAV_CPPFLAGS" + + dnl ----[ Is HTTP_GET regex checking wanted? ]---- + AS_IF([test "$enable_regex" = yes], + [ + $PKG_CONFIG --exists libpcre2-8 + HAVE_PCRE2=$? + AS_IF([test $HAVE_PCRE2 -ne 0], [AC_MSG_ERROR([cannot find pcre library])]) + AC_MSG_CHECKING([for pcre.h]) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #define PCRE2_CODE_UNIT_WIDTH 8 + #include + ]])], + [ + AC_MSG_RESULT([yes]) + WITH_REGEX=Yes + add_pkg_config([libpcre2-8]) + AC_DEFINE([_WITH_REGEX_CHECK_], [ 1 ], [Define to 1 to build with HTTP_GET regex checking]) + add_config_opt([REGEX]) + ], + [ + AC_MSG_RESULT([no]) + AC_MSG_ERROR([pcre2.h is missing]) + ]) + if test "$enable_regex_timers" = yes; then + AC_DEFINE([_WITH_REGEX_TIMERS_], [ 1 ], [Define to 1 to include regex timers]) + fi + + if test "${enable_regex_debug}" = yes; then + AC_DEFINE([_REGEX_DEBUG_], [ 1 ], [Define to 1 to build with regex debugging support]) + ENABLE_REGEX_DEBUG=Yes + add_config_opt([REGEX_DEBUG]) + fi + ]) +else + IPVS_SUPPORT=No +fi +AM_CONDITIONAL([WITH_IPVS], [test $IPVS_SUPPORT = Yes]) +AM_CONDITIONAL([WITH_REGEX], [test $WITH_REGEX = Yes]) + +dnl ----[ Checks for kernel netlink support ]---- +VRRP_SUPPORT=No +VRRP_AUTH_SUPPORT=No +MACVLAN_SUPPORT=No +ENABLE_JSON=No +BFD_SUPPORT=No +if test "$enable_vrrp" != no; then + VRRP_SUPPORT=Yes + AC_DEFINE([_WITH_VRRP_], [ 1 ], [Define to 1 if have VRRP support]) + add_config_opt([VRRP]) + + dnl ----[ check for VRRP authentication support ]---- + if test "${enable_vrrp_auth}" != no; then + VRRP_AUTH_SUPPORT=Yes + AC_DEFINE([_WITH_VRRP_AUTH_], [ 1 ], [Define to 1 if want ARRP authentication support]) + add_config_opt([VRRP_AUTH]) + fi + + dnl ----[ Checks for kernel VMAC support ]---- + SAV_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $kernelinc" + MACVLAN_SUPPORT=Yes + dnl -- Since Linux 2.6.33 + AC_CHECK_DECLS([ + IFLA_MACVLAN_MODE, + MACVLAN_MODE_PRIVATE], [], + [ + MACVLAN_SUPPORT=No + break + ], [[ + #include + #include + ]]) + if test $MACVLAN_SUPPORT = Yes; then + AC_DEFINE([_HAVE_VRRP_VMAC_], [ 1 ], [Define to 1 if have MAC VLAN support]) + add_system_opt([VRRP_VMAC]) + fi + CPPFLAGS="$SAV_CPPFLAGS" + + dnl ----[ Json output or not ? ]---- + if test "${enable_json}" = yes; then + JSON_HEADERS=$($PKG_CONFIG --cflags-only-I json-c) + SAV_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $JSON_HEADERS" + AC_CHECK_HEADERS(json.h,,AC_MSG_ERROR([unable to find json.h])) + CPPFLAGS="$SAV_CPPFLAGS" + AC_DEFINE([_WITH_JSON_], [ 1 ], [Define to 1 to build with json output support]) + add_pkg_config([json-c]) + ENABLE_JSON=Yes + add_config_opt([JSON]) + fi + + dnl ----[ BFD support ? ]---- + if test "${enable_bfd}" = yes; then + BFD_SUPPORT=Yes + AC_DEFINE([_WITH_BFD_], [ 1 ], [Define to 1 if have BFD support]) + add_config_opt([BFD]) + fi +fi +AM_CONDITIONAL([WITH_VRRP], [test $VRRP_SUPPORT = Yes]) +AM_CONDITIONAL([VRRP_AUTH], [test $VRRP_AUTH_SUPPORT = Yes]) +AM_CONDITIONAL([VMAC], [test $MACVLAN_SUPPORT = Yes]) +AM_CONDITIONAL([WITH_JSON], [test $ENABLE_JSON = Yes]) +AM_CONDITIONAL([WITH_BFD], [test $BFD_SUPPORT = Yes]) + +if test ${IPVS_SUPPORT} = No -a ${VRRP_SUPPORT} = No; then + AC_MSG_ERROR([keepalived MUST be compiled with at least one of LVS or VRRP framework]) +fi + +dnl ----[ Checks for glibc SOCK_NONBLOCK support ]---- +# Introduced in Linux 2.6.27 and glibc 2.9 +AC_CHECK_DECLS([SOCK_NONBLOCK], [add_system_opt([SOCK_NONBLOCK])], [],[[#include ]]) +AM_CONDITIONAL([SOCK_NONBLOCK], [test $ac_cv_have_decl_SOCK_NONBLOCK = yes]) + +dnl ----[ Checks for glibc SOCK_CLOEXEC support ]---- +# Introduced in Linux 2.6.27 and glibc 2.9 +AC_CHECK_DECLS([SOCK_CLOEXEC], [add_system_opt([SOCK_CLOEXEC])], [],[[#include ]]) + +dnl ----[ Checks for pe support ]---- +# Introduced in Linux 2.6.37 +AC_CHECK_DECL([IPVS_SVC_ATTR_PE_NAME], + [ + AC_DEFINE([_HAVE_PE_NAME_], [ 1 ], [Define to 1 if have pe selection support]) + ], + [], [[#include ]]) + +dnl ----[ Checks for O_PATH support ]---- +# Introduced in Linux 2.6.39 +SAV_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -D_GNU_SOURCE" +AC_CHECK_DECLS([O_PATH], + [ + add_system_opt([O_PATH]) + ], [],[[#include ]]) +CFLAGS="$SAV_CFLAGS" + +dnl ----[ Check for GLOB_BRACE support ]---- +AC_CHECK_DECLS([GLOB_BRACE], [add_system_opt([GLOB_BRACE])], [], [[#include ]]) + +dnl ----[ Do we want v1.3.6 and earlier VRRPv3 unicast checksum compatibility support ]---- +UNICAST_CHKSUM_COMPAT_SUPPORT=No +if test .$enable_checksum_compat != .no; then + UNICAST_CHKSUM_COMPAT_SUPPORT=Yes + AC_DEFINE([_WITH_UNICAST_CHKSUM_COMPAT_], [ 1 ], [Define to 1 to enable v1.3.6 and earlier VRRPv3 unicast checksum compatibility]) + add_config_opt([OLD_CHKSUM_COMPAT]) +fi + +dnl ----[ Checks for FIB routing support ]---- +FIB_ROUTING_SUPPORT=No +if test .$enable_vrrp != .no -a .$enable_routes != .no; then + # Introduced in Linux 2.6.19 + SAV_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $kernelinc" + AC_CHECK_DECL([FRA_SRC], + [ + FIB_ROUTING_SUPPORT=Yes + AC_DEFINE([_HAVE_FIB_ROUTING_], [ 1 ], [Define to 1 if have FIB routing support]) + add_config_opt([FIB_ROUTING]) + ], [], + [[#include + #include ]]) + CPPFLAGS="$SAV_CPPFLAGS" +fi +AM_CONDITIONAL([FIB_ROUTING], [test $FIB_ROUTING_SUPPORT = Yes]) + +dnl ----[ Checks for kernel IFLA_INET6_ADDR_GEN_MODE support ]---- +SAV_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $kernelinc" +if test ${MACVLAN_SUPPORT} = Yes; then + # Introduced in Linux 3.17 + AC_CHECK_DECLS([IFLA_INET6_ADDR_GEN_MODE], + [ + add_system_opt([INET6_ADDR_GEN_MODE]) + ], [], [[ + #include + ]]) +fi +CPPFLAGS="$SAV_CPPFLAGS" + +dnl ----[ Checks for kernel IFLA_VRF_... support ]---- +SAV_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $kernelinc" +if test ${MACVLAN_SUPPORT} = Yes; then + # Introduced in Linux 4.3 + AC_CHECK_DECLS([IFLA_VRF_MAX], + [ + add_system_opt([VRF]) + AC_DEFINE([_HAVE_VRF_], [ 1 ], [Define to 1 if have kernel VRF support]) + ], [], [[ + #include + ]]) +fi +CPPFLAGS="$SAV_CPPFLAGS" + +dnl ----[ Checks for SNMP support ]---- +SNMP_SUPPORT=No +SNMP_KEEPALIVED_SUPPORT=No +SNMP_VRRP_SUPPORT=No +SNMP_RFC_SUPPORT=No +SNMP_RFCV2_SUPPORT=No +SNMP_RFCV3_SUPPORT=No +SNMP_CHECKER_SUPPORT=No +SNMP_V3_FOR_V2=No +if test "$enable_snmp_keepalived" = yes; then + AC_MSG_WARN([--enable-snmp-keepalived is obsolete. Use --enable-snmp-vrrp.]) + enable_snmp_vrrp=$enable_snmp_keepalived +fi +if test "$enable_snmp" = yes -o \ + "$enable_snmp_vrrp" = yes -o \ + "$enable_snmp_checker" = yes -o \ + "$enable_snmp_rfc" = yes -o \ + "$enable_snmp_rfcv2" = yes -o \ + "$enable_snmp_rfcv3" = yes; then + AC_PATH_TOOL([NETSNMP_CONFIG], [net-snmp-config], [no]) + if test "$NETSNMP_CONFIG" = no; then + AC_MSG_ERROR([*** unable to find net-snmp-config]) + fi + NETSNMP_LIBS_AGENT=`${NETSNMP_CONFIG} --netsnmp-agent-libs` + NETSNMP_LIBS_EXT=`${NETSNMP_CONFIG} --external-libs` + NETSNMP_LIBS="$NETSNMP_LIBS_AGENT $NETSNMP_LIBS_EXT" + NETSNMP_CFLAGS="`${NETSNMP_CONFIG} --base-cflags` -DNETSNMP_NO_INLINE" + + # net-snmp-config adds compiler and linker options that were set at the time + # net-snmp was built, and this can include spec files that may not exist + # on the system building keepalived. We need to check if any spec files + # are specified, and if they do not exist on this system, then remove them + # from NETSNMP_LIBS or NETSNMP_CFLAGS. + # For further information, see https://bugzilla.redhat.com/show_bug.cgi?id=1544527 + # and the other bugs referred to in it. + for spec in `echo $NETSNMP_LIBS | sed -e "s? ?\n?g" | grep "^-specs="`; do + SPEC_FILE=`echo $spec | sed -e "s?^-spaces=??"` + if test ! -f $SPEC_FILE; then + NETSNMP_LIBS=`echo $NETSNMP_LIBS | sed -e "s? *$spec *? ?"` + AC_MSG_WARN([Removing $spec from NETSNMP_LIBS since spec file not installed]) + fi + done + for spec in `echo $NETSNMP_CFLAGS | sed -e "s? ?\n?g" | grep "^-specs="`; do + SPEC_FILE=`echo $spec | sed -e "s?^-spaces=??"` + if test ! -f $SPEC_FILE; then + NETSNMP_CFLAGS=`echo $NETSNMP_CFLAGS | sed -e "s? *$spec *? ?"` + AC_MSG_WARN([Removing $spec from NETSNMP_CFLAGS since spec file not installed]) + fi + done + + SAV_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS ${NETSNMP_CFLAGS}" + SAV_LIBS="$LIBS" + LIBS="$LIBS ${NETSNMP_LIBS}" + AC_MSG_CHECKING([whether C compiler supports flag "${NETSNMP_CFLAGS} ${NETSNMP_LIBS}" from Net-SNMP]) + AC_LINK_IFELSE([AC_LANG_SOURCE([[ + int main(void) + { + return 0; + } + ]])], [ + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + AC_MSG_ERROR([*** incorrect CFLAGS from net-snmp-config]) + ]) + + # Do we have subagent support? + AC_CHECK_FUNCS([netsnmp_enable_subagent], [], + [AC_MSG_ERROR([*** no subagent support in net-snmp])]) + + # check for net-snmp headers + # Some ancient distributions may miss header + SAV_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $NETSNMP_CFLAGS" + AC_CHECK_HEADERS(net-snmp/agent/agent_sysORTable.h net-snmp/agent/snmp_vars.h net-snmp/agent/util_funcs.h,[], + [AC_MSG_ERROR([missing net-snmp headers])],[[ + #include + #include + #include + ]]) + + SNMP_SUPPORT=Yes + add_to_var([KA_CFLAGS], [$NETSNMP_CFLAGS]) + add_to_var([KA_LIBS], [$NETSNMP_LIBS]) + if test "$enable_snmp_rfc" = yes; then + SNMP_RFCV2_SUPPORT=Yes + SNMP_RFCV3_SUPPORT=Yes + else + if test "$enable_snmp_rfcv2" = yes; then + SNMP_RFCV2_SUPPORT=Yes + fi + if test "$enable_snmp_rfcv3" = yes; then + SNMP_RFCV3_SUPPORT=Yes + fi + fi + if test ${SNMP_RFCV2_SUPPORT} = Yes -o \ + ${SNMP_RFCV3_SUPPORT} = Yes; then + if test ${VRRP_SUPPORT} != Yes; then + AC_MSG_ERROR([RFC SNMP support requires VRRP]) + fi + SNMP_RFC_SUPPORT=Yes + fi + if test ${SNMP_RFCV3_SUPPORT} = Yes -a \ + "$enable_snmp_reply_v3_for_v2" != no; then + AC_DEFINE([_SNMP_REPLY_V3_FOR_V2_], [ 1 ], [Define to 1 to have keepalived send RFC6257 SNMP responses for VRRPv2 instances]) + SNMP_V3_FOR_V2=Yes + add_config_opt([SNMP_V3_FOR_V2]) + fi + + if test "$enable_snmp" = yes; then + SNMP_VRRP_SUPPORT=Yes + SNMP_CHECKER_SUPPORT=Yes + else + if test "$enable_snmp_vrrp" = yes; then + SNMP_VRRP_SUPPORT=Yes + fi + if test "$enable_snmp_checker" = yes; then + SNMP_CHECKER_SUPPORT=Yes + fi + fi + if test ${VRRP_SUPPORT} != Yes -a \ + ${SNMP_VRRP_SUPPORT} = Yes; then + AC_MSG_ERROR([VRRP SNMP support requires VRRP]) + fi + if test ${IPVS_SUPPORT} = No -a \ + ${SNMP_CHECKER_SUPPORT} = Yes; then + AC_MSG_ERROR([CHECKER SNMP support requires checker]) + fi + + if test ${SNMP_VRRP_SUPPORT} = Yes -o \ + ${SNMP_CHECKER_SUPPORT} = Yes; then + SNMP_KEEPALIVED_SUPPORT=Yes + fi + + CPPFLAGS="$SAV_CPPFLAGS" + CPPFLAGS="$SAV_CPPFLAGS" + CFLAGS="$SAV_CFLAGS" + LIBS="$SAV_LIBS" +fi + +dnl ----[What SNMP support is required]---- +if test $SNMP_SUPPORT = Yes; then + AC_DEFINE([_WITH_SNMP_], [ 1 ], [Define to 1 to have SNMP support]) +fi +if test $SNMP_KEEPALIVED_SUPPORT = Yes; then + AC_DEFINE([_WITH_SNMP_KEEPALIVED_], [ 1 ], [Define to 1 to have keepalived SNMP support]) +fi +if test $SNMP_VRRP_SUPPORT = Yes; then + AC_DEFINE([_WITH_SNMP_VRRP_], [ 1 ], [Define to 1 to have keepalived SNMP VRRP support]) + add_config_opt([SNMP_VRRP]) +fi +if test $SNMP_CHECKER_SUPPORT = Yes; then + AC_DEFINE([_WITH_SNMP_CHECKER_], [ 1 ], [Define to 1 to have keepalived SNMP checker support]) + add_config_opt([SNMP_CHECKER]) +fi +if test $SNMP_RFC_SUPPORT = Yes; then + AC_DEFINE([_WITH_SNMP_RFC_], [ 1 ], [Define to 1 to have RFC SNMP support]) +fi +if test $SNMP_RFCV2_SUPPORT = Yes; then + AC_DEFINE([_WITH_SNMP_RFCV2_], [ 1 ], [Define to 1 to have RFCv2 SNMP support]) + add_config_opt([SNMP_RFCV2]) +fi +if test $SNMP_RFCV3_SUPPORT = Yes; then + AC_DEFINE([_WITH_SNMP_RFCV3_], [ 1 ], [Define to 1 to have RFCv3 SNMP support]) + add_config_opt([SNMP_RFCV3]) +fi +AM_CONDITIONAL([SNMP], [test $SNMP_SUPPORT = Yes]) +AM_CONDITIONAL([SNMP_KEEPALIVED], [test $SNMP_KEEPALIVED_SUPPORT = Yes]) +AM_CONDITIONAL([SNMP_VRRP], [test $SNMP_VRRP_SUPPORT = Yes -o $SNMP_RFC_SUPPORT = Yes]) +AM_CONDITIONAL([SNMP_CHECKER], [test $SNMP_CHECKER_SUPPORT = Yes]) +AM_CONDITIONAL([SNMP_RFC], [test $SNMP_RFCV2_SUPPORT = Yes -o $SNMP_RFCV3_SUPPORT = Yes]) +AM_CONDITIONAL([SNMP_RFCV2], [test $SNMP_RFCV2_SUPPORT = Yes]) +AM_CONDITIONAL([SNMP_RFCV3], [test $SNMP_RFCV3_SUPPORT = Yes]) +AM_CONDITIONAL([SNMP_REPLY_V3_FOR_V2], [test $SNMP_V3_FOR_V2 = Yes]) + +dnl ----[ Check for Dbus support ]---- +DBUS_SUPPORT=No +DBUS_CREATE_INSTANCE=No +if test "$enable_dbus" = yes; then + AC_CHECK_LIB(gio-2.0, g_bus_own_name, + [ + add_pkg_config([gio-2.0]) + DBUS_SUPPORT=Yes + AC_DEFINE([_WITH_DBUS_], [ 1 ], [Define to 1 to have DBUS support]) + add_config_opt([DBUS]) + + dnl -- g_type_init() not needed and deprecated since glib 2.36 + CFLAGS="$($PKG_CONFIG --cflags gio-2.0)" + LIBS="$($PKG_CONFIG --libs gio-2.0)" + AC_RUN_IFELSE( + [ + AC_LANG_PROGRAM( + [[#include ]], + [[return !g_thread_functions_for_glib_use.mutex_lock;]])], + [need_g_type_init=0], + [need_g_type_init=1], + [ + AC_MSG_WARN([Cannot determine if need to call g_type_init(). Assuming yes for safety.]) + need_g_type_init=1 + ]) + if test $need_g_type_init -eq 1; then + AC_DEFINE([DBUS_NEED_G_TYPE_INIT], [ 1 ], [Define to 1 if need to call g_type_init()]) + fi + LIBS= + CFLAGS= + if test "$enable_dbus_create_instance" = yes; then + AC_DEFINE([_WITH_DBUS_CREATE_INSTANCE_], [ 1 ], [Define to 1 to have DBus create instance support]) + DBUS_CREATE_INSTANCE=Yes + add_config_opt([DBUS_CREATE_INSTANCE]) + AC_MSG_WARN([DBus create instance functionality is dangerous - why do you want it?]) + fi + ], + [AC_MSG_ERROR([DBUS support requested but libgio-2.0 not found.])]) +fi +AM_CONDITIONAL([WITH_DBUS], [test $DBUS_SUPPORT = Yes]) +AM_CONDITIONAL([DBUS_CREATE_INSTANCE], [test $DBUS_CREATE_INSTANCE = Yes]) + +dnl ----[ SHA1 or not ? ]---- +SHA1_SUPPORT=No +if test "${enable_sha1}" = yes; then + AC_CHECK_HEADERS(openssl/sha.h,,AC_MSG_ERROR([unable to find openssl/sha.h])) + AC_CHECK_LIB(crypto, SHA1_Init,, + [ + dnl libcrypto can require -fpic + AS_UNSET([ac_cv_lib_crypto_SHA1_Init]) + SAV_CFLAGS=$CFLAGS + CFLAGS=-fpic + AC_CHECK_LIB(crypto, SHA1_Init,,AC_MSG_ERROR([SHA1 in OpenSSL required])) + CFLAGS=$SAV_CFLAGS + add_to_var([KA_CFLAGS],[-fpic]) + ]) + SHA1_SUPPORT=Yes + AC_DEFINE([_WITH_SHA1_], [ 1 ], [Define to 1 to have SHA1 support]) +fi +AM_CONDITIONAL([WITH_SHA1], [test $SHA1_SUPPORT = Yes]) + +dnl ----[ check for SO_MARK support ]---- +SO_MARK_SUPPORT=No +if test "${enable_fwmark}" != no; then + AC_CHECK_DECLS([SO_MARK], + [ + SO_MARK_SUPPORT=Yes + AC_DEFINE([_WITH_SO_MARK_], [ 1 ], [Define to 1 if have SO_MARK]) + add_system_opt([SO_MARK]) + ], [], + [[#include ]]) +fi + +dnl ---[ check for setns() ]---- +dnl -- CLONE_NEWNET defined from Linux 3.0 +SAV_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -D_GNU_SOURCE" +AC_CHECK_DECLS([CLONE_NEWNET], [], [], [[#include ]]) +dnl -- From glibc 2.14. Otherwise use setns syscall, since Linux 2.4.x +AC_CHECK_FUNCS([setns]) +CFLAGS="$SAV_CFLAGS" +AM_CONDITIONAL([WITH_NAMESPACES], [test $ac_cv_have_decl_CLONE_NEWNET = yes]) + +dnl ----[ check for realtime scheduling support ]---- +SAV_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -D_GNU_SOURCE" +dnl -- from Linux ?.?.? +AC_CHECK_DECLS([SCHED_RR], + [ + SCHED_RT_SUPPORT=Yes + AC_DEFINE([_HAVE_SCHED_RT_], [ 1 ], [Define to 1 if have SCHED_RR]) + add_system_opt([SCHED_RT]) + + dnl -- RLIMIT_RTTIME since Linux 2.6.25 - not supported wwith musl libc + AC_CHECK_DECLS([RLIMIT_RTTIME], [], [], [[#include ]]) + + dnl -- SCHED_RESET_ON_FORK since Linux 2.6.32 + AC_CHECK_DECLS([SCHED_RESET_ON_FORK], + [add_system_opt([SCHED_RESET_ON_FORK])], + [AC_DEFINE([SCHED_RESET_ON_FORK], [ 0 ], [Dummy definition if not defined in system headers])], + [[#include ]]) + ], + [ + SCHED_RT_SUPPORT=No + ], [[#include ]]) +CFLAGS="$SAV_CFLAGS" + +dnl -- Do we want GNU standard paths (moves .pid files) +GNU_STD_PATHS=No +if test "${enable_gnu_std_paths}" = "yes"; then + AC_DEFINE([GNU_STD_PATHS], [ 1 ], [set to enforce GNU standard paths, for .pid files etc]) + PID_DIR=$localstatedir +else + PID_DIR=/var +fi +AC_SUBST([PID_DIR]) + +dnl ---[ check for sphinx-build executable ]---- +if test -z "$SPHINXBUILD"; then + SPHINXBUILDNAME=sphinx-build +else + SPHINXBUILDNAME=${SPHINXBUILD} +fi +AC_SUBST(SPHINXBUILDNAME) +AC_CHECK_PROG([HAVE_SPHINX_BUILD], [$SPHINXBUILDNAME], [Yes], [No]) +AM_CONDITIONAL([BUILD_DOCS], [test $HAVE_SPHINX_BUILD = Yes]) + +dnl ----[ Memory alloc check or not ? ]---- +MEM_CHECK=No +MEM_CHECK_LOG=No +if test "${enable_mem_check}" = "yes"; then + MEM_CHECK=Yes + AC_DEFINE([_MEM_CHECK_], [ 1 ], [Define to 1 to build with malloc/free checks]) + add_config_opt([MEM_CHECK]) + if test "${enable_mem_check_log}" = "yes"; then + MEM_CHECK_LOG=Yes + AC_DEFINE([_MEM_CHECK_LOG_], [ 1 ], [Define to 1 to log malloc/free checks to syslog]) + add_config_opt([MEM_CHECK_LOG]) + fi +fi + +dnl ----[ Memory alloc check or not ? ]---- +TIMER_CHECK=No +if test "${enable_timer_check}" = "yes"; then + TIMER_CHECK=Yes + AC_DEFINE([_TIMER_CHECK_], [ 1 ], [Define to 1 to build with set time logging]) + add_config_opt([TIMER_CHECK]) +fi + +dnl ----[ Debug or not ? ]---- +if test "${enable_debug}" = yes; then + AC_DEFINE([_DEBUG_], [ 1 ], [Define to 1 to build with debugging support]) + ENABLE_DEBUG=Yes + add_config_opt([DEBUG]) +else + ENABLE_DEBUG=No +fi +AM_CONDITIONAL([DEBUG], [test $ENABLE_DEBUG = Yes]) + +dnl ----[ Netlink command timers or not ? ]---- +if test "${enable_netlink_timers}" = yes; then + AC_DEFINE([_NETLINK_TIMERS_], [ 1 ], [Define to 1 to build with netlink command timers support]) + ENABLE_NETLINK_TIMERS=Yes + add_config_opt([NETLINK_TIMERS]) +else + ENABLE_NETLINK_TIMERS=No +fi + +dnl ----[ smtp-alert debugging or not ? ]---- +if test "${enable_smtp_alert_debug}" = yes; then + AC_DEFINE([_SMTP_ALERT_DEBUG_], [ 1 ], [Define to 1 to build with smtp-alert debugging support]) + ENABLE_SMTP_ALERT_DEBUG=Yes + add_config_opt([SMTP_ALERT_DEBUG]) + ENABLE_LOG_FILE_APPEND=Yes +else + ENABLE_SMTP_ALERT_DEBUG=No +fi + +dnl ----[ Stacktrace support or not ? ]---- +if test "${enable_stacktrace}" = yes; then + AC_DEFINE([_WITH_STACKTRACE_], [ 1 ], [Define to 1 to build with stacktrace support]) + ENABLE_STACKTRACE=Yes + add_config_opt([STACKTRACE]) + add_to_var([KA_LDFLAGS], [-rdynamic]) +else + ENABLE_STACKTRACE=No +fi + +dnl ----[ Thread dumping support or not ? ]---- +if test "${enable_dump_threads}" = yes; then + AC_DEFINE([_WITH_DUMP_THREADS_], [ 1 ], [Define to 1 to build with thread dumping support]) + ENABLE_DUMP_THREADS=Yes + add_config_opt([DUMP_THREADS]) +else + ENABLE_DUMP_THREADS=No +fi + +dnl ----[ epoll() debugging support or not ? ]---- +if test "${enable_epoll_debug}" = yes; then + AC_DEFINE([_EPOLL_DEBUG_], [ 1 ], [Define to 1 to build with epoll_wait() debugging support]) + ENABLE_EPOLL_DEBUG=Yes + add_config_opt([EPOLL_DEBUG]) +else + ENABLE_EPOLL_DEBUG=No +fi + +dnl ----[ epoll() thread dumping support or not ? ]---- +if test "${enable_epoll_thread_dump}" = yes; then + AC_DEFINE([_EPOLL_THREAD_DUMP_], [ 1 ], [Define to 1 to build with epoll thread dumping support]) + ENABLE_EPOLL_THREAD_DUMP=Yes + add_config_opt([EPOLL_THREAD_DUMP]) +else + ENABLE_EPOLL_THREAD_DUMP=No +fi + +if test $ENABLE_EPOLL_THREAD_DUMP = Yes -o $ENABLE_DUMP_THREADS = Yes -o $ENABLE_EPOLL_DEBUG = Yes; then + AC_DEFINE([THREAD_DUMP], [ 1 ], [Define to 1 to build with thread dumping support]) +fi + +dnl ----[ TSM debugging support or not ? ]---- +if test "${enable_tsm_debug}" = yes; then + AC_DEFINE([_TSM_DEBUG_], [ 1 ], [Define to 1 to build with TSM debugging support]) + ENABLE_TSM_DEBUG=Yes + add_config_opt([TSM_DEBUG]) +else + ENABLE_TSM_DEBUG=No +fi + +dnl ----[ VRRP FD debugging support or not ? ]---- +if test "${enable_vrrp_fd_debug}" = yes; then + AC_DEFINE([_VRRP_FD_DEBUG_], [ 1 ], [Define to 1 to build with vrrp fd debugging support]) + ENABLE_VRRP_FD_DEBUG=Yes + add_config_opt([VRRP_FD_DEBUG]) +else + ENABLE_VRRP_FD_DEBUG=No +fi + +dnl ----[ Specify interface type to be unchangeable ]---- +if test "${with_fixed_if_type}"; then + if test "${with_fixed_if_type}" = yes -o ${with_fixed_if_type} = no; then + AC_MSG_ERROR([An interface type must be specified with --with-fixed-if-type]) + fi + AC_DEFINE_UNQUOTED([_FIXED_IF_TYPE_], [ "${with_fixed_if_type}" ], [Consider ${with_fixed_if_type} interfaces to be unchangeable]) + FIXED_IF_TYPE=${with_fixed_if_type} + add_config_opt([FIXED_IF_TYPE=${with_fixed_if_type}]) +else + FIXED_IF_TYPE= +fi + +dnl ----[ Profiling or not ? ]---- +WITH_PROFILING=No +if test "${enable_profile}" = yes; then + WITH_PROFILING=Yes + add_config_opt([PROFILING]) + add_to_var([KA_CFLAGS], [-pg]) +fi +AM_CONDITIONAL([PROFILE], [test $WITH_PROFILING = Yes]) + +dnl ----[ perf support or not? keepalived provides runtime options ]---- +if test "${enable_perf}" = yes; then + AC_DEFINE([_WITH_PERF_], [ 1 ], [Define to 1 to build with perf support]) + ENABLE_PERF=Yes + add_config_opt([PERF]) + add_to_var([KA_CFLAGS], [-pg]) +else + ENABLE_PERF=No +fi + +if test ${enable_log_file} = yes; then + AC_DEFINE([ENABLE_LOG_TO_FILE], [ 1 ], [Define if enabling logging to files]) + ENABLE_LOG_FILE_APPEND=Yes + add_config_opt([FILE_LOGGING]) +fi + +if test ${ENABLE_LOG_FILE_APPEND} = Yes; then + AC_DEFINE([ENABLE_LOG_FILE_APPEND], [ 1 ], [Define if appending to log files is allowed]) + add_config_opt([LOG_FILE_APPEND]) +fi + +if test ${NEED_LIBDL} = Yes; then + add_to_var([KA_LIBS], [-ldl]) +fi + +dnl ----[ Determine if we are using pthreads ]---- +echo " $KA_LIBS" | grep -qE -- " -l?pthread " +if test $? -eq 0 ;then + AC_DEFINE([_WITH_PTHREADS_], [ 1 ], [Define to 1 if using pthreads]) +fi + +dnl ----[ Check if rpmbuild supports --build-in-place ]---- +RPM_NO_BIP=1 +AC_CHECK_PROG([HAVE_RPM], [rpm], [Yes], [No]) +if test $HAVE_RPM = Yes; then + AC_CHECK_PROG([HAVE_RPMBUILD], [rpmbuild], [Yes], [No]) + RPM_SRC_DIR=`rpm --eval "%{_sourcedir}"` + if ! test -d $RPM_SRC_DIR; then + HAVE_RPMBUILD=No + fi + if test $HAVE_RPMBUILD = Yes; then + rpmbuild --help | grep -q -- --build-in-place + RPM_NO_BIP=$? + fi +fi +AM_CONDITIONAL([RPM], [test $HAVE_RPM = Yes]) +AM_CONDITIONAL([RPM_BIP], [test $RPM_NO_BIP -eq 0]) + +dnl ----[ Determine system init type]---- +INIT_TYPE= +if test -z $init_type; then + /sbin/init --version 2>/dev/null | grep -q upstart + if test $? -eq 0; then + INIT_TYPE=upstart + else + init_path=`which systemctl 2>/dev/null` + if test \( $? -eq 0 -a -x "$init_path" \); then + systemctl | grep -q -- "-\.mount" + if test $? -eq 0; then + INIT_TYPE=systemd + fi + fi + if test \( -z "$INIT_TYPE" -a -f /etc/init.d/networking \); then + init_path=`which openrc-run 2>/dev/null` + if test \( $? -eq 0 -a -x "$init_path" \); then + head -1 /etc/init.d/networking | grep -q "^#! */.*/openrc-run$" + if test $? -eq 0; then + INIT_TYPE=openrc + fi + fi + fi + if test \( -z "$INIT_TYPE" -a -f /etc/init.d/cron -a ! -h /etc/init.d/cron \); then + INIT_TYPE=SYSV + fi + fi +else + INIT_TYPE=$init_type +fi + +dnl ----[Default keepalived configuration file]---- +AS_IF([test $default_config_file], + [ + AS_IF([test $default_config_file = yes -o $default_config_file = no], + AC_MSG_ERROR([A filename must be specified for default-config-file]) + ]) + CONFIG_FILE=$default_config_file + add_config_opt([DEFAULT_CONFIG_FILE=${default_config_file}]) + ], + [default_config_file="/etc/$PACKAGE/$PACKAGE.conf"]) +AC_DEFINE_UNQUOTED([DEFAULT_CONFIG_FILE], ["$default_config_file"], [The default configuration file]) +AC_SUBST([DEFAULT_CONFIG_FILE], [$default_config_file]) + +if test -z $INIT_TYPE; then + INIT_TYPE=undetected +elif test $INIT_TYPE = systemd; then + AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) +fi + +AM_CONDITIONAL([INIT_UPSTART], [test $INIT_TYPE = upstart]) +AM_CONDITIONAL([INIT_SYSTEMD], [test $INIT_TYPE = systemd]) +AM_CONDITIONAL([INIT_SYSV], [test $INIT_TYPE = SYSV]) +AM_CONDITIONAL([INIT_OPENRC], [test $INIT_TYPE = openrc]) +AM_CONDITIONAL([INIT_SUSE], [test $INIT_TYPE = SUSE]) + +AC_DEFINE_UNQUOTED([CONFIGURATION_OPTIONS], ["$CONFIG_OPTIONS"], [The configuration options from which the package is built]) +AC_DEFINE_UNQUOTED([SYSTEM_OPTIONS], ["$SYSTEM_OPTIONS"], [The system options from which the package is built]) + +if test $NETLINK_VER -eq 0; then + NETLINK_VER=None +fi + +dnl ----[ Process output target ]---- +echo + +AC_OUTPUT + +dnl ----[ Display current configuration ]---- +cat <. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputting dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Avoid interferences from the environment. +gccflag= dashmflag= + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp +fi + +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The second -e expression handles DOS-style file names with drive + # letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the "deleted header file" problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. +## Some versions of gcc put a space before the ':'. On the theory +## that the space means something, we add a space to the output as +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like '#:fec' to the end of the + # dependency line. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" + echo >> "$depfile" + # The second pass generates a dummy entry for each header file. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" + ;; + +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts '$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" + rm -f "$tmpdepfile" + ;; + +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using '\' : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi + + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; + +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for ':' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. + "$@" $dashmflag | + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no eat=no + for arg + do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + if test $eat = yes; then + eat=no + continue + fi + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix=`echo "$object" | sed 's/^.*\././'` + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + IFS=" " + for arg + do + case "$arg" in + -o) + shift + ;; + $object) + shift + ;; + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/doc/KEEPALIVED-MIB.txt b/doc/KEEPALIVED-MIB.txt new file mode 100644 index 0000000..48cef31 --- /dev/null +++ b/doc/KEEPALIVED-MIB.txt @@ -0,0 +1,4510 @@ +-- ---------------------------------------------------------------------- +-- MIB file for keepalived (http://www.keepalived.org) +-- ---------------------------------------------------------------------- +-- +-- There are two sections in this MIB: vrrp and check. + +KEEPALIVED-MIB DEFINITIONS ::= BEGIN + +IMPORTS + OBJECT-TYPE, MODULE-IDENTITY, + Integer32, Unsigned32, Counter32, Counter64, + Gauge32, enterprises, NOTIFICATION-TYPE + FROM SNMPv2-SMI + OBJECT-GROUP, MODULE-COMPLIANCE, NOTIFICATION-GROUP + FROM SNMPv2-CONF + InetAddressType, InetAddress, InetPortNumber, + InetAddressPrefixLength, InetScopeType + FROM INET-ADDRESS-MIB + InterfaceIndex, ifIndex + FROM IF-MIB + DisplayString, TEXTUAL-CONVENTION, TruthValue + FROM SNMPv2-TC; + +keepalived MODULE-IDENTITY + LAST-UPDATED "201808140000Z" + ORGANIZATION "Keepalived" + CONTACT-INFO "http://www.keepalived.org" + DESCRIPTION + "This MIB describes objects used by keepalived, both + for VRRP and health checker." + REVISION "201808140000Z" + DESCRIPTION "add MH LVS scheduler" + REVISION "201807180000Z" + DESCRIPTION "add script master rx lower priority" + REVISION "201806040000Z" + DESCRIPTION "add ip rule protocol, ip_proto, src and dst port ranges" + REVISION "201805170000Z" + DESCRIPTION "add virtual server shutdown status" + REVISION "201804290000Z" + DESCRIPTION "add VRRP state stop" + REVISION "201804280000Z" + DESCRIPTION "add VRRP address peers" + REVISION "201803060000Z" + DESCRIPTION "add VRRP protocol version to VRRP instance" + REVISION "201803010000Z" + DESCRIPTION "add route option fastopen_no_cookie and rule option l3mdev" + REVISION "201801100000Z" + DESCRIPTION "add sync group notify_stop script" + REVISION "201801080001Z" + DESCRIPTION "add SmtpAlert global defaults" + REVISION "201801080000Z" + DESCRIPTION "add SmtpAlert for real and virtual servers" + REVISION "201710260000Z" + DESCRIPTION "remove vrrpScriptResult disabled status" + REVISION "201710030001Z" + DESCRIPTION + "correct max weight for track scripts + and track interfaces" + REVISION "201710030000Z" + DESCRIPTION "correct max weight for vrrpTrackFile" + REVISION "201710020003Z" + DESCRIPTION "add dynamic_interfaces" + REVISION "201710020002Z" + DESCRIPTION "add sync_group_tracking_weight" + REVISION "201710020001Z" + DESCRIPTION "allow tracking file weights of 0 and 254" + REVISION "201710020000Z" + DESCRIPTION + "add weights for tracking files and + tracking scripts, interfaces and files for sync groups" + REVISION "201709150000Z" + DESCRIPTION "add sctp and none as virtual server protocol types" + REVISION "201708100000Z" + DESCRIPTION "virtualhost config to real server" + REVISION "201707220001Z" + DESCRIPTION "add default weight setting on a virtual server" + REVISION "201707220000Z" + DESCRIPTION "improve flexibility of checker configuration" + REVISION "201706020000Z" + DESCRIPTION "add smtpEmailFaults" + REVISION "201705300000Z" + DESCRIPTION "add vrrp track files" + REVISION "201704110001Z" + DESCRIPTION "add real server forwarding method" + REVISION "201704110000Z" + DESCRIPTION "add fo and ovf load balancing types" + REVISION "201702190000Z" + DESCRIPTION "add ip rule/route uid support" + REVISION "201611260000Z" + DESCRIPTION "add initfailed state for scripts" + REVISION "201610230000Z" + DESCRIPTION "add per interface linkbeat option" + REVISION "201610180000Z" + DESCRIPTION "add promote_secondaries" + REVISION "201609120000Z" + DESCRIPTION "dbus support added" + REVISION "201609060000Z" + DESCRIPTION "add LVS scheduler flags" + REVISION "201608230000Z" + DESCRIPTION "add IPv6 persistence granularity" + REVISION "201608030000Z" + DESCRIPTION "net-namespace added" + REVISION "201607260000Z" + DESCRIPTION "64-bit stats added" + REVISION "201607100000Z" + DESCRIPTION "enhanced virtual rules and routes" + REVISION "201607030000Z" + DESCRIPTION "change vrrpRuleIndex to unsigned" + REVISION "201607021200Z" + DESCRIPTION "add lvs timeout parameters" + REVISION "201607020000Z" + DESCRIPTION + "added LVS sync daemon parameters and deprecated + LVS sync daemon objects within VRRP instance" + REVISION "201606290000Z" + DESCRIPTION "add lvs_flush" + REVISION "201606030000Z" + DESCRIPTION "update comment for vrrpInstancePreemptDelay" + REVISION "201605221540Z" + DESCRIPTION "smtpServerPort added" + REVISION "201510270000Z" + DESCRIPTION "routerId added to traps variables" + REVISION "200904080000Z" + DESCRIPTION "Initial revision" + + ::= { project 5 } + +-- We are hosted under Debian OID. See http://dsa.debian.org/iana/ +debian OBJECT IDENTIFIER ::= { enterprises 9586 } +project OBJECT IDENTIFIER ::= { debian 100 } + +VrrpState ::= TEXTUAL-CONVENTION + STATUS current + DESCRIPTION + "Represents a VRRP state." + SYNTAX INTEGER { + init(0), + backup(1), + master(2), + fault(3), + unknown(4), + shutdown(5) + } + +RouteType ::= TEXTUAL-CONVENTION + STATUS current + DESCRIPTION + "Type of route" + SYNTAX INTEGER { unicast(1), + ecmp(2), + blackhole(3), + anycast(4), + multicast(5), + broadcast(6), + unreachable(7), + prohibit(8), + throw(9), + nat(10), + xresolve(11) } + +RuleAction ::= TEXTUAL-CONVENTION + STATUS current + DESCRIPTION + "Action of rule" + SYNTAX INTEGER { table(1), + goto(2), + nop(3), + blackhole(6), + unreachable(7), + prohibit(8) } + +Realm ::= TEXTUAL-CONVENTION + DISPLAY-HINT "d" + STATUS current + DESCRIPTION + "Route realm." + SYNTAX Unsigned32 (1..65535) + +PrefType ::= TEXTUAL-CONVENTION + STATUS current + DESCRIPTION + "Preference type of route" + SYNTAX INTEGER { low(1), medium(2), high(3) } + +EncapType ::= TEXTUAL-CONVENTION + STATUS current + DESCRIPTION + "Encapsulation type of route" + SYNTAX INTEGER { mpls(1), ip(2), ila(3), ip6(4) } + +global OBJECT IDENTIFIER ::= { keepalived 1 } +vrrp OBJECT IDENTIFIER ::= { keepalived 2 } +check OBJECT IDENTIFIER ::= { keepalived 3 } +conformance OBJECT IDENTIFIER ::= { keepalived 4 } + +-- ---------------------------------------------------------------------- +-- Global part +-- ---------------------------------------------------------------------- + +version OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Version of keepalived" + ::= { global 1 } + +routerId OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Router ID" + ::= { global 2 } + +mail OBJECT IDENTIFIER ::= { global 3 } + +smtpServerAddressType OBJECT-TYPE + SYNTAX InetAddressType + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Address type for SMTP server." + ::= { mail 1 } + +smtpServerAddress OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Address of SMTP server." + ::= { mail 2 } + +smtpServerTimeout OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "seconds" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "SMTP server connection timeout." + ::= { mail 3 } + +emailFrom OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Email address for the From field." + ::= { mail 4 } + +emailTable OBJECT-TYPE + SYNTAX SEQUENCE OF EmailEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table of email notification addresses." + ::= { mail 5 } + +smtpServerPort OBJECT-TYPE + SYNTAX InetPortNumber + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Port of SMTP server." + ::= { mail 6 } + +smtpEmailFaults OBJECT-TYPE + SYNTAX INTEGER { enabled(1), disabled(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Email vrrp fault state transitions." + ::= { mail 7 } + +smtpEmailSmtpAlert OBJECT-TYPE + SYNTAX INTEGER { on(1), off(2), unset(3) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Email default smtp alert." + ::= { mail 8 } + +smtpEmailSmtpAlertVrrp OBJECT-TYPE + SYNTAX INTEGER { on(1), off(2), unset(3) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Email default smtp alert for vrrp." + ::= { mail 9 } + +smtpEmailSmtpAlertChecker OBJECT-TYPE + SYNTAX INTEGER { on(1), off(2), unset(3) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Email default smtp alert for checkers." + ::= { mail 10 } + +emailEntry OBJECT-TYPE + SYNTAX EmailEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Email address to be notified with an alert." + INDEX { emailIndex } + ::= { emailTable 1 } + +EmailEntry ::= SEQUENCE { + emailIndex Integer32, + emailAddress DisplayString +} + +emailIndex OBJECT-TYPE + SYNTAX Integer32 (1..2147483647) + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Index for the email address." + ::= { emailEntry 1 } + +emailAddress OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Email address to be notified when an alert is raised." + ::= { emailEntry 2 } + +trapEnable OBJECT-TYPE + SYNTAX INTEGER { enabled(1), disabled(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Indicate whether traps should be sent for various events." + ::= { global 4 } + +linkBeat OBJECT-TYPE + SYNTAX INTEGER { netlink(1), polling(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Indicate which method is used to check if a link is up or + down. netlink(1) means that the kernel will push a link state + change while polling(2) means that the status of the link is + checked periodically." + ::= { global 5 } + +lvsFlush OBJECT-TYPE + SYNTAX INTEGER { enabled(1), disabled(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Indicate whether LVS config is flushed at startup." + ::= { global 6 } + +ipvs64BitStats OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "True if 64-bit stats counters are available for ipvs, false otherwise." + ::= { global 7 } + +netNamespace OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The name of the net namespace keepalived is running in." + ::= { global 8 } + +dbus OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "True if the DBus interface is enabled." + ::= { global 9 } + +dynamicInterfaces OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "True if dynamic interfaces is enabled." + ::= { global 10 } + +-- ---------------------------------------------------------------------- +-- VRRP part +-- ---------------------------------------------------------------------- + +-- Sync groups +-- see vrrp.h + +vrrpSyncGroupTable OBJECT-TYPE + SYNTAX SEQUENCE OF VrrpSyncGroupEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table of sync groups" + ::= { vrrp 1 } + +vrrpSyncGroupEntry OBJECT-TYPE + SYNTAX VrrpSyncGroupEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Information describing a sync group" + INDEX { vrrpSyncGroupIndex } + ::= { vrrpSyncGroupTable 1 } + +VrrpSyncGroupEntry ::= SEQUENCE { + vrrpSyncGroupIndex Integer32, + vrrpSyncGroupName DisplayString, + vrrpSyncGroupState VrrpState, + vrrpSyncGroupSmtpAlert INTEGER, + vrrpSyncGroupNotifyExec INTEGER, + vrrpSyncGroupScriptMaster DisplayString, + vrrpSyncGroupScriptBackup DisplayString, + vrrpSyncGroupScriptFault DisplayString, + vrrpSyncGroupScript DisplayString, + vrrpSyncGroupTrackingWeight INTEGER, + vrrpSyncGroupScriptStop DisplayString +} + +vrrpSyncGroupIndex OBJECT-TYPE + SYNTAX Integer32 (1..2147483647) + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Index of the synchronisation group." + ::= { vrrpSyncGroupEntry 1 } + +vrrpSyncGroupName OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Name of the synchronisation group." + ::= {vrrpSyncGroupEntry 2 } + +vrrpSyncGroupState OBJECT-TYPE + SYNTAX VrrpState + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current state of the synchronisation group." + ::= {vrrpSyncGroupEntry 3 } + +vrrpSyncGroupSmtpAlert OBJECT-TYPE + SYNTAX INTEGER { enabled(1), disabled(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Will SMTP alert be sent for this synchronisation group?" + ::= {vrrpSyncGroupEntry 4 } + +vrrpSyncGroupNotifyExec OBJECT-TYPE + SYNTAX INTEGER { enabled(1), disabled(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Will we execute notification script for this group?" + ::= {vrrpSyncGroupEntry 5 } + +vrrpSyncGroupScriptMaster OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Script to execute when the group becomes master." + ::= {vrrpSyncGroupEntry 6 } + +vrrpSyncGroupScriptBackup OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Script to execute when the group becomes backup." + ::= {vrrpSyncGroupEntry 7 } + +vrrpSyncGroupScriptFault OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Script to execute when the group is in fault state." + ::= {vrrpSyncGroupEntry 8 } + +vrrpSyncGroupScript OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Script to execute whenever a state change occurs." + ::= {vrrpSyncGroupEntry 9 } + +vrrpSyncGroupTrackingWeight OBJECT-TYPE + SYNTAX INTEGER { enabled(1), disabled(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Allow differing tracking weights for sync group members" + ::= {vrrpSyncGroupEntry 10 } + +vrrpSyncGroupScriptStop OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Script to execute when the keepalived stops." + ::= {vrrpSyncGroupEntry 11 } + + +vrrpSyncTrackedInterfaceTable OBJECT-TYPE + SYNTAX SEQUENCE OF VrrpSyncTrackedInterfaceEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table of tracked interfaces for each VRRP instance." + ::= { vrrp 14 } + +vrrpSyncTrackedInterfaceEntry OBJECT-TYPE + SYNTAX VrrpSyncTrackedInterfaceEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Information describing a tracked interface" + INDEX { vrrpSyncGroupIndex, ifIndex } + ::= { vrrpSyncTrackedInterfaceTable 1 } + +VrrpSyncTrackedInterfaceEntry ::= SEQUENCE { + vrrpSyncTrackedInterfaceName DisplayString, + vrrpSyncTrackedInterfaceWeight Integer32 +} + +vrrpSyncTrackedInterfaceName OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Name of the tracked interface." + ::= { vrrpSyncTrackedInterfaceEntry 1 } + +vrrpSyncTrackedInterfaceWeight OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Weight of the tracked interface." + ::= { vrrpSyncTrackedInterfaceEntry 2 } + +vrrpSyncTrackedScriptTable OBJECT-TYPE + SYNTAX SEQUENCE OF VrrpSyncTrackedScriptEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table of tracked scripts for each VRRP instance." + ::= { vrrp 15 } + +vrrpSyncTrackedScriptEntry OBJECT-TYPE + SYNTAX VrrpSyncTrackedScriptEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Information describing a tracked script" + INDEX { vrrpSyncGroupIndex, vrrpSyncTrackedScriptIndex } + ::= { vrrpSyncTrackedScriptTable 1 } + +VrrpSyncTrackedScriptEntry ::= SEQUENCE { + vrrpSyncTrackedScriptIndex Integer32, + vrrpSyncTrackedScriptName DisplayString, + vrrpSyncTrackedScriptWeight Integer32 +} + +vrrpSyncTrackedScriptIndex OBJECT-TYPE + SYNTAX Integer32 (1..2147483647) + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Index of the tracked script in the set of tracked scripts for + the given VRRP instance. This index has no relation with the + index of vrrpSyncScriptTable." + ::= { vrrpSyncTrackedScriptEntry 1 } + +vrrpSyncTrackedScriptName OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Name of the tracked interface." + ::= { vrrpSyncTrackedScriptEntry 2 } + +vrrpSyncTrackedScriptWeight OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Weight of the tracked interface." + ::= { vrrpSyncTrackedScriptEntry 3 } + +vrrpSyncTrackedFileTable OBJECT-TYPE + SYNTAX SEQUENCE OF VrrpSyncTrackedFileEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table of tracked files for each sync group." + ::= { vrrp 16 } + +vrrpSyncTrackedFileEntry OBJECT-TYPE + SYNTAX VrrpSyncTrackedFileEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Information describing a tracked file" + INDEX { vrrpSyncGroupIndex, vrrpSyncTrackedFileIndex } + ::= { vrrpSyncTrackedFileTable 1 } + +VrrpSyncTrackedFileEntry ::= SEQUENCE { + vrrpSyncTrackedFileIndex Integer32, + vrrpSyncTrackedFileName DisplayString, + vrrpSyncTrackedFileWeight Integer32 +} + +vrrpSyncTrackedFileIndex OBJECT-TYPE + SYNTAX Integer32 (1..2147483647) + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Index of the tracked file in the set of tracked files for + the given VRRP instance. This index has no relation with the + index of vrrpSyncFileTable." + ::= { vrrpSyncTrackedFileEntry 1 } + +vrrpSyncTrackedFileName OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Name of the tracked file." + ::= { vrrpSyncTrackedFileEntry 2 } + +vrrpSyncTrackedFileWeight OBJECT-TYPE + SYNTAX Integer32 (-254..254) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Weight of the tracked file." + ::= { vrrpSyncTrackedFileEntry 3 } + +vrrpSyncGroupMemberTable OBJECT-TYPE + SYNTAX SEQUENCE OF VrrpSyncGroupMemberEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table of instances contained in sync groups" + ::= { vrrp 2 } + +vrrpSyncGroupMemberEntry OBJECT-TYPE + SYNTAX VrrpSyncGroupMemberEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Information describing a member of a sync group" + INDEX { vrrpSyncGroupIndex, vrrpSyncGroupMemberInstanceIndex } + ::= { vrrpSyncGroupMemberTable 1 } + +VrrpSyncGroupMemberEntry ::= SEQUENCE { + vrrpSyncGroupMemberInstanceIndex Integer32, + vrrpSyncGroupMemberName DisplayString +} + +vrrpSyncGroupMemberInstanceIndex OBJECT-TYPE + SYNTAX Integer32 (1..2147483647) + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Index of an instance in a synchronisation group. + There is no relation with this index and the index of the + corresponding instance in vrrpInstanceTable. Use the name + to find out the corresponding instance." + ::= { vrrpSyncGroupMemberEntry 1 } + +vrrpSyncGroupMemberName OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Name of the instance contained in the synchronisation group." + ::= { vrrpSyncGroupMemberEntry 2 } + +-- VRRP instances +-- see vrrp.h + +vrrpInstanceTable OBJECT-TYPE + SYNTAX SEQUENCE OF VrrpInstanceEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table of VRRP instances" + ::= { vrrp 3 } + +vrrpInstanceEntry OBJECT-TYPE + SYNTAX VrrpInstanceEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Information describing a sync group" + INDEX { vrrpInstanceIndex } + ::= { vrrpInstanceTable 1 } + +VrrpInstanceEntry ::= SEQUENCE { + vrrpInstanceIndex INTEGER, + vrrpInstanceName DisplayString, + vrrpInstanceVirtualRouterId Unsigned32, + vrrpInstanceState VrrpState, + vrrpInstanceInitialState VrrpState, + vrrpInstanceWantedState VrrpState, + vrrpInstanceBasePriority Integer32, + vrrpInstanceEffectivePriority Integer32, + vrrpInstanceVipsStatus INTEGER, + vrrpInstancePrimaryInterface DisplayString, + vrrpInstanceTrackPrimaryIf INTEGER, + vrrpInstanceAdvertisementsInt Unsigned32, + vrrpInstancePreempt INTEGER, + vrrpInstancePreemptDelay Unsigned32, + vrrpInstanceAuthType INTEGER, + vrrpInstanceLvsSyncDaemon INTEGER, + vrrpInstanceLvsSyncInterface DisplayString, + vrrpInstanceSyncGroup DisplayString, + vrrpInstanceGarpDelay Unsigned32, + vrrpInstanceSmtpAlert INTEGER, + vrrpInstanceNotifyExec INTEGER, + vrrpInstanceScriptMaster DisplayString, + vrrpInstanceScriptBackup DisplayString, + vrrpInstanceScriptFault DisplayString, + vrrpInstanceScriptStop DisplayString, + vrrpInstanceScript DisplayString, + vrrpInstanceAccept INTEGER, + vrrpInstancePromoteSecondaries INTEGER, + vrrpInstanceUseLinkbeat INTEGER, + vrrpInstanceVrrpVersion INTEGER, + vrrpInstanceScriptMstrRxLowerPri DisplayString +} + +vrrpInstanceIndex OBJECT-TYPE + SYNTAX INTEGER { + static(0) + } + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Index of the VRRP instance. + Instance 0 is for static IP and static routes." + ::= { vrrpInstanceEntry 1 } + +vrrpInstanceName OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Name of the VRRP instance." + ::= { vrrpInstanceEntry 2 } + +vrrpInstanceVirtualRouterId OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Virtual Router ID (VRID) for this VRRP instance." + ::= { vrrpInstanceEntry 3 } + +vrrpInstanceState OBJECT-TYPE + SYNTAX VrrpState + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current state of this VRRP instance." + ::= { vrrpInstanceEntry 4 } + +vrrpInstanceInitialState OBJECT-TYPE + SYNTAX VrrpState + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Initial state of this VRRP instance." + ::= { vrrpInstanceEntry 5 } + +vrrpInstanceWantedState OBJECT-TYPE + SYNTAX VrrpState + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "State wanted by the operator for this VRRP instance." + ::= { vrrpInstanceEntry 6 } + +vrrpInstanceBasePriority OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "Base priority (as defined in the configuration file) for this + VRRP instance. + This value can be modified to force the virtual router + instance to become backup or master." + ::= { vrrpInstanceEntry 7 } + +vrrpInstanceEffectivePriority OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Effective priority for this VRRP instance. Status of + interfaces and script results are used to compute this value + from the base priority." + ::= { vrrpInstanceEntry 8 } + +vrrpInstanceVipsStatus OBJECT-TYPE + SYNTAX INTEGER { allSet(1), notAllSet(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Are all VIP of this VRRP instance enabled?" + ::= { vrrpInstanceEntry 9 } + +vrrpInstancePrimaryInterface OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Primary interface of this VRRP instance." + ::= { vrrpInstanceEntry 10 } + +vrrpInstanceTrackPrimaryIf OBJECT-TYPE + SYNTAX INTEGER { tracked(1), notTracked(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Do we track the status of the primary interface?" + ::= { vrrpInstanceEntry 11 } + +vrrpInstanceAdvertisementsInt OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "seconds(VRRPv2) / centiseconds(VRRPv3)" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Delay in seconds between two VRRP advertisements and it is in centiseconds between two VRRPV3 advertisements" + ::= { vrrpInstanceEntry 12 } + +vrrpInstancePreempt OBJECT-TYPE + SYNTAX INTEGER { preempt(1), noPreempt(2) } + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "Will a higher priority advertisement preempt a lower instance?" + ::= { vrrpInstanceEntry 13 } + +vrrpInstancePreemptDelay OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "seconds" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Delay after startup or lower priority advert received until preemption can happen. 0 means that there is no delay." + ::= { vrrpInstanceEntry 14 } + +vrrpInstanceAuthType OBJECT-TYPE + SYNTAX INTEGER { + none(0), + password(1), + ah(2) + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "VRRPv2 supports authentication method to authenticate other peers. VRRPv3 does not support authentication" + ::= { vrrpInstanceEntry 15 } + +vrrpInstanceLvsSyncDaemon OBJECT-TYPE + SYNTAX INTEGER { enabled(1), disabled(2) } + MAX-ACCESS read-only + STATUS deprecated + DESCRIPTION + "Is LVS sync daemon enabled for this VRRP instance? + Deprecated in favour of lvsSyncDaemonEnabled." + ::= { vrrpInstanceEntry 16 } + +vrrpInstanceLvsSyncInterface OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS deprecated + DESCRIPTION + "If LVS sync daemon is enabled, which interface to use for syncing? + Deprecated in favour of lvsSyncDaemonInterface." + ::= { vrrpInstanceEntry 17 } + +vrrpInstanceSyncGroup OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Name of the synchronisation group this VRRP instance belongs, if any." + ::= { vrrpInstanceEntry 18 } + +vrrpInstanceGarpDelay OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "seconds" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Delay to launch gratuitous ARP (GARP)." + ::= { vrrpInstanceEntry 19 } + +vrrpInstanceSmtpAlert OBJECT-TYPE + SYNTAX INTEGER { enabled(1), disabled(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Will SMTP alert be sent for this VRRP instance?" + ::= { vrrpInstanceEntry 20 } + +vrrpInstanceNotifyExec OBJECT-TYPE + SYNTAX INTEGER { enabled(1), disabled(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Will we execute notification script for this instance?" + ::= { vrrpInstanceEntry 21 } + +vrrpInstanceScriptMaster OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Script to execute when the instance becomes master." + ::= { vrrpInstanceEntry 22 } + +vrrpInstanceScriptBackup OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Script to execute when the instance becomes backup." + ::= { vrrpInstanceEntry 23 } + +vrrpInstanceScriptFault OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Script to execute when the instance is in fault state." + ::= { vrrpInstanceEntry 24 } + +vrrpInstanceScriptStop OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Script to execute when the instance is stopped." + ::= { vrrpInstanceEntry 25 } + +vrrpInstanceScript OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Script to execute whenever a state change occurs." + ::= { vrrpInstanceEntry 26 } + +vrrpInstanceAccept OBJECT-TYPE + SYNTAX INTEGER { true(1), false(2) } + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "Accept allow the non-master owner to process the packets destined to VIP and it is supported for only VRRPv3." + ::= { vrrpInstanceEntry 27 } + +vrrpInstancePromoteSecondaries OBJECT-TYPE + SYNTAX INTEGER { true(1), false(2) } + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "Set promote_secondaries on interface." + ::= { vrrpInstanceEntry 28 } + +vrrpInstanceUseLinkbeat OBJECT-TYPE + SYNTAX INTEGER { true(1), false(2) } + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "Use linkbeat for interface status." + ::= { vrrpInstanceEntry 29 } + +vrrpInstanceVrrpVersion OBJECT-TYPE + SYNTAX INTEGER { vrrpv2(2), vrrpv3(3) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "VRRP protocol version." + ::= { vrrpInstanceEntry 30 } + +vrrpInstanceScriptMstrRxLowerPri OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Script to execute when master instance receives lower priority advert." + ::= { vrrpInstanceEntry 31 } + +vrrpTrackedInterfaceTable OBJECT-TYPE + SYNTAX SEQUENCE OF VrrpTrackedInterfaceEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table of tracked interfaces for each VRRP instance." + ::= { vrrp 4 } + +vrrpTrackedInterfaceEntry OBJECT-TYPE + SYNTAX VrrpTrackedInterfaceEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Information describing a tracked interface" + INDEX { vrrpInstanceIndex, ifIndex } + ::= { vrrpTrackedInterfaceTable 1 } + +VrrpTrackedInterfaceEntry ::= SEQUENCE { + vrrpTrackedInterfaceName DisplayString, + vrrpTrackedInterfaceWeight Integer32 +} + +vrrpTrackedInterfaceName OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Name of the tracked interface." + ::= { vrrpTrackedInterfaceEntry 1 } + +vrrpTrackedInterfaceWeight OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Weight of the tracked interface." + ::= { vrrpTrackedInterfaceEntry 2 } + +vrrpTrackedScriptTable OBJECT-TYPE + SYNTAX SEQUENCE OF VrrpTrackedScriptEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table of tracked scripts for each VRRP instance." + ::= { vrrp 5 } + +vrrpTrackedScriptEntry OBJECT-TYPE + SYNTAX VrrpTrackedScriptEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Information describing a tracked script" + INDEX { vrrpInstanceIndex, vrrpTrackedScriptIndex } + ::= { vrrpTrackedScriptTable 1 } + +VrrpTrackedScriptEntry ::= SEQUENCE { + vrrpTrackedScriptIndex Integer32, + vrrpTrackedScriptName DisplayString, + vrrpTrackedScriptWeight Integer32 +} + +vrrpTrackedScriptIndex OBJECT-TYPE + SYNTAX Integer32 (1..2147483647) + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Index of the tracked script in the set of tracked scripts for + the given VRRP instance. This index has no relation with the + index of vrrpScriptTable." + ::= { vrrpTrackedScriptEntry 1 } + +vrrpTrackedScriptName OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Name of the tracked interface." + ::= { vrrpTrackedScriptEntry 2 } + +vrrpTrackedScriptWeight OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Weight of the tracked interface." + ::= { vrrpTrackedScriptEntry 3 } + +-- IP addresses +-- see vrrp_ipaddress.h + +vrrpAddressTable OBJECT-TYPE + SYNTAX SEQUENCE OF VrrpAddressEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table of static and virtual addresses" + ::= { vrrp 6 } + +vrrpAddressEntry OBJECT-TYPE + SYNTAX VrrpAddressEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Information describing an address. This can be a static + address or a virtual address. In case of static address, the + VRRP instance index is 0." + INDEX { vrrpInstanceIndex, vrrpAddressIndex } + ::= { vrrpAddressTable 1 } + +VrrpAddressEntry ::= SEQUENCE { + vrrpAddressIndex Integer32, + vrrpAddressType InetAddressType, + vrrpAddressValue InetAddress, + vrrpAddressBroadcast InetAddress, + vrrpAddressMask InetAddressPrefixLength, + vrrpAddressScope InetScopeType, + vrrpAddressIfIndex InterfaceIndex, + vrrpAddressIfName DisplayString, + vrrpAddressIfAlias DisplayString, + vrrpAddressStatus INTEGER, + vrrpAddressAdvertising INTEGER, + vrrpAddressPeer InetAddress +} + +vrrpAddressIndex OBJECT-TYPE + SYNTAX Integer32 (1..2147483647) + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Address index." + ::= { vrrpAddressEntry 1 } + +vrrpAddressType OBJECT-TYPE + SYNTAX InetAddressType + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "A value that represents a type of Internet address." + ::= { vrrpAddressEntry 2 } + +vrrpAddressValue OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Actual IP address." + ::= { vrrpAddressEntry 3 } + +vrrpAddressBroadcast OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Broadcast address associated with the IP address." + ::= { vrrpAddressEntry 4 } + +vrrpAddressMask OBJECT-TYPE + SYNTAX InetAddressPrefixLength + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Address mask." + ::= { vrrpAddressEntry 5 } + +vrrpAddressScope OBJECT-TYPE + SYNTAX InetScopeType + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Address scope." + ::= { vrrpAddressEntry 6 } + +vrrpAddressIfIndex OBJECT-TYPE + SYNTAX InterfaceIndex + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Index of the interface to which the IP address is linked to." + ::= { vrrpAddressEntry 7 } + +vrrpAddressIfName OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Name of the interface to which the IP address is linked to." + ::= { vrrpAddressEntry 8 } + +vrrpAddressIfAlias OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Alias name of the interface." + ::= { vrrpAddressEntry 9 } + +vrrpAddressStatus OBJECT-TYPE + SYNTAX INTEGER { set(1), unset(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Is the IP address set?" + ::= { vrrpAddressEntry 10 } + +vrrpAddressAdvertising OBJECT-TYPE + SYNTAX INTEGER { advertised(1), notAdvertised(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Status of VRRP advertising for this IP address." + ::= { vrrpAddressEntry 11 } + +vrrpAddressPeer OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The peer address." + ::= { vrrpAddressEntry 12 } + +-- Routes +-- see vrrp_iproute.h + +vrrpRouteTable OBJECT-TYPE + SYNTAX SEQUENCE OF VrrpRouteEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table of static and virtual routes." + ::= { vrrp 7 } + +vrrpRouteEntry OBJECT-TYPE + SYNTAX VrrpRouteEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Information describing a route. In case of a static route, + the instance index is 0." + INDEX { vrrpInstanceIndex, vrrpRouteIndex } + ::= { vrrpRouteTable 1 } + +VrrpRouteEntry ::= SEQUENCE { + vrrpRouteIndex Integer32, + vrrpRouteAddressType InetAddressType, + vrrpRouteDestination InetAddress, + vrrpRouteDestinationMask InetAddressPrefixLength, + vrrpRouteGateway InetAddress, + vrrpRouteSecondaryGateway InetAddress, + vrrpRouteSource InetAddress, + vrrpRouteMetric Unsigned32, + vrrpRouteScope InetScopeType, + vrrpRouteType INTEGER, + vrrpRouteIfIndex InterfaceIndex, + vrrpRouteIfName DisplayString, + vrrpRouteRoutingTable Unsigned32, + vrrpRouteStatus INTEGER, + vrrpRouteFromAddress InetAddress, + vrrpRouteFromAddressMask InetAddressPrefixLength, + vrrpRouteTos Unsigned32, + vrrpRouteProtocol INTEGER, + vrrpRouteECN TruthValue, + vrrpRouteQuickAck TruthValue, + vrrpRouteExpires Integer32, + vrrpRouteMTU Unsigned32, + vrrpRouteMTULock TruthValue, + vrrpRouteHopLimit Unsigned32, + vrrpRouteAdvmss Unsigned32, + vrrpRouteAdvmssLock TruthValue, + vrrpRouteRTT Unsigned32, + vrrpRouteRTTLock TruthValue, + vrrpRouteRTTvar Unsigned32, + vrrpRouteRTTvarLock TruthValue, + vrrpRouteReordering Unsigned32, + vrrpRouteReorderingLock TruthValue, + vrrpRouteWindow Unsigned32, + vrrpRouteCwnd Unsigned32, + vrrpRouteCwndLock TruthValue, + vrrpRouteSSthresh Unsigned32, + vrrpRouteSSthreshLock TruthValue, + vrrpRouteRTOMin Unsigned32, + vrrpRouteRTOMinLock TruthValue, + vrrpRouteInitCwnd Unsigned32, + vrrpRouteInitRwnd Unsigned32, + vrrpRouteCongCtl DisplayString, + vrrpRoutePref PrefType, + vrrpRouteRealmDst Realm, + vrrpRouteRealmSrc Realm, + vrrpRouteEncapType EncapType, + vrrpRouteEncapMplsLabels DisplayString, + vrrpRouteEncapId Counter64, + vrrpRouteEncapDstAddress InetAddress, + vrrpRouteEncapSrcAddress InetAddress, + vrrpRouteEncapTOS Unsigned32, + vrrpRouteEncapTTL Unsigned32, + vrrpRouteEncapFlags Unsigned32, + vrrpRouteEncapIlaLocator Counter64, + vrrpRouteFastOpenNoCookie TruthValue +} + +vrrpRouteIndex OBJECT-TYPE + SYNTAX Integer32 (1..2147483647) + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Route index." + ::= { vrrpRouteEntry 1 } + +vrrpRouteAddressType OBJECT-TYPE + SYNTAX InetAddressType + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Route type of internet address." + ::= { vrrpRouteEntry 2 } + +vrrpRouteDestination OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Route destination." + ::= { vrrpRouteEntry 3 } + +vrrpRouteDestinationMask OBJECT-TYPE + SYNTAX InetAddressPrefixLength + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Route destination mask." + ::= { vrrpRouteEntry 4 } + +vrrpRouteGateway OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Gateway for the given destination." + ::= { vrrpRouteEntry 5 } + +vrrpRouteSecondaryGateway OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "An optional second gateway for the given destination." + ::= { vrrpRouteEntry 6 } + +vrrpRouteSource OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Which source IP address to use with this route." + ::= { vrrpRouteEntry 7 } + +vrrpRouteMetric OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Metric of this route." + ::= { vrrpRouteEntry 8 } + +vrrpRouteScope OBJECT-TYPE + SYNTAX InetScopeType + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Scope of this route." + ::= { vrrpRouteEntry 9 } + +vrrpRouteType OBJECT-TYPE + SYNTAX RouteType + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Kind of route." + ::= { vrrpRouteEntry 10 } + +vrrpRouteIfIndex OBJECT-TYPE + SYNTAX InterfaceIndex + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Interface attached to this route." + ::= { vrrpRouteEntry 11 } + +vrrpRouteIfName OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Name of the interface of attached to this route." + ::= { vrrpRouteEntry 12 } + +vrrpRouteRoutingTable OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Routing table where the route should be inserted." + ::= { vrrpRouteEntry 13 } + +vrrpRouteStatus OBJECT-TYPE + SYNTAX INTEGER { set(1), unset(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Is this route set in the kernel?" + ::= { vrrpRouteEntry 14 } + +vrrpRouteFromAddress OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Source address to use for the route." + ::= { vrrpRouteEntry 15 } + +vrrpRouteFromAddressMask OBJECT-TYPE + SYNTAX InetAddressPrefixLength + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Source address mask." + ::= { vrrpRouteEntry 16 } + +vrrpRouteTos OBJECT-TYPE + SYNTAX Unsigned32 (0..255) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Route TOS value to match." + ::= { vrrpRouteEntry 17 } + +vrrpRouteProtocol OBJECT-TYPE + SYNTAX INTEGER { unspec(1), redirect(2), kernel(3), boot(4), static(5), gated(9), ra(10), mrt(11), + zebra(12), bird(13), dnrouted(14), xorp(15), ntk(16), dhcp(17), keepalived(112) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Route protocol identifier" + ::= { vrrpRouteEntry 18 } + +vrrpRouteECN OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Explicit congestion notification enabled on route." + ::= { vrrpRouteEntry 19 } + +vrrpRouteQuickAck OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Quick ack enabled on route." + ::= { vrrpRouteEntry 20 } + +vrrpRouteExpires OBJECT-TYPE + SYNTAX Integer32 (1..2147483647) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Lifetime of route." + ::= { vrrpRouteEntry 21 } + +vrrpRouteMTU OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "MTU for route." + ::= { vrrpRouteEntry 22 } + +vrrpRouteMTULock OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Is MTU locked?" + ::= { vrrpRouteEntry 23 } + +vrrpRouteHopLimit OBJECT-TYPE + SYNTAX Unsigned32 (1..256) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Hoplimit for route." + ::= { vrrpRouteEntry 24 } + +vrrpRouteAdvmss OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Advertised MSS for route." + ::= { vrrpRouteEntry 25 } + +vrrpRouteAdvmssLock OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Is advertised MSS locked?" + ::= { vrrpRouteEntry 26 } + +vrrpRouteRTT OBJECT-TYPE + SYNTAX Unsigned32 (1..536870) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Retransmission timer in msec for route." + ::= { vrrpRouteEntry 27 } + +vrrpRouteRTTLock OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Is retransmission timer locked?" + ::= { vrrpRouteEntry 28 } + +vrrpRouteRTTvar OBJECT-TYPE + SYNTAX Unsigned32 (1..1073741) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Retransmission timer var in msec for route." + ::= { vrrpRouteEntry 29 } + +vrrpRouteRTTvarLock OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Is retransmission timer var locked?" + ::= { vrrpRouteEntry 30 } + +vrrpRouteReordering OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Reordeering for route." + ::= { vrrpRouteEntry 31 } + +vrrpRouteReorderingLock OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Is reordering value locked?" + ::= { vrrpRouteEntry 32 } + +vrrpRouteWindow OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Window for route." + ::= { vrrpRouteEntry 33 } + +vrrpRouteCwnd OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Congestion window for route." + ::= { vrrpRouteEntry 34 } + +vrrpRouteCwndLock OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Is congestion window value locked?" + ::= { vrrpRouteEntry 35 } + +vrrpRouteSSthresh OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "SS threshold window for route." + ::= { vrrpRouteEntry 36 } + +vrrpRouteSSthreshLock OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Is SS threshold value locked?" + ::= { vrrpRouteEntry 37 } + +vrrpRouteRTOMin OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Minimum RTO value (ms) for route." + ::= { vrrpRouteEntry 38 } + +vrrpRouteRTOMinLock OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Is minimum RTO value value locked?" + ::= { vrrpRouteEntry 39 } + +vrrpRouteInitCwnd OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Initial congestion window for route." + ::= { vrrpRouteEntry 40 } + +vrrpRouteInitRwnd OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Initian R window for route." + ::= { vrrpRouteEntry 41 } + +vrrpRouteCongCtl OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Congestion control algorithm for route." + ::= { vrrpRouteEntry 42 } + +vrrpRoutePref OBJECT-TYPE + SYNTAX PrefType + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Preference type for IPv6 route" + ::= { vrrpRouteEntry 43 } + +vrrpRouteRealmDst OBJECT-TYPE + SYNTAX Realm + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Realms for route." + ::= { vrrpRouteEntry 44 } + +vrrpRouteRealmSrc OBJECT-TYPE + SYNTAX Realm + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Realms for route." + ::= { vrrpRouteEntry 45 } + +vrrpRouteEncapType OBJECT-TYPE + SYNTAX EncapType + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Encapsulation type." + ::= { vrrpRouteEntry 46 } + +vrrpRouteEncapMplsLabels OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "MPLS labels for MPLS encapsulation." + ::= { vrrpRouteEntry 47 } + +vrrpRouteEncapId OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Tunnel ID for IP/IPv6 tunnels." + ::= { vrrpRouteEntry 48 } + +vrrpRouteEncapDstAddress OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Destination address for IP/IPv6 encapsulation." + ::= { vrrpRouteEntry 49 } + +vrrpRouteEncapSrcAddress OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Source address for IP/IPv6 encapsulation." + ::= { vrrpRouteEntry 50 } + +vrrpRouteEncapTOS OBJECT-TYPE + SYNTAX Unsigned32 (0..255) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Route next hop TOS/dsfield for IP/IPv6 encapsulation." + ::= { vrrpRouteEntry 51 } + +vrrpRouteEncapTTL OBJECT-TYPE + SYNTAX Unsigned32 (1..255) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Next hop time to live/hopcount for IP/IPv6 encapsulation." + ::= { vrrpRouteEntry 52 } + +vrrpRouteEncapFlags OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Flags for this IP/IPv6 encapsulation." + ::= { vrrpRouteEntry 53 } + +vrrpRouteEncapIlaLocator OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "ILA locator for this encapsulation." + ::= { vrrpRouteEntry 54 } + +vrrpRouteFastOpenNoCookie OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Fast open no cookie." + ::= { vrrpRouteEntry 55 } + +-- Route next hops +-- see vrrp_iproute.h + +vrrpRouteNextHopTable OBJECT-TYPE + SYNTAX SEQUENCE OF VrrpRouteNextHopEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table of next hops for static and virtual routes." + ::= { vrrp 11 } + +vrrpRouteNextHopEntry OBJECT-TYPE + SYNTAX VrrpRouteNextHopEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Information describing a route next hop. This can be for a static + route or a virtual route. In case of a static route, the + VRRP instance index is 0." + INDEX { vrrpInstanceIndex, vrrpRouteIndex, vrrpRouteNextHopIndex } + ::= { vrrpRouteNextHopTable 1 } + +VrrpRouteNextHopEntry ::= SEQUENCE { + vrrpRouteNextHopIndex Integer32, + vrrpRouteNextHopAddressType InetAddressType, + vrrpRouteNextHopAddress InetAddress, + vrrpRouteNextHopIfIndex InterfaceIndex, + vrrpRouteNextHopIfName DisplayString, + vrrpRouteNextHopWeight Unsigned32, + vrrpRouteNextHopOnlink TruthValue, + vrrpRouteNextHopRealmDst Realm, + vrrpRouteNextHopRealmSrc Realm, + vrrpRouteNextHopEncapType EncapType, + vrrpRouteNextHopEncapMplsLabels DisplayString, + vrrpRouteNextHopEncapId Counter64, + vrrpRouteNextHopEncapDstAddress InetAddress, + vrrpRouteNextHopEncapSrcAddress InetAddress, + vrrpRouteNextHopEncapTOS Unsigned32, + vrrpRouteNextHopEncapTTL Unsigned32, + vrrpRouteNextHopEncapFlags Unsigned32, + vrrpRouteNextHopEncapIlaLocator Counter64 +} + +vrrpRouteNextHopIndex OBJECT-TYPE + SYNTAX Integer32 (1..2147483647) + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Route next hop index." + ::= { vrrpRouteNextHopEntry 1 } + +vrrpRouteNextHopAddressType OBJECT-TYPE + SYNTAX InetAddressType + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Route next hop internet address type." + ::= { vrrpRouteNextHopEntry 2 } + +vrrpRouteNextHopAddress OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Route next hop address." + ::= { vrrpRouteNextHopEntry 3 } + +vrrpRouteNextHopIfIndex OBJECT-TYPE + SYNTAX InterfaceIndex + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Interface for this next hop." + ::= { vrrpRouteNextHopEntry 4 } + +vrrpRouteNextHopIfName OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Name of the interface for this next hop." + ::= { vrrpRouteNextHopEntry 5 } + +vrrpRouteNextHopWeight OBJECT-TYPE + SYNTAX Unsigned32 (1..256) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Route next hop weight." + ::= { vrrpRouteNextHopEntry 6 } + +vrrpRouteNextHopOnlink OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Next hop address is specified to be onlink." + ::= { vrrpRouteNextHopEntry 7 } + +vrrpRouteNextHopRealmDst OBJECT-TYPE + SYNTAX Realm + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Destination realm for this next hop." + ::= { vrrpRouteNextHopEntry 8 } + +vrrpRouteNextHopRealmSrc OBJECT-TYPE + SYNTAX Realm + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Source realms for this next hop." + ::= { vrrpRouteNextHopEntry 9 } + +vrrpRouteNextHopEncapType OBJECT-TYPE + SYNTAX EncapType + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Encapsulation type." + ::= { vrrpRouteNextHopEntry 10 } + +vrrpRouteNextHopEncapMplsLabels OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "MPLS labels for MPLS encapsulation." + ::= { vrrpRouteNextHopEntry 11 } + +vrrpRouteNextHopEncapId OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Tunnel ID for IP/IPv6 tunnels." + ::= { vrrpRouteNextHopEntry 12 } + +vrrpRouteNextHopEncapDstAddress OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Destination address for IP/IPv6 encapsulation." + ::= { vrrpRouteNextHopEntry 13 } + +vrrpRouteNextHopEncapSrcAddress OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Source address for IP/IPv6 encapsulation." + ::= { vrrpRouteNextHopEntry 14 } + +vrrpRouteNextHopEncapTOS OBJECT-TYPE + SYNTAX Unsigned32 (0..255) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Route next hop TOS/dsfield for IP/IPv6 encapsulation." + ::= { vrrpRouteNextHopEntry 15 } + +vrrpRouteNextHopEncapTTL OBJECT-TYPE + SYNTAX Unsigned32 (1..255) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Next hop time to live/hopcount for IP/IPv6 encapsulation." + ::= { vrrpRouteNextHopEntry 16 } + +vrrpRouteNextHopEncapFlags OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Flags for this IP/IPv6 encapsulation." + ::= { vrrpRouteNextHopEntry 17 } + +vrrpRouteNextHopEncapIlaLocator OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "ILA locator for this encapsulation." + ::= { vrrpRouteNextHopEntry 18 } + +-- Rules +-- see vrrp_iprule.h + +vrrpRuleTable OBJECT-TYPE + SYNTAX SEQUENCE OF VrrpRuleEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table of static and virtual rules." + ::= { vrrp 8 } + +vrrpRuleEntry OBJECT-TYPE + SYNTAX VrrpRuleEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Information describing a rule. In case of a static rule, + the instance index is 0." + INDEX { vrrpInstanceIndex, vrrpRuleIndex } + ::= { vrrpRuleTable 1 } + +VrrpRuleEntry ::= SEQUENCE { + vrrpRuleIndex Unsigned32, + vrrpRuleDirection DisplayString, + vrrpRuleAddressType InetAddressType, + vrrpRuleAddress InetAddress, + vrrpRuleAddressMask InetAddressPrefixLength, + vrrpRuleRoutingTable Unsigned32, + vrrpRuleStatus INTEGER, + vrrpRuleInvert TruthValue, + vrrpRuleDestinationAddressType InetAddressType, + vrrpRuleDestinationAddress InetAddress, + vrrpRuleDestinationAddressMask InetAddressPrefixLength, + vrrpRuleSourceAddressType InetAddressType, + vrrpRuleSourceAddress InetAddress, + vrrpRuleSourceAddressMask InetAddressPrefixLength, + vrrpRuleTos Unsigned32, + vrrpRuleFwmark Unsigned32, + vrrpRuleFwmask Unsigned32, + vrrpRuleRealmDst Realm, + vrrpRuleRealmSrc Realm, + vrrpRuleInInterface DisplayString, + vrrpRuleOutInterface DisplayString, + vrrpRuleTarget Unsigned32, + vrrpRuleAction RuleAction, + vrrpRuleTableNo Unsigned32, + vrrpRulePreference Unsigned32, + vrrpRuleSuppressPrefixLen Unsigned32, + vrrpRuleSuppressGroup DisplayString, + vrrpRuleTunnelIdHigh Unsigned32, + vrrpRuleTunnelIdLow Unsigned32, + vrrpRuleUidRangeStart Unsigned32, + vrrpRuleUidRangeEnd Unsigned32, + vrrpRuleL3mdev TruthValue, + vrrpRuleProtocol INTEGER, + vrrpRuleIPProto Unsigned32, + vrrpRuleSrcPortStart Unsigned32, + vrrpRuleSrcPortEnd Unsigned32, + vrrpRuleDstPortStart Unsigned32, + vrrpRuleDstPortEnd Unsigned32 +} + +vrrpRuleIndex OBJECT-TYPE + SYNTAX Unsigned32 (1..4294967295) + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Rule index." + ::= { vrrpRuleEntry 1 } + +vrrpRuleDirection OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS obsolete + DESCRIPTION + "Traffic direction for this rule." + ::= { vrrpRuleEntry 2 } + +vrrpRuleAddressType OBJECT-TYPE + SYNTAX InetAddressType + MAX-ACCESS read-only + STATUS obsolete + DESCRIPTION + "Rule type of internet address." + ::= { vrrpRuleEntry 3 } + +vrrpRuleAddress OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS obsolete + DESCRIPTION + "Rule network address." + ::= { vrrpRuleEntry 4 } + +vrrpRuleAddressMask OBJECT-TYPE + SYNTAX InetAddressPrefixLength + MAX-ACCESS read-only + STATUS obsolete + DESCRIPTION + "Rule network mask." + ::= { vrrpRuleEntry 5 } + +vrrpRuleRoutingTable OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Routing table where the rule should be inserted." + ::= { vrrpRuleEntry 6 } + +vrrpRuleStatus OBJECT-TYPE + SYNTAX INTEGER { set(1), unset(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Is this rule set in the kernel?" + ::= { vrrpRuleEntry 7 } + +vrrpRuleInvert OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Invert rule matching sense." + ::= { vrrpRuleEntry 8 } + +vrrpRuleDestinationAddressType OBJECT-TYPE + SYNTAX InetAddressType + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Family of rule destination internet address." + ::= { vrrpRuleEntry 9 } + +vrrpRuleDestinationAddress OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Rule destination network address." + ::= { vrrpRuleEntry 10 } + +vrrpRuleDestinationAddressMask OBJECT-TYPE + SYNTAX InetAddressPrefixLength + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Rule destination address network mask." + ::= { vrrpRuleEntry 11 } + +vrrpRuleSourceAddressType OBJECT-TYPE + SYNTAX InetAddressType + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Family of rule source internet address." + ::= { vrrpRuleEntry 12 } + +vrrpRuleSourceAddress OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Rule source network address." + ::= { vrrpRuleEntry 13 } + +vrrpRuleSourceAddressMask OBJECT-TYPE + SYNTAX InetAddressPrefixLength + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Rule source address network mask." + ::= { vrrpRuleEntry 14 } + +vrrpRuleTos OBJECT-TYPE + SYNTAX Unsigned32 (0..255) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Rule TOS value to match." + ::= { vrrpRuleEntry 15 } + +vrrpRuleFwmark OBJECT-TYPE + SYNTAX Unsigned32 (0..4294967295) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Rule fwmark value to match." + ::= { vrrpRuleEntry 16 } + +vrrpRuleFwmask OBJECT-TYPE + SYNTAX Unsigned32 (0..4294967295) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Rule fwmask value to match the fwmark." + ::= { vrrpRuleEntry 17 } + +vrrpRuleRealmDst OBJECT-TYPE + SYNTAX Realm + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Destination realm to select if the rule matched." + ::= { vrrpRuleEntry 18 } + +vrrpRuleRealmSrc OBJECT-TYPE + SYNTAX Realm + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Source realm to select if the rule matched." + ::= { vrrpRuleEntry 19 } + +vrrpRuleInInterface OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Rule incoming interface to match." + ::= { vrrpRuleEntry 20 } + +vrrpRuleOutInterface OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Rule outgoing interface to match." + ::= { vrrpRuleEntry 21 } + +vrrpRuleTarget OBJECT-TYPE + SYNTAX Unsigned32 (0..4294967295) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Rule goto target." + ::= { vrrpRuleEntry 22 } + +vrrpRuleAction OBJECT-TYPE + SYNTAX RuleAction + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Rule type." + ::= { vrrpRuleEntry 23 } + +vrrpRuleTableNo OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Routing table." + ::= { vrrpRuleEntry 24 } + +vrrpRulePreference OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Routing table." + ::= { vrrpRuleEntry 25 } + +vrrpRuleSuppressPrefixLen OBJECT-TYPE + SYNTAX Unsigned32 (0..128) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Rule suppress match prefix length." + ::= { vrrpRuleEntry 26 } + +vrrpRuleSuppressGroup OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Rule suppress match interface group." + ::= { vrrpRuleEntry 27 } + +vrrpRuleTunnelIdHigh OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Rule tunnel-id low 32 bits." + ::= { vrrpRuleEntry 28 } + +vrrpRuleTunnelIdLow OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Rule tunnel-id high 32 bits." + ::= { vrrpRuleEntry 29 } + +vrrpRuleUidRangeStart OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Rule Uid range start." + ::= { vrrpRuleEntry 30 } + +vrrpRuleUidRangeEnd OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Rule Uid range end." + ::= { vrrpRuleEntry 31 } + +vrrpRuleL3mdev OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Use routing device specified for layer 3 VRF device." + ::= { vrrpRuleEntry 32 } + +vrrpRuleProtocol OBJECT-TYPE + SYNTAX INTEGER { unspec(1), redirect(2), kernel(3), boot(4), static(5), gated(9), ra(10), mrt(11), + zebra(12), bird(13), dnrouted(14), xorp(15), ntk(16), dhcp(17), keepalived(112) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Rule protocol identifier." + ::= { vrrpRuleEntry 33 } + +vrrpRuleIPProto OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Rule IP protocol." + ::= { vrrpRuleEntry 34 } + +vrrpRuleSrcPortStart OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Rule source port range start." + ::= { vrrpRuleEntry 35 } + +vrrpRuleSrcPortEnd OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Rule source port range end." + ::= { vrrpRuleEntry 36 } + +vrrpRuleDstPortStart OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Rule destination port range start." + ::= { vrrpRuleEntry 37 } + +vrrpRuleDstPortEnd OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Rule destination port range end." + ::= { vrrpRuleEntry 38 } + + +-- VRRP scripts +-- see vrrp_track.h + +vrrpScriptTable OBJECT-TYPE + SYNTAX SEQUENCE OF VrrpScriptEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table of VRRP scripts" + ::= { vrrp 9 } + +vrrpScriptEntry OBJECT-TYPE + SYNTAX VrrpScriptEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Information describing a VRRP script" + INDEX { vrrpScriptIndex } + ::= { vrrpScriptTable 1 } + +VrrpScriptEntry ::= SEQUENCE { + vrrpScriptIndex Integer32, + vrrpScriptName DisplayString, + vrrpScriptCommand DisplayString, + vrrpScriptInterval Integer32, + vrrpScriptWeight Integer32, + vrrpScriptResult INTEGER, + vrrpScriptRise Unsigned32, + vrrpScriptFall Unsigned32 +} + +vrrpScriptIndex OBJECT-TYPE + SYNTAX Integer32 (1..2147483647) + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Script index." + ::= { vrrpScriptEntry 1 } + +vrrpScriptName OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Symbolic name of the script." + ::= { vrrpScriptEntry 2 } + +vrrpScriptCommand OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Command executed when running the script." + ::= { vrrpScriptEntry 3 } + +vrrpScriptInterval OBJECT-TYPE + SYNTAX Integer32 + UNITS "seconds" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Interval between two runs of the script." + ::= { vrrpScriptEntry 4 } + +vrrpScriptWeight OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Weight of the script if successful." + ::= { vrrpScriptEntry 5 } + +vrrpScriptResult OBJECT-TYPE + SYNTAX INTEGER { + init(1), + bad(2), + good(3), + initfailed(5) + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current status of the script." + ::= { vrrpScriptEntry 6 } + +vrrpScriptRise OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "How many times the script should succeed before OK." + ::= { vrrpScriptEntry 7 } + +vrrpScriptFall OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "How many times the script should fail before KO." + ::= { vrrpScriptEntry 8 } + +-- VRRP files +-- see vrrp_track.h + +vrrpTrackedFileTable OBJECT-TYPE + SYNTAX SEQUENCE OF VrrpTrackedFileEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table of tracked files for each VRRP instance." + ::= { vrrp 12 } + +vrrpTrackedFileEntry OBJECT-TYPE + SYNTAX VrrpTrackedFileEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Information describing a tracked file" + INDEX { vrrpInstanceIndex, vrrpTrackedFileIndex } + ::= { vrrpTrackedFileTable 1 } + +VrrpTrackedFileEntry ::= SEQUENCE { + vrrpTrackedFileIndex Integer32, + vrrpTrackedFileName DisplayString, + vrrpTrackedFileWeight Integer32 +} + +vrrpTrackedFileIndex OBJECT-TYPE + SYNTAX Integer32 (1..2147483647) + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Index of the tracked file in the set of tracked files for + the given VRRP instance. This index has no relation with the + index of vrrpFileTable." + ::= { vrrpTrackedFileEntry 1 } + +vrrpTrackedFileName OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Name of the tracked file." + ::= { vrrpTrackedFileEntry 2 } + +vrrpTrackedFileWeight OBJECT-TYPE + SYNTAX Integer32 (-254..254) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Weight of the tracked file." + ::= { vrrpTrackedFileEntry 3 } + +vrrpFileTable OBJECT-TYPE + SYNTAX SEQUENCE OF VrrpFileEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table of VRRP files" + ::= { vrrp 13 } + +vrrpFileEntry OBJECT-TYPE + SYNTAX VrrpFileEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Information describing a VRRP file" + INDEX { vrrpFileIndex } + ::= { vrrpFileTable 1 } + +VrrpFileEntry ::= SEQUENCE { + vrrpFileIndex Integer32, + vrrpFileName DisplayString, + vrrpFilePath DisplayString, + vrrpFileResult INTEGER, + vrrpFileWeight Integer32 +} + +vrrpFileIndex OBJECT-TYPE + SYNTAX Integer32 (1..2147483647) + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "File index." + ::= { vrrpFileEntry 1 } + +vrrpFileName OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Symbolic name of the file." + ::= { vrrpFileEntry 2 } + +vrrpFilePath OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Path of track file." + ::= { vrrpFileEntry 3 } + +vrrpFileResult OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current status of the file." + ::= { vrrpFileEntry 4 } + +vrrpFileWeight OBJECT-TYPE + SYNTAX Integer32 (-254..254) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Default weight of the tracked file." + ::= { vrrpFileEntry 5 } + +-- Traps + +vrrpTrap OBJECT IDENTIFIER ::= { vrrp 10 } +vrrpTraps OBJECT IDENTIFIER ::= { vrrpTrap 0 } -- Reverse-mappable +vrrpTrapControl OBJECT IDENTIFIER ::= { vrrpTrap 1 } + +vrrpSyncGroupStateChange NOTIFICATION-TYPE + OBJECTS { + vrrpSyncGroupName, + vrrpSyncGroupState, + routerId + } + STATUS current + DESCRIPTION + "This trap signifies that the state of the whole vrrp sync + group changed." + ::= { vrrpTraps 1 } + +vrrpInstanceStateChange NOTIFICATION-TYPE + OBJECTS { + vrrpInstanceName, + vrrpInstanceState, + vrrpInstanceInitialState, + routerId + } + STATUS current + DESCRIPTION + "This trap signifies that the state of a vrrp instance changed." + ::= { vrrpTraps 2 } + +-- ---------------------------------------------------------------------- +-- Healthchecker part +-- ---------------------------------------------------------------------- + +-- Virtual server group + +virtualServerGroupTable OBJECT-TYPE + SYNTAX SEQUENCE OF VirtualServerGroupEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table of virtual server groups." + ::= { check 1 } + +virtualServerGroupEntry OBJECT-TYPE + SYNTAX VirtualServerGroupEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Information describing a virtual server group." + INDEX { virtualServerGroupIndex } + ::= { virtualServerGroupTable 1 } + +VirtualServerGroupEntry ::= SEQUENCE { + virtualServerGroupIndex Integer32, + virtualServerGroupName DisplayString +} + +virtualServerGroupIndex OBJECT-TYPE + SYNTAX Integer32 (1..2147483647) + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Index of the virtual server group." + ::= { virtualServerGroupEntry 1 } + +virtualServerGroupName OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Name of the virtual server group." + ::= { virtualServerGroupEntry 2 } + +virtualServerGroupMemberTable OBJECT-TYPE + SYNTAX SEQUENCE OF VirtualServerGroupMemberEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table of members of a virtual server group." + ::= { check 2 } + +virtualServerGroupMemberEntry OBJECT-TYPE + SYNTAX VirtualServerGroupMemberEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Description of a member of a virtual server group." + INDEX { virtualServerGroupIndex, virtualServerGroupMemberIndex } + ::= { virtualServerGroupMemberTable 1 } + +VirtualServerGroupMemberEntry ::= SEQUENCE { + virtualServerGroupMemberIndex Integer32, + virtualServerGroupMemberType INTEGER, + virtualServerGroupMemberFwMark Unsigned32, + virtualServerGroupMemberAddrType InetAddressType, + virtualServerGroupMemberAddress InetAddress, + virtualServerGroupMemberAddr1 InetAddress, + virtualServerGroupMemberAddr2 InetAddress, + virtualServerGroupMemberPort InetPortNumber +} + +virtualServerGroupMemberIndex OBJECT-TYPE + SYNTAX Integer32 (1..2147483647) + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Index of the member into virtual server group." + ::= { virtualServerGroupMemberEntry 1 } + +virtualServerGroupMemberType OBJECT-TYPE + SYNTAX INTEGER { fwmark(1), ip(2), iprange(3) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Kind of entry: firewall mark, address with port or range of + addresses with port." + ::= { virtualServerGroupMemberEntry 2 } + +virtualServerGroupMemberFwMark OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Firewall mark for this member. + + If the kind of this member is not fwmark(1), then this entry + should not exist for the current row." + ::= { virtualServerGroupMemberEntry 3 } + +virtualServerGroupMemberAddrType OBJECT-TYPE + SYNTAX InetAddressType + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Type of IP address for this member. + + If the kind of this member is neither address(2) or range(3), + then this entry should not exist for the current row." + ::= { virtualServerGroupMemberEntry 4 } + +virtualServerGroupMemberAddress OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "IP address of this member. + + If the kind of this member is not address(2), then this entry + should not exist for the current row." + ::= { virtualServerGroupMemberEntry 5 } + +virtualServerGroupMemberAddr1 OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "First IP address of the range for this member. + + If the kind of this member is not range(3), then this entry + should not exist for the current row." + ::= { virtualServerGroupMemberEntry 6 } + +virtualServerGroupMemberAddr2 OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Second IP address of the range for this member. + + If the kind of this member is not range(3), then this entry + should not exist for the current row." + ::= { virtualServerGroupMemberEntry 7 } + +virtualServerGroupMemberPort OBJECT-TYPE + SYNTAX InetPortNumber + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "V port for this member. + + If the kind of this member is neither address(2) nor range(3), + then this entry should not exist for the current row." + ::= { virtualServerGroupMemberEntry 8 } + +-- virtual server + +virtualServerTable OBJECT-TYPE + SYNTAX SEQUENCE OF VirtualServerEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table of virtual servers." + ::= { check 3 } + +virtualServerEntry OBJECT-TYPE + SYNTAX VirtualServerEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Information describing a virtual server." + INDEX { virtualServerIndex } + ::= { virtualServerTable 1 } + +VirtualServerEntry ::= SEQUENCE { + virtualServerIndex Integer32, + virtualServerType INTEGER, + virtualServerNameOfGroup DisplayString, + virtualServerFwMark Unsigned32, + virtualServerAddrType InetAddressType, + virtualServerAddress InetAddress, + virtualServerPort InetPortNumber, + virtualServerProtocol INTEGER, + virtualServerLoadBalancingAlgo INTEGER, + virtualServerLoadBalancingKind INTEGER, + virtualServerStatus INTEGER, + virtualServerVirtualHost DisplayString, + virtualServerPersist INTEGER, + virtualServerPersistTimeout Unsigned32, + virtualServerPersistGranularity InetAddress, + virtualServerDelayLoop Unsigned32, + virtualServerHaSuspend TruthValue, + virtualServerAlpha INTEGER, + virtualServerOmega INTEGER, + virtualServerRealServersTotal Unsigned32, + virtualServerRealServersUp Unsigned32, + virtualServerQuorum Unsigned32, + virtualServerQuorumStatus INTEGER, + virtualServerQuorumUp DisplayString, + virtualServerQuorumDown DisplayString, + virtualServerHysteresis Unsigned32, + virtualServerStatsConns Gauge32, + virtualServerStatsInPkts Counter32, + virtualServerStatsOutPkts Counter32, + virtualServerStatsInBytes Counter64, + virtualServerStatsOutBytes Counter64, + virtualServerRateCps Gauge32, + virtualServerRateInPPS Gauge32, + virtualServerRateOutPPS Gauge32, + virtualServerRateInBPS Gauge32, + virtualServerRateOutBPS Gauge32, + virtualServerOPS TruthValue, + virtualServerStatsConns64 Counter64, + virtualServerStatsInPkts64 Counter64, + virtualServerStatsOutPkts64 Counter64, + virtualServerRateCpsLow Unsigned32, + virtualServerRateCpsHigh Unsigned32, + virtualServerRateInPPSLow Unsigned32, + virtualServerRateInPPSHigh Unsigned32, + virtualServerRateOutPPSLow Unsigned32, + virtualServerRateOutPPSHigh Unsigned32, + virtualServerRateInBPSLow Unsigned32, + virtualServerRateInBPSHigh Unsigned32, + virtualServerRateOutBPSLow Unsigned32, + virtualServerRateOutBPSHigh Unsigned32, + virtualServerPersistGranularity6 Unsigned32, + virtualServerHashed TruthValue, + virtualServerSHFallback TruthValue, + virtualServerSHPort TruthValue, + virtualServerSched3 TruthValue, + virtualServerActionWhenDown INTEGER, + virtualServerRetry Unsigned32, + virtualServerDelayBeforeRetry Unsigned32, + virtualServerWarmup Unsigned32, + virtualServerWeight INTEGER, + virtualServerSmtpAlert INTEGER, + virtualServerMHFallback TruthValue, + virtualServerMHPort TruthValue +} + +virtualServerIndex OBJECT-TYPE + SYNTAX Integer32 (1..2147483647) + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Index of the virtual server." + ::= { virtualServerEntry 1 } + +virtualServerType OBJECT-TYPE + SYNTAX INTEGER { fwmark(1), ip(2), group(3) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Type of virtual server. A virtual server can either be + defined from a firewall mark, an IP and a port + or from a virtual server group." + ::= { virtualServerEntry 2 } + +virtualServerNameOfGroup OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "If the virtual is defined from a group, this is the name of the group." + ::= { virtualServerEntry 3 } + +virtualServerFwMark OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "If the virtual server is defined from a firewall mark, this + is the value of the mark. Otherwise, this column should not + exist in the current row." + ::= { virtualServerEntry 4 } + +virtualServerAddrType OBJECT-TYPE + SYNTAX InetAddressType + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "If the virtual server is defined from an IP, this + is the address family. Otherwise, this column should not + exist in the current row." + ::= { virtualServerEntry 5 } + +virtualServerAddress OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "If the virtual server is defined from an IP address, this + is the value of the IP. Otherwise, this column should not + exist in the current row." + ::= { virtualServerEntry 6 } + +virtualServerPort OBJECT-TYPE + SYNTAX InetPortNumber + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "If the virtual server is defined from an IP, this is + the value of the port to listen for requests. Otherwise, this column + should not exist in the current row." + ::= { virtualServerEntry 7 } + +virtualServerProtocol OBJECT-TYPE + SYNTAX INTEGER { tcp(1), udp(2), sctp(3), none(4) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Which transport protocol should be used for this virtual server." + ::= { virtualServerEntry 8 } + +virtualServerLoadBalancingAlgo OBJECT-TYPE + SYNTAX INTEGER { + rr(1), + wrr(2), + lc(3), + wlc(4), + lblc(5), + lblcr(6), + dh(7), + sh(8), + sed(9), + nq(10), + fo(11), + ovf(12), + mh(13), + unknown(99) + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Which load balancing algorithm (or scheduler) should be used + for this virtual server." + ::= { virtualServerEntry 9 } + +-- Note: this object is misnamed. It should be virtualServerForwardingMethod +virtualServerLoadBalancingKind OBJECT-TYPE + SYNTAX INTEGER { nat(1), dr(2), tun(3) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Default forwarding method to use for this virtual server." + ::= { virtualServerEntry 10 } + +virtualServerStatus OBJECT-TYPE + SYNTAX INTEGER { alive(1), dead(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current status of this virtual server." + ::= { virtualServerEntry 11 } + +virtualServerVirtualHost OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Virtualhost of this server for HTTP like requests." + ::= { virtualServerEntry 12 } + +virtualServerPersist OBJECT-TYPE + SYNTAX INTEGER { enabled(1), disabled(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Is the virtual service persistence enabled?" + ::= { virtualServerEntry 13 } + +virtualServerPersistTimeout OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "seconds" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "If this virtual service is persistence, what is the timeout." + ::= { virtualServerEntry 14 } + +virtualServerPersistGranularity OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Netmask specifying the granularity of the IPv4 persistence mechanism." + ::= { virtualServerEntry 15 } + +virtualServerDelayLoop OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "seconds" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Delay in seconds between two checks." + ::= { virtualServerEntry 16 } + +virtualServerHaSuspend OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "If set to true(1), checks will be suspended if the IP of the + virtual server is currently not set." + ::= { virtualServerEntry 17 } + +virtualServerAlpha OBJECT-TYPE + SYNTAX INTEGER { enabled(1), disabled(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Is alpha mode enabled?" + ::= { virtualServerEntry 18 } + +virtualServerOmega OBJECT-TYPE + SYNTAX INTEGER { enabled(1), disabled(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Is omega mode enabled?" + ::= { virtualServerEntry 19 } + +virtualServerRealServersTotal OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Total number of real servers for this virtual server." + ::= { virtualServerEntry 20 } + +virtualServerRealServersUp OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Real servers actually up for this virtual server." + ::= { virtualServerEntry 21 } + +virtualServerQuorum OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Quorum to get amond real servers to consider this virtual server up." + ::= { virtualServerEntry 22 } + +virtualServerQuorumStatus OBJECT-TYPE + SYNTAX INTEGER { met(1), notMet(2), shutdown(3) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current status of the quorum for this virtual server." + ::= { virtualServerEntry 23 } + +virtualServerQuorumUp OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Command to execute when the quorum is met." + ::= { virtualServerEntry 24 } + +virtualServerQuorumDown OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Command to execute when the quorum is not met." + ::= { virtualServerEntry 25 } + +virtualServerHysteresis OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Hysteresis with respect to quorum count." + ::= { virtualServerEntry 26 } + +virtualServerStatsConns OBJECT-TYPE + SYNTAX Gauge32 + UNITS "connections" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Total number of connections scheduled for this virtual server." + ::= { virtualServerEntry 27 } + +virtualServerStatsInPkts OBJECT-TYPE + SYNTAX Counter32 + UNITS "packets" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Total number of incoming packets for this virtual server." + ::= { virtualServerEntry 28 } + +virtualServerStatsOutPkts OBJECT-TYPE + SYNTAX Counter32 + UNITS "packets" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Total number of outgoing packets for this virtual server." + ::= { virtualServerEntry 29 } + +virtualServerStatsInBytes OBJECT-TYPE + SYNTAX Counter64 + UNITS "bytes" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Total number of incoming bytes for this virtual server." + ::= { virtualServerEntry 30 } + +virtualServerStatsOutBytes OBJECT-TYPE + SYNTAX Counter64 + UNITS "bytes" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Total number of outgoing bytes for this virtual server." + ::= { virtualServerEntry 31 } + +virtualServerRateCps OBJECT-TYPE + SYNTAX Gauge32 + UNITS "connections/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current connection rate for this virtual server." + ::= { virtualServerEntry 32 } + +virtualServerRateInPPS OBJECT-TYPE + SYNTAX Gauge32 + UNITS "packets/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current in packet rate for this virtual server." + ::= { virtualServerEntry 33 } + +virtualServerRateOutPPS OBJECT-TYPE + SYNTAX Gauge32 + UNITS "packets/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current out packet rate for this virtual server." + ::= { virtualServerEntry 34 } + +virtualServerRateInBPS OBJECT-TYPE + SYNTAX Gauge32 + UNITS "bytes/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current incoming rate for this virtual server." + ::= { virtualServerEntry 35 } + +virtualServerRateOutBPS OBJECT-TYPE + SYNTAX Gauge32 + UNITS "bytes/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current outgoing rate for this virtual server." + ::= { virtualServerEntry 36 } + +virtualServerOPS OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "If set to true(1), One-Packet-Scheduling will be applied." + ::= { virtualServerEntry 37 } + +virtualServerStatsConns64 OBJECT-TYPE + SYNTAX Counter64 + UNITS "connections" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Total number of connections scheduled for this virtual server." + ::= { virtualServerEntry 38 } + +virtualServerStatsInPkts64 OBJECT-TYPE + SYNTAX Counter64 + UNITS "packets" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Total number of incoming packets for this virtual server." + ::= { virtualServerEntry 39 } + +virtualServerStatsOutPkts64 OBJECT-TYPE + SYNTAX Counter64 + UNITS "packets" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Total number of outgoing packets for this virtual server." + ::= { virtualServerEntry 40 } + +virtualServerRateCpsLow OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "connections/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current connection rate for this virtual server. + Together with virtualServerRateCpsHigh composes 64-bit number." + ::= { virtualServerEntry 41 } + +virtualServerRateCpsHigh OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "connections/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current connection rate for this virtual server. + Together with virtualServerRateCpsLow composes 64-bit number." + ::= { virtualServerEntry 42 } + +virtualServerRateInPPSLow OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "packets/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current in packet rate for this virtual server. + Together with virtualServerRateInPPSHigh composes 64-bit number." + ::= { virtualServerEntry 43 } + +virtualServerRateInPPSHigh OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "packets/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current in packet rate for this virtual server. + Together with virtualServerRateInPPSLow composes 64-bit number." + ::= { virtualServerEntry 44 } + +virtualServerRateOutPPSLow OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "packets/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current out packet rate for this virtual server. + Together with virtualServerRateOutPPSHigh composes 64-bit number." + ::= { virtualServerEntry 45 } + +virtualServerRateOutPPSHigh OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "packets/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current out packet rate for this virtual server. + Together with virtualServerRateOutPPSLow composes 64-bit number." + ::= { virtualServerEntry 46 } + +virtualServerRateInBPSLow OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "bytes/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current incoming rate for this virtual server. + Together with virtualServerInBPSHigh composes 64-bit number." + ::= { virtualServerEntry 47 } + +virtualServerRateInBPSHigh OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "bytes/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current incoming rate for this virtual server. + Together with virtualServerRateInBPSLow composes 64-bit number." + ::= { virtualServerEntry 48 } + +virtualServerRateOutBPSLow OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "bytes/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current outgoing rate for this virtual server. + Together with virtualServerRateOutBPSHigh composes 64-bit number." + ::= { virtualServerEntry 49 } + +virtualServerRateOutBPSHigh OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "bytes/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current outgoing rate for this virtual server. + Together with virtualServerRateOutBPSLow composes 64-bit number." + ::= { virtualServerEntry 50 } + +virtualServerPersistGranularity6 OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Netmask specifying the granularity of the IPv6 persistence mechanism." + ::= { virtualServerEntry 51 } + +virtualServerHashed OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "If set to true(1), entries will be hashed." + ::= { virtualServerEntry 52 } + +virtualServerSHFallback OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "If set to true(1), SH scheduler fallback." + ::= { virtualServerEntry 53 } + +virtualServerSHPort OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "If set to true(1), SH scheduler use port." + ::= { virtualServerEntry 54 } + +virtualServerSched3 OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "If set to true(1), scheduler flag 3 set." + ::= { virtualServerEntry 55 } + +virtualServerActionWhenDown OBJECT-TYPE + SYNTAX INTEGER { remove(1), inhibit(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "What action is performed when the real servers are down. Its weight + can be set to 0 (inhibit) or it can be removed from the pool." + ::= { virtualServerEntry 56 } + +virtualServerRetry OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Default number of retries of checker before marking failed." + ::= { virtualServerEntry 57 } + +virtualServerDelayBeforeRetry OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "seconds" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Default number of seconds between retrying a checker ofter it has failed." + ::= { virtualServerEntry 58 } + +virtualServerWarmup OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "seconds" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Maximum number of seconds to delay before running checker." + ::= { virtualServerEntry 59 } + +virtualServerWeight OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Default wieght for each real server." + ::= { virtualServerEntry 60 } + +virtualServerSmtpAlert OBJECT-TYPE + SYNTAX INTEGER { enabled(1), disabled(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Will SMTP alert be sent for this virtual server?" + ::= { virtualServerEntry 61 } + +virtualServerMHFallback OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "If set to true(1), MH scheduler fallback." + ::= { virtualServerEntry 62 } + +virtualServerMHPort OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "If set to true(1), MH scheduler use port." + ::= { virtualServerEntry 63 } + + +-- real servers + +realServerTable OBJECT-TYPE + SYNTAX SEQUENCE OF RealServerEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table of real servers. This includes regular real servers and sorry servers." + ::= { check 4 } + +realServerEntry OBJECT-TYPE + SYNTAX RealServerEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Information describing a real server." + INDEX { virtualServerIndex, realServerIndex } + ::= { realServerTable 1 } + +RealServerEntry ::= SEQUENCE { + realServerIndex Integer32, + realServerType INTEGER, + realServerAddrType InetAddressType, + realServerAddress InetAddress, + realServerPort InetPortNumber, + realServerStatus INTEGER, + realServerWeight Integer32, + realServerUpperConnectionLimit Unsigned32, + realServerLowerConnectionLimit Unsigned32, + realServerActionWhenDown INTEGER, + realServerNotifyUp DisplayString, + realServerNotifyDown DisplayString, + realServerFailedChecks Unsigned32, + realServerStatsConns Gauge32, + realServerStatsActiveConns Gauge32, + realServerStatsInactiveConns Gauge32, + realServerStatsPersistentConns Gauge32, + realServerStatsInPkts Counter32, + realServerStatsOutPkts Counter32, + realServerStatsInBytes Counter64, + realServerStatsOutBytes Counter64, + realServerRateCps Gauge32, + realServerRateInPPS Gauge32, + realServerRateOutPPS Gauge32, + realServerRateInBPS Gauge32, + realServerRateOutBPS Gauge32, + realServerStatsConns64 Counter64, + realServerStatsInPkts64 Counter64, + realServerStatsOutPkts64 Counter64, + realServerRateCpsLow Unsigned32, + realServerRateCpsHigh Unsigned32, + realServerRateInPPSLow Unsigned32, + realServerRateInPPSHigh Unsigned32, + realServerRateOutPPSLow Unsigned32, + realServerRateOutPPSHigh Unsigned32, + realServerRateInBPSLow Unsigned32, + realServerRateInBPSHigh Unsigned32, + realServerRateOutBPSLow Unsigned32, + realServerRateOutBPSHigh Unsigned32, + realServerForwardingMethod INTEGER, + realServerVirtualHost DisplayString, + realServerAlpha INTEGER, + realServerRetry Unsigned32, + realServerDelayBeforeRetry Unsigned32, + realServerWarmup Unsigned32, + realServerDelayLoop Unsigned32, + realServerSmtpAlert INTEGER +} + +realServerIndex OBJECT-TYPE + SYNTAX Integer32 (1..2147483647) + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Index of the real server." + ::= { realServerEntry 1 } + +realServerType OBJECT-TYPE + SYNTAX INTEGER { regular(1), sorry(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Type of real server: either a regular real server or a sorry server." + ::= { realServerEntry 2 } + +realServerAddrType OBJECT-TYPE + SYNTAX InetAddressType + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Address family for this real server." + ::= { realServerEntry 3 } + +realServerAddress OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "IP address of this real server." + ::= { realServerEntry 4 } + +realServerPort OBJECT-TYPE + SYNTAX InetPortNumber + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Port of the service." + ::= { realServerEntry 5 } + +realServerStatus OBJECT-TYPE + SYNTAX INTEGER { alive(1), dead(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Status of this real server." + ::= { realServerEntry 6 } + +realServerWeight OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "Weight of this real server. + + This value can be set to 0 to disable the real server." + ::= { realServerEntry 7 } + +realServerUpperConnectionLimit OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Maximum number of connections for this real server." + ::= { realServerEntry 8 } + +realServerLowerConnectionLimit OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Minimum number of connections for this real server." + ::= { realServerEntry 9 } + +realServerActionWhenDown OBJECT-TYPE + SYNTAX INTEGER { remove(1), inhibit(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "What action is performed when this server is down. Its weight + can be set to 0 (inhibit) or it can be removed from the pool." + ::= { realServerEntry 10 } + +realServerNotifyUp OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Command to execute when this server becomes alive." + ::= { realServerEntry 11 } + +realServerNotifyDown OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Command to execute when this server becomes dead." + ::= { realServerEntry 12 } + +realServerFailedChecks OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "How many failed checks for this real server." + ::= { realServerEntry 13 } + +realServerStatsConns OBJECT-TYPE + SYNTAX Gauge32 + UNITS "connections" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Total number of connections scheduled for this real server." + ::= { realServerEntry 14 } + +realServerStatsActiveConns OBJECT-TYPE + SYNTAX Gauge32 + UNITS "connections" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current active connections for this real server." + ::= { realServerEntry 15 } + +realServerStatsInactiveConns OBJECT-TYPE + SYNTAX Gauge32 + UNITS "connections" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current inactive connections for this real server." + ::= { realServerEntry 16 } + +realServerStatsPersistentConns OBJECT-TYPE + SYNTAX Gauge32 + UNITS "connections" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current persistent connections for this real server." + ::= { realServerEntry 17 } + +realServerStatsInPkts OBJECT-TYPE + SYNTAX Counter32 + UNITS "packets" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Total number of incoming packets for this real server." + ::= { realServerEntry 18 } + +realServerStatsOutPkts OBJECT-TYPE + SYNTAX Counter32 + UNITS "packets" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Total number of outgoing packets for this real server." + ::= { realServerEntry 19 } + +realServerStatsInBytes OBJECT-TYPE + SYNTAX Counter64 + UNITS "bytes" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Total number of incoming bytes for this real server." + ::= { realServerEntry 20 } + +realServerStatsOutBytes OBJECT-TYPE + SYNTAX Counter64 + UNITS "bytes" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Total number of outgoing bytes for this real server." + ::= { realServerEntry 21 } + +realServerRateCps OBJECT-TYPE + SYNTAX Gauge32 + UNITS "connections/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current connection rate for this real server." + ::= { realServerEntry 22 } + +realServerRateInPPS OBJECT-TYPE + SYNTAX Gauge32 + UNITS "packets/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current in packet rate for this real server." + ::= { realServerEntry 23 } + +realServerRateOutPPS OBJECT-TYPE + SYNTAX Gauge32 + UNITS "packets/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current out packet rate for this real server." + ::= { realServerEntry 24 } + +realServerRateInBPS OBJECT-TYPE + SYNTAX Gauge32 + UNITS "bytes/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current incoming rate for this real server." + ::= { realServerEntry 25 } + +realServerRateOutBPS OBJECT-TYPE + SYNTAX Gauge32 + UNITS "bytes/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current outgoing rate for this real server." + ::= { realServerEntry 26 } + +realServerStatsConns64 OBJECT-TYPE + SYNTAX Counter64 + UNITS "connections" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Total number of connections scheduled for this real server." + ::= { realServerEntry 27 } + +realServerStatsInPkts64 OBJECT-TYPE + SYNTAX Counter64 + UNITS "packets" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Total number of incoming packets for this real server." + ::= { realServerEntry 28 } + +realServerStatsOutPkts64 OBJECT-TYPE + SYNTAX Counter64 + UNITS "packets" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Total number of outgoing packets for this real server." + ::= { realServerEntry 29 } + +realServerRateCpsLow OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "connections/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current connection rate for this real server. + Together with realServerRateCpsHigh composes 64-bit number." + ::= { realServerEntry 30 } + +realServerRateCpsHigh OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "connections/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current connection rate for this real server. + Together with realServerRateCpsLow composes 64-bit number." + ::= { realServerEntry 31 } + +realServerRateInPPSLow OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "packets/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current in packet rate for this real server. + Together with realServerRateInPPSHigh composes 64-bit number." + ::= { realServerEntry 32 } + +realServerRateInPPSHigh OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "packets/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current in packet rate for this real server. + Together with realServerRateInPPSLow composes 64-bit number." + ::= { realServerEntry 33 } + +realServerRateOutPPSLow OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "packets/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current out packet rate for this real server. + Together with realServerRateOutPPSHigh composes 64-bit number." + ::= { realServerEntry 34 } + +realServerRateOutPPSHigh OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "packets/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current out packet rate for this real server. + Together with realServerRateOutPPSLow composes 64-bit number." + ::= { realServerEntry 35 } + +realServerRateInBPSLow OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "bytes/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current incoming rate for this real server. + Together with realServerInBPSHigh composes 64-bit number." + ::= { realServerEntry 36 } + +realServerRateInBPSHigh OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "bytes/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current incoming rate for this real server. + Together with realServerRateInBPSLow composes 64-bit number." + ::= { realServerEntry 37 } + +realServerRateOutBPSLow OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "bytes/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current outgoing rate for this real server. + Together with realServerRateOutBPSHigh composes 64-bit number." + ::= { realServerEntry 38 } + +realServerRateOutBPSHigh OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "bytes/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current outgoing rate for this real server. + Together with realServerRateOutBPSLow composes 64-bit number." + ::= { realServerEntry 39 } + +realServerForwardingMethod OBJECT-TYPE + SYNTAX INTEGER { nat(1), dr(2), tun(3) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Forwarding method to use for this real server." + ::= { realServerEntry 40 } + +realServerVirtualHost OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Virtualhost of this real server for HTTP like requests." + ::= { realServerEntry 41 } + +realServerAlpha OBJECT-TYPE + SYNTAX INTEGER { enabled(1), disabled(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Is alpha mode enabled?" + ::= { realServerEntry 42 } + +realServerRetry OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Default number of retries of checker before marking failed." + ::= { realServerEntry 43 } + +realServerDelayBeforeRetry OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "seconds" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Default number of seconds between retrying a checker ofter it has failed." + ::= { realServerEntry 44 } + +realServerWarmup OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "seconds" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Maximum number of seconds to delay before running checker." + ::= { realServerEntry 45 } + +realServerDelayLoop OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "seconds" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Delay in seconds between two checks." + ::= { realServerEntry 46 } + +realServerSmtpAlert OBJECT-TYPE + SYNTAX INTEGER { enabled(1), disabled(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Will SMTP alert be sent for this real server?" + ::= {realServerEntry 47 } + +lvsSyncDaemon OBJECT IDENTIFIER ::= { check 6 } + +lvsSyncDaemonEnabled OBJECT-TYPE + SYNTAX INTEGER { enabled(1), disabled(2) } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Is LVS sync daemon enabled?" + ::= { lvsSyncDaemon 1 } + +lvsSyncDaemonInterface OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "If LVS sync daemon is enabled, which interface to use for syncing?" + ::= { lvsSyncDaemon 2 } + +lvsSyncDaemonVrrpInstance OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "If LVS sync daemon is enabled, which VRRP instance is it tracking?" + ::= { lvsSyncDaemon 3 } + +lvsSyncDaemonSyncId OBJECT-TYPE + SYNTAX Integer32 (0..255) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "LVS sync daemon id?" + ::= { lvsSyncDaemon 4 } + +lvsSyncDaemonMaxLen OBJECT-TYPE + SYNTAX Integer32 (0..65517) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "LVS sync daemon payload maximum length, 0 means default setting. + Only available on Linux >= 4.3." + ::= { lvsSyncDaemon 5 } + +lvsSyncDaemonPort OBJECT-TYPE + SYNTAX Integer32 (0..65535) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "LVS sync daemon UDP port, 0 means default setting. + Only available on Linux >= 4.3." + ::= { lvsSyncDaemon 6 } + +lvsSyncDaemonTTL OBJECT-TYPE + SYNTAX Integer32 (0..255) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "LVS sync daemon packet TTL, 0 means default setting. + Only available on Linux >= 4.3." + ::= { lvsSyncDaemon 7 } + +lvsSyncDaemonMcastGroupAddrType OBJECT-TYPE + SYNTAX InetAddressType + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "LVS sync daemon multicast group address type. + Only available on Linux >= 4.3." + ::= { lvsSyncDaemon 8 } + +lvsSyncDaemonMcastGroupAddrValue OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "LVS sync daemon multicast group IP address. + Only available on Linux >= 4.3." + ::= { lvsSyncDaemon 9 } + +lvsTimeouts OBJECT IDENTIFIER ::= { check 7 } + +lvsTimeoutTcp OBJECT-TYPE + SYNTAX Integer32 (1..2678400) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "LVS TCP timeout" + ::= { lvsTimeouts 1 } + +lvsTimeoutTcpFin OBJECT-TYPE + SYNTAX Integer32 (1..2678400) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "LVS TCP FIN timeout" + ::= { lvsTimeouts 2 } + +lvsTimeoutUdp OBJECT-TYPE + SYNTAX Integer32 (1..2678400) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "LVS UDP timeout" + ::= { lvsTimeouts 3 } + +-- Traps + +checkTrap OBJECT IDENTIFIER ::= { check 5 } +checkTraps OBJECT IDENTIFIER ::= { checkTrap 0 } -- Reverse-mappable +checkTrapControl OBJECT IDENTIFIER ::= { checkTrap 1 } + +realServerStateChange NOTIFICATION-TYPE + OBJECTS { + realServerAddrType, + realServerAddress, + realServerPort, + realServerStatus, + virtualServerType, + virtualServerProtocol, + virtualServerRealServersUp, + virtualServerRealServersTotal, + routerId + } + STATUS current + DESCRIPTION + "This trap signifies that the state of a real server has + changed. Additional varbinds will be added depending on the + value of virtualServerType: virtualServerNameOfGroup, + virtualServerFwMark, virtualServerAddrType, + virtualServerAddress, virtualServerPort." + ::= { checkTraps 1 } + +virtualServerQuorumStateChange NOTIFICATION-TYPE + OBJECTS { + virtualServerType, + virtualServerProtocol, + virtualServerQuorumStatus, + virtualServerQuorum, + virtualServerRealServersUp, + virtualServerRealServersTotal, + routerId + } + STATUS current + DESCRIPTION + "This trap signifies that the quorum of a virtual server has + changed. Additional varbinds will be added depending on the + value of virtualServerType: virtualServerNameOfGroup, + virtualServerFwMark, virtualServerAddrType, + virtualServerAddress, virtualServerPort." + ::= { checkTraps 2 } + +-- ---------------------------------------------------------------------- +-- Conformance +-- ---------------------------------------------------------------------- + +compliances OBJECT IDENTIFIER ::= { conformance 1 } +groups OBJECT IDENTIFIER ::= { conformance 2 } + +globalCompliances MODULE-COMPLIANCE + STATUS current + DESCRIPTION + "Compliance statement for global data" + MODULE -- this module + MANDATORY-GROUPS { + globalGroup + } + ::= { compliances 1 } + +vrrpCompliances MODULE-COMPLIANCE + STATUS current + DESCRIPTION + "The VRRP compliance statement" + MODULE -- this module + MANDATORY-GROUPS { + vrrpScriptGroup, + vrrpSyncGroup, + vrrpInstanceGroup, + vrrpTrapsGroup, + vrrpFileGroup + } + ::= { compliances 2 } + +checkCompliances MODULE-COMPLIANCE + STATUS current + DESCRIPTION + "The check compliance statement" + MODULE -- this module + MANDATORY-GROUPS { + virtualServerGroupGroup, + virtualServerGroup, + realServerGroup, + checkTrapsGroup, + lvsSyncDaemonGroup, + lvsTimeoutsGroup + } + ::= { compliances 3 } + +vrrpLvsSyncGroupCompliances MODULE-COMPLIANCE + STATUS deprecated + DESCRIPTION + "The compliance statement for LVS sync group associated + with a VRRP instance. This is deprecated in favour of + lvsSyncDaemonGroup." + MODULE -- this module + MANDATORY-GROUPS { + vrrpLvsSyncGroup + } + ::= { compliances 4 } + +globalGroup OBJECT-GROUP + OBJECTS { + version, + routerId, + smtpServerAddressType, + smtpServerAddress, + smtpServerTimeout, + emailFrom, + emailAddress, + smtpServerPort, + smtpEmailFaults, + smtpEmailSmtpAlert, + smtpEmailSmtpAlertVrrp, + smtpEmailSmtpAlertChecker, + trapEnable, + linkBeat, + lvsFlush, + ipvs64BitStats, + netNamespace, + dbus, + dynamicInterfaces + } + STATUS current + DESCRIPTION + "Conformance group for global data." + ::= { groups 1 } + +vrrpGroups OBJECT IDENTIFIER ::= { groups 2 } + +vrrpSyncGroup OBJECT-GROUP + OBJECTS { + vrrpSyncGroupName, + vrrpSyncGroupState, + vrrpSyncGroupSmtpAlert, + vrrpSyncGroupNotifyExec, + vrrpSyncGroupScriptMaster, + vrrpSyncGroupScriptBackup, + vrrpSyncGroupScriptFault, + vrrpSyncGroupScript, + vrrpSyncGroupTrackingWeight, + vrrpSyncGroupScriptStop, + vrrpSyncGroupMemberName, + vrrpSyncTrackedInterfaceName, + vrrpSyncTrackedInterfaceWeight, + vrrpSyncTrackedScriptName, + vrrpSyncTrackedScriptWeight, + vrrpSyncTrackedFileName, + vrrpSyncTrackedFileWeight + } + STATUS current + DESCRIPTION + "Conformance group for synchronisation groups." + ::= { vrrpGroups 1 } + +vrrpInstanceGroup OBJECT-GROUP + OBJECTS { + vrrpInstanceName, + vrrpInstanceVirtualRouterId, + vrrpInstanceState, + vrrpInstanceInitialState, + vrrpInstanceWantedState, + vrrpInstanceBasePriority, + vrrpInstanceEffectivePriority, + vrrpInstanceVipsStatus, + vrrpInstancePrimaryInterface, + vrrpInstanceTrackPrimaryIf, + vrrpInstanceAdvertisementsInt, + vrrpInstancePreempt, + vrrpInstancePreemptDelay, + vrrpInstanceAuthType, + vrrpInstanceSyncGroup, + vrrpInstanceGarpDelay, + vrrpInstanceSmtpAlert, + vrrpInstanceNotifyExec, + vrrpInstanceScriptMaster, + vrrpInstanceScriptBackup, + vrrpInstanceScriptFault, + vrrpInstanceScriptStop, + vrrpInstanceScript, + vrrpInstanceAccept, + vrrpInstancePromoteSecondaries, + vrrpInstanceUseLinkbeat, + vrrpInstanceVrrpVersion, + vrrpInstanceScriptMstrRxLowerPri, + vrrpTrackedInterfaceName, + vrrpTrackedInterfaceWeight, + vrrpTrackedScriptName, + vrrpTrackedScriptWeight, + vrrpTrackedFileName, + vrrpTrackedFileWeight, + vrrpAddressType, + vrrpAddressValue, + vrrpAddressBroadcast, + vrrpAddressMask, + vrrpAddressScope, + vrrpAddressIfIndex, + vrrpAddressIfName, + vrrpAddressIfAlias, + vrrpAddressStatus, + vrrpAddressAdvertising, + vrrpAddressPeer, + vrrpRouteAddressType, + vrrpRouteDestination, + vrrpRouteDestinationMask, + vrrpRouteGateway, + vrrpRouteSecondaryGateway, + vrrpRouteSource, + vrrpRouteMetric, + vrrpRouteScope, + vrrpRouteType, + vrrpRouteIfIndex, + vrrpRouteIfName, + vrrpRouteRoutingTable, + vrrpRouteStatus, + vrrpRouteFromAddress, + vrrpRouteFromAddressMask, + vrrpRouteTos, + vrrpRouteProtocol, + vrrpRouteECN, + vrrpRouteQuickAck, + vrrpRouteExpires, + vrrpRouteMTU, + vrrpRouteMTULock, + vrrpRouteHopLimit, + vrrpRouteAdvmss, + vrrpRouteAdvmssLock, + vrrpRouteRTT, + vrrpRouteRTTLock, + vrrpRouteRTTvar, + vrrpRouteRTTvarLock, + vrrpRouteReordering, + vrrpRouteReorderingLock, + vrrpRouteWindow, + vrrpRouteCwnd, + vrrpRouteCwndLock, + vrrpRouteSSthresh, + vrrpRouteSSthreshLock, + vrrpRouteRTOMin, + vrrpRouteRTOMinLock, + vrrpRouteInitCwnd, + vrrpRouteInitRwnd, + vrrpRouteCongCtl, + vrrpRoutePref, + vrrpRouteRealmDst, + vrrpRouteRealmSrc, + vrrpRouteEncapType, + vrrpRouteEncapMplsLabels, + vrrpRouteEncapId, + vrrpRouteEncapDstAddress, + vrrpRouteEncapSrcAddress, + vrrpRouteEncapTOS, + vrrpRouteEncapTTL, + vrrpRouteEncapFlags, + vrrpRouteEncapIlaLocator, + vrrpRouteFastOpenNoCookie, + vrrpRouteNextHopAddressType, + vrrpRouteNextHopAddress, + vrrpRouteNextHopIfIndex, + vrrpRouteNextHopIfName, + vrrpRouteNextHopWeight, + vrrpRouteNextHopOnlink, + vrrpRouteNextHopRealmDst, + vrrpRouteNextHopRealmSrc, + vrrpRouteNextHopEncapMplsLabels, + vrrpRouteNextHopEncapId, + vrrpRouteNextHopEncapDstAddress, + vrrpRouteNextHopEncapSrcAddress, + vrrpRouteNextHopEncapTOS, + vrrpRouteNextHopEncapTTL, + vrrpRouteNextHopEncapFlags, + vrrpRouteNextHopEncapIlaLocator, + vrrpRuleRoutingTable, + vrrpRuleStatus, + vrrpRuleInvert, + vrrpRuleDestinationAddressType, + vrrpRuleDestinationAddress, + vrrpRuleDestinationAddressMask, + vrrpRuleSourceAddressType, + vrrpRuleSourceAddress, + vrrpRuleSourceAddressMask, + vrrpRuleTos, + vrrpRuleFwmark, + vrrpRuleFwmask, + vrrpRuleRealmDst, + vrrpRuleRealmSrc, + vrrpRuleInInterface, + vrrpRuleOutInterface, + vrrpRuleTarget, + vrrpRuleAction, + vrrpRuleTableNo, + vrrpRulePreference, + vrrpRuleSuppressPrefixLen, + vrrpRuleSuppressGroup, + vrrpRuleTunnelIdHigh, + vrrpRuleTunnelIdLow, + vrrpRuleUidRangeStart, + vrrpRuleUidRangeEnd, + vrrpRuleL3mdev, + vrrpRuleProtocol, + vrrpRuleIPProto, + vrrpRuleSrcPortStart, + vrrpRuleSrcPortEnd, + vrrpRuleDstPortStart, + vrrpRuleDstPortEnd + } + STATUS current + DESCRIPTION + "Conformance group for VRRP instances." + ::= { vrrpGroups 2 } + +vrrpScriptGroup OBJECT-GROUP + OBJECTS { + vrrpScriptName, + vrrpScriptCommand, + vrrpScriptInterval, + vrrpScriptWeight, + vrrpScriptResult, + vrrpScriptRise, + vrrpScriptFall + } + STATUS current + DESCRIPTION + "Conformance group for VRRP scripts." + ::= { vrrpGroups 3 } + +vrrpTrapsGroup NOTIFICATION-GROUP + NOTIFICATIONS { + vrrpSyncGroupStateChange, + vrrpInstanceStateChange + } + STATUS current + DESCRIPTION + "Conformance group for VRRP traps." + ::= { vrrpGroups 4 } + +vrrpLvsSyncGroup OBJECT-GROUP + OBJECTS { + vrrpInstanceLvsSyncDaemon, + vrrpInstanceLvsSyncInterface + } + STATUS deprecated + DESCRIPTION + "The deprecated LVS sync daemon configuration + objects associated with a VRRP instance." + ::= { vrrpGroups 5 } + +vrrpObsoleteInstanceGroup OBJECT-GROUP + OBJECTS { + vrrpRuleDirection, + vrrpRuleAddressType, + vrrpRuleAddress, + vrrpRuleAddressMask } + STATUS obsolete + DESCRIPTION + "Obsolete group for VRRP instances." + ::= { vrrpGroups 6 } + +vrrpFileGroup OBJECT-GROUP + OBJECTS { + vrrpFileName, + vrrpFilePath, + vrrpFileResult, + vrrpFileWeight + } + STATUS current + DESCRIPTION + "Conformance group for VRRP track files." + ::= { vrrpGroups 7 } + +checkGroups OBJECT IDENTIFIER ::= { groups 3 } + +virtualServerGroupGroup OBJECT-GROUP + OBJECTS { + virtualServerGroupName, + virtualServerGroupMemberType, + virtualServerGroupMemberFwMark, + virtualServerGroupMemberAddrType, + virtualServerGroupMemberAddress, + virtualServerGroupMemberAddr1, + virtualServerGroupMemberAddr2, + virtualServerGroupMemberPort + } + STATUS current + DESCRIPTION + "Conformance group for virtual server groups." + ::= { checkGroups 1 } + +virtualServerGroup OBJECT-GROUP + OBJECTS { + virtualServerType, + virtualServerNameOfGroup, + virtualServerFwMark, + virtualServerAddrType, + virtualServerAddress, + virtualServerPort, + virtualServerProtocol, + virtualServerLoadBalancingAlgo, + virtualServerLoadBalancingKind, + virtualServerStatus, + virtualServerVirtualHost, + virtualServerPersist, + virtualServerPersistTimeout, + virtualServerPersistGranularity, + virtualServerDelayLoop, + virtualServerHaSuspend, + virtualServerAlpha, + virtualServerOmega, + virtualServerRealServersTotal, + virtualServerRealServersUp, + virtualServerQuorum, + virtualServerQuorumStatus, + virtualServerQuorumUp, + virtualServerQuorumDown, + virtualServerHysteresis, + virtualServerStatsConns, + virtualServerStatsInPkts, + virtualServerStatsOutPkts, + virtualServerStatsInBytes, + virtualServerStatsOutBytes, + virtualServerRateCps, + virtualServerRateInPPS, + virtualServerRateOutPPS, + virtualServerRateInBPS, + virtualServerRateOutBPS, + virtualServerOPS, + virtualServerStatsConns64, + virtualServerStatsInPkts64, + virtualServerStatsOutPkts64, + virtualServerRateCpsLow, + virtualServerRateCpsHigh, + virtualServerRateInPPSLow, + virtualServerRateInPPSHigh, + virtualServerRateOutPPSLow, + virtualServerRateOutPPSHigh, + virtualServerRateInBPSLow, + virtualServerRateInBPSHigh, + virtualServerRateOutBPSLow, + virtualServerRateOutBPSHigh, + virtualServerPersistGranularity6, + virtualServerHashed, + virtualServerSHFallback, + virtualServerSHPort, + virtualServerSched3, + virtualServerActionWhenDown, + virtualServerRetry, + virtualServerDelayBeforeRetry, + virtualServerWarmup, + virtualServerWeight, + virtualServerSmtpAlert, + virtualServerMHFallback, + virtualServerMHPort + } + STATUS current + DESCRIPTION + "Conformance group for virtual servers." + ::= { checkGroups 2 } + +realServerGroup OBJECT-GROUP + OBJECTS { + realServerType, + realServerAddrType, + realServerAddress, + realServerPort, + realServerStatus, + realServerWeight, + realServerUpperConnectionLimit, + realServerLowerConnectionLimit, + realServerActionWhenDown, + realServerNotifyUp, + realServerNotifyDown, + realServerFailedChecks, + realServerStatsConns, + realServerStatsActiveConns, + realServerStatsInactiveConns, + realServerStatsPersistentConns, + realServerStatsInPkts, + realServerStatsOutPkts, + realServerStatsInBytes, + realServerStatsOutBytes, + realServerRateCps, + realServerRateInPPS, + realServerRateOutPPS, + realServerRateInBPS, + realServerRateOutBPS, + realServerStatsConns64, + realServerStatsInPkts64, + realServerStatsOutPkts64, + realServerRateCpsLow, + realServerRateCpsHigh, + realServerRateInPPSLow, + realServerRateInPPSHigh, + realServerRateOutPPSLow, + realServerRateOutPPSHigh, + realServerRateInBPSLow, + realServerRateInBPSHigh, + realServerRateOutBPSLow, + realServerRateOutBPSHigh, + realServerForwardingMethod, + realServerVirtualHost, + realServerAlpha, + realServerRetry, + realServerDelayBeforeRetry, + realServerWarmup, + realServerDelayLoop, + realServerSmtpAlert + } + STATUS current + DESCRIPTION + "Conformance group for real servers." + ::= { checkGroups 3 } + +checkTrapsGroup NOTIFICATION-GROUP + NOTIFICATIONS { + realServerStateChange, + virtualServerQuorumStateChange + } + STATUS current + DESCRIPTION + "Conformance group for check traps." + ::= { checkGroups 4 } + +lvsSyncDaemonGroup OBJECT-GROUP + OBJECTS { + lvsSyncDaemonEnabled, + lvsSyncDaemonInterface, + lvsSyncDaemonVrrpInstance, + lvsSyncDaemonSyncId, + lvsSyncDaemonMaxLen, + lvsSyncDaemonPort, + lvsSyncDaemonTTL, + lvsSyncDaemonMcastGroupAddrType, + lvsSyncDaemonMcastGroupAddrValue + } + STATUS current + DESCRIPTION + "Conformance group for LVS sync daemon." + ::= { checkGroups 5 } + +lvsTimeoutsGroup OBJECT-GROUP + OBJECTS { + lvsTimeoutTcp, + lvsTimeoutTcpFin, + lvsTimeoutUdp + } + STATUS current + DESCRIPTION + "Conformance group for LVS timeouts." + ::= { checkGroups 6 } + +END diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..7a88837 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,220 @@ +# Makefile.am +# +# Keepalived OpenSource project. + +SUBDIRS = man/man8 + +if BUILD_GENHASH +dist_man1_MANS = man/man1/genhash.1 +endif +dist_man5_MANS = man/man5/keepalived.conf.5 + +EXTRA_DIST = source samples keepalived.conf.SYNOPSIS NOTE_vrrp_vmac.txt KEEPALIVED-MIB.txt VRRP-MIB.txt VRRPv3-MIB.txt + +sampledir = $(sysconfdir)/@PACKAGE@/samples +sample_DATA = $(srcdir)/samples/* + +mibsdir = $(datarootdir)/snmp/mibs +mibs_DATA = +if SNMP_KEEPALIVED +mibs_DATA += KEEPALIVED-MIB.txt +endif +if SNMP_RFCV2 +mibs_DATA += VRRP-MIB.txt +endif +if SNMP_RFCV3 +mibs_DATA += VRRPv3-MIB.txt +endif + +dist-hook: + rm -rf `find $(distdir)/doc -type d -name ".git*"` + +if !BUILD_DOCS + +.PHONY: all help + +all: + @true + +help: + @echo "To build the documentation, make sure you have Sphinx installed, then" + @echo "run configure with the SPHINXBUILD environment variable pointing to" + @echo "the path of the 'sphinx-build' executable. Alternatively you can add" + @echo "the directory with the executable to your PATH. If you don't have" + @echo "Sphinx installed, either try installing package python-sphinx or" + @echo "equivalent, or grab it from http://sphinx-doc.org/." +endif + +if BUILD_DOCS + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = @SPHINXBUILDNAME@ +PAPER = a4 +BUILDDIR = build + + +# Internal variables. +PAPEROPT = -D latex_paper_size=$(PAPER) +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT) $(SPHINXOPTS) source +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT) $(SPHINXOPTS) source + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +default: man + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + rm -rf $(BUILDDIR) + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Keepalived.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Keepalived.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/Keepalived" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Keepalived" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +xml: + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml + @echo + @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + +pseudoxml: + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml + @echo + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." +endif diff --git a/doc/Makefile.in b/doc/Makefile.in new file mode 100644 index 0000000..caaaad4 --- /dev/null +++ b/doc/Makefile.in @@ -0,0 +1,972 @@ +# Makefile.in generated by automake 1.15 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Makefile.am +# +# Keepalived OpenSource project. + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +@SNMP_KEEPALIVED_TRUE@am__append_1 = KEEPALIVED-MIB.txt +@SNMP_RFCV2_TRUE@am__append_2 = VRRP-MIB.txt +@SNMP_RFCV3_TRUE@am__append_3 = VRRPv3-MIB.txt +subdir = doc +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/lib/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +man1dir = $(mandir)/man1 +am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" \ + "$(DESTDIR)$(mibsdir)" "$(DESTDIR)$(sampledir)" +man5dir = $(mandir)/man5 +NROFF = nroff +MANS = $(dist_man1_MANS) $(dist_man5_MANS) +DATA = $(mibs_DATA) $(sample_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(dist_man1_MANS) $(dist_man5_MANS) \ + $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFAULT_CONFIG_FILE = @DEFAULT_CONFIG_FILE@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GENHASH_LIBS = @GENHASH_LIBS@ +GREP = @GREP@ +HAVE_RPM = @HAVE_RPM@ +HAVE_RPMBUILD = @HAVE_RPMBUILD@ +HAVE_SPHINX_BUILD = @HAVE_SPHINX_BUILD@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KA_CFLAGS = @KA_CFLAGS@ +KA_CPPFLAGS = @KA_CPPFLAGS@ +KA_LDFLAGS = @KA_LDFLAGS@ +KA_LIBS = @KA_LIBS@ +LDD = @LDD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINTAINERCLEANFILES = @MAINTAINERCLEANFILES@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NETSNMP_CONFIG = @NETSNMP_CONFIG@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PID_DIR = @PID_DIR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPHINXBUILDNAME = @SPHINXBUILDNAME@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +systemdsystemunitdir = @systemdsystemunitdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = man/man8 +@BUILD_GENHASH_TRUE@dist_man1_MANS = man/man1/genhash.1 +dist_man5_MANS = man/man5/keepalived.conf.5 +EXTRA_DIST = source samples keepalived.conf.SYNOPSIS NOTE_vrrp_vmac.txt KEEPALIVED-MIB.txt VRRP-MIB.txt VRRPv3-MIB.txt +sampledir = $(sysconfdir)/@PACKAGE@/samples +sample_DATA = $(srcdir)/samples/* +mibsdir = $(datarootdir)/snmp/mibs +mibs_DATA = $(am__append_1) $(am__append_2) $(am__append_3) + +# You can set these variables from the command line. +@BUILD_DOCS_TRUE@SPHINXOPTS = +@BUILD_DOCS_TRUE@SPHINXBUILD = @SPHINXBUILDNAME@ +@BUILD_DOCS_TRUE@PAPER = a4 +@BUILD_DOCS_TRUE@BUILDDIR = build + +# Internal variables. +@BUILD_DOCS_TRUE@PAPEROPT = -D latex_paper_size=$(PAPER) +@BUILD_DOCS_TRUE@ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT) $(SPHINXOPTS) source +# the i18n builder cannot share the environment and doctrees with the others +@BUILD_DOCS_TRUE@I18NSPHINXOPTS = $(PAPEROPT) $(SPHINXOPTS) source +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign doc/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-man1: $(dist_man1_MANS) + @$(NORMAL_INSTALL) + @list1='$(dist_man1_MANS)'; \ + list2=''; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) +install-man5: $(dist_man5_MANS) + @$(NORMAL_INSTALL) + @list1='$(dist_man5_MANS)'; \ + list2=''; \ + test -n "$(man5dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.5[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \ + done; } + +uninstall-man5: + @$(NORMAL_UNINSTALL) + @list='$(dist_man5_MANS)'; test -n "$(man5dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir) +install-mibsDATA: $(mibs_DATA) + @$(NORMAL_INSTALL) + @list='$(mibs_DATA)'; test -n "$(mibsdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(mibsdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(mibsdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(mibsdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(mibsdir)" || exit $$?; \ + done + +uninstall-mibsDATA: + @$(NORMAL_UNINSTALL) + @list='$(mibs_DATA)'; test -n "$(mibsdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(mibsdir)'; $(am__uninstall_files_from_dir) +install-sampleDATA: $(sample_DATA) + @$(NORMAL_INSTALL) + @list='$(sample_DATA)'; test -n "$(sampledir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sampledir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sampledir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sampledir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(sampledir)" || exit $$?; \ + done + +uninstall-sampleDATA: + @$(NORMAL_UNINSTALL) + @list='$(sample_DATA)'; test -n "$(sampledir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(sampledir)'; $(am__uninstall_files_from_dir) + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook +check-am: all-am +check: check-recursive +all-am: Makefile $(MANS) $(DATA) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(mibsdir)" "$(DESTDIR)$(sampledir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +@BUILD_DOCS_FALSE@clean: clean-recursive + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +@BUILD_DOCS_FALSE@html: html-recursive + +html-am: + +@BUILD_DOCS_FALSE@info: info-recursive + +info-am: + +install-data-am: install-man install-mibsDATA install-sampleDATA + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: install-man1 install-man5 + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-man uninstall-mibsDATA uninstall-sampleDATA + +uninstall-man: uninstall-man1 uninstall-man5 + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic cscopelist-am ctags ctags-am \ + dist-hook distclean distclean-generic distclean-tags distdir \ + dvi dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-man1 \ + install-man5 install-mibsDATA install-pdf install-pdf-am \ + install-ps install-ps-am install-sampleDATA install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-man uninstall-man1 uninstall-man5 \ + uninstall-mibsDATA uninstall-sampleDATA + +.PRECIOUS: Makefile + + +dist-hook: + rm -rf `find $(distdir)/doc -type d -name ".git*"` + +@BUILD_DOCS_FALSE@.PHONY: all help + +@BUILD_DOCS_FALSE@all: +@BUILD_DOCS_FALSE@ @true + +@BUILD_DOCS_FALSE@help: +@BUILD_DOCS_FALSE@ @echo "To build the documentation, make sure you have Sphinx installed, then" +@BUILD_DOCS_FALSE@ @echo "run configure with the SPHINXBUILD environment variable pointing to" +@BUILD_DOCS_FALSE@ @echo "the path of the 'sphinx-build' executable. Alternatively you can add" +@BUILD_DOCS_FALSE@ @echo "the directory with the executable to your PATH. If you don't have" +@BUILD_DOCS_FALSE@ @echo "Sphinx installed, either try installing package python-sphinx or" +@BUILD_DOCS_FALSE@ @echo "equivalent, or grab it from http://sphinx-doc.org/." + +@BUILD_DOCS_TRUE@.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +@BUILD_DOCS_TRUE@default: man + +@BUILD_DOCS_TRUE@help: +@BUILD_DOCS_TRUE@ @echo "Please use \`make ' where is one of" +@BUILD_DOCS_TRUE@ @echo " html to make standalone HTML files" +@BUILD_DOCS_TRUE@ @echo " singlehtml to make a single large HTML file" +@BUILD_DOCS_TRUE@ @echo " pickle to make pickle files" +@BUILD_DOCS_TRUE@ @echo " json to make JSON files" +@BUILD_DOCS_TRUE@ @echo " htmlhelp to make HTML files and a HTML help project" +@BUILD_DOCS_TRUE@ @echo " qthelp to make HTML files and a qthelp project" +@BUILD_DOCS_TRUE@ @echo " devhelp to make HTML files and a Devhelp project" +@BUILD_DOCS_TRUE@ @echo " epub to make an epub" +@BUILD_DOCS_TRUE@ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" +@BUILD_DOCS_TRUE@ @echo " latexpdf to make LaTeX files and run them through pdflatex" +@BUILD_DOCS_TRUE@ @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" +@BUILD_DOCS_TRUE@ @echo " text to make text files" +@BUILD_DOCS_TRUE@ @echo " man to make manual pages" +@BUILD_DOCS_TRUE@ @echo " texinfo to make Texinfo files" +@BUILD_DOCS_TRUE@ @echo " info to make Texinfo files and run them through makeinfo" +@BUILD_DOCS_TRUE@ @echo " gettext to make PO message catalogs" +@BUILD_DOCS_TRUE@ @echo " changes to make an overview of all changed/added/deprecated items" +@BUILD_DOCS_TRUE@ @echo " xml to make Docutils-native XML files" +@BUILD_DOCS_TRUE@ @echo " pseudoxml to make pseudoxml-XML files for display purposes" +@BUILD_DOCS_TRUE@ @echo " linkcheck to check all external links for integrity" +@BUILD_DOCS_TRUE@ @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +@BUILD_DOCS_TRUE@clean: +@BUILD_DOCS_TRUE@ rm -rf $(BUILDDIR) + +@BUILD_DOCS_TRUE@html: +@BUILD_DOCS_TRUE@ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html +@BUILD_DOCS_TRUE@ @echo +@BUILD_DOCS_TRUE@ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +@BUILD_DOCS_TRUE@dirhtml: +@BUILD_DOCS_TRUE@ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml +@BUILD_DOCS_TRUE@ @echo +@BUILD_DOCS_TRUE@ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +@BUILD_DOCS_TRUE@singlehtml: +@BUILD_DOCS_TRUE@ $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml +@BUILD_DOCS_TRUE@ @echo +@BUILD_DOCS_TRUE@ @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +@BUILD_DOCS_TRUE@pickle: +@BUILD_DOCS_TRUE@ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle +@BUILD_DOCS_TRUE@ @echo +@BUILD_DOCS_TRUE@ @echo "Build finished; now you can process the pickle files." + +@BUILD_DOCS_TRUE@json: +@BUILD_DOCS_TRUE@ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json +@BUILD_DOCS_TRUE@ @echo +@BUILD_DOCS_TRUE@ @echo "Build finished; now you can process the JSON files." + +@BUILD_DOCS_TRUE@htmlhelp: +@BUILD_DOCS_TRUE@ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp +@BUILD_DOCS_TRUE@ @echo +@BUILD_DOCS_TRUE@ @echo "Build finished; now you can run HTML Help Workshop with the" \ +@BUILD_DOCS_TRUE@ ".hhp project file in $(BUILDDIR)/htmlhelp." + +@BUILD_DOCS_TRUE@qthelp: +@BUILD_DOCS_TRUE@ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp +@BUILD_DOCS_TRUE@ @echo +@BUILD_DOCS_TRUE@ @echo "Build finished; now you can run "qcollectiongenerator" with the" \ +@BUILD_DOCS_TRUE@ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" +@BUILD_DOCS_TRUE@ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Keepalived.qhcp" +@BUILD_DOCS_TRUE@ @echo "To view the help file:" +@BUILD_DOCS_TRUE@ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Keepalived.qhc" + +@BUILD_DOCS_TRUE@devhelp: +@BUILD_DOCS_TRUE@ $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp +@BUILD_DOCS_TRUE@ @echo +@BUILD_DOCS_TRUE@ @echo "Build finished." +@BUILD_DOCS_TRUE@ @echo "To view the help file:" +@BUILD_DOCS_TRUE@ @echo "# mkdir -p $$HOME/.local/share/devhelp/Keepalived" +@BUILD_DOCS_TRUE@ @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Keepalived" +@BUILD_DOCS_TRUE@ @echo "# devhelp" + +@BUILD_DOCS_TRUE@epub: +@BUILD_DOCS_TRUE@ $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub +@BUILD_DOCS_TRUE@ @echo +@BUILD_DOCS_TRUE@ @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +@BUILD_DOCS_TRUE@latex: +@BUILD_DOCS_TRUE@ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex +@BUILD_DOCS_TRUE@ @echo +@BUILD_DOCS_TRUE@ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." +@BUILD_DOCS_TRUE@ @echo "Run \`make' in that directory to run these through (pdf)latex" \ +@BUILD_DOCS_TRUE@ "(use \`make latexpdf' here to do that automatically)." + +@BUILD_DOCS_TRUE@latexpdf: +@BUILD_DOCS_TRUE@ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex +@BUILD_DOCS_TRUE@ @echo "Running LaTeX files through pdflatex..." +@BUILD_DOCS_TRUE@ $(MAKE) -C $(BUILDDIR)/latex all-pdf +@BUILD_DOCS_TRUE@ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +@BUILD_DOCS_TRUE@latexpdfja: +@BUILD_DOCS_TRUE@ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex +@BUILD_DOCS_TRUE@ @echo "Running LaTeX files through platex and dvipdfmx..." +@BUILD_DOCS_TRUE@ $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja +@BUILD_DOCS_TRUE@ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +@BUILD_DOCS_TRUE@text: +@BUILD_DOCS_TRUE@ $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text +@BUILD_DOCS_TRUE@ @echo +@BUILD_DOCS_TRUE@ @echo "Build finished. The text files are in $(BUILDDIR)/text." + +@BUILD_DOCS_TRUE@man: +@BUILD_DOCS_TRUE@ $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man +@BUILD_DOCS_TRUE@ @echo +@BUILD_DOCS_TRUE@ @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +@BUILD_DOCS_TRUE@texinfo: +@BUILD_DOCS_TRUE@ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo +@BUILD_DOCS_TRUE@ @echo +@BUILD_DOCS_TRUE@ @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." +@BUILD_DOCS_TRUE@ @echo "Run \`make' in that directory to run these through makeinfo" \ +@BUILD_DOCS_TRUE@ "(use \`make info' here to do that automatically)." + +@BUILD_DOCS_TRUE@info: +@BUILD_DOCS_TRUE@ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo +@BUILD_DOCS_TRUE@ @echo "Running Texinfo files through makeinfo..." +@BUILD_DOCS_TRUE@ make -C $(BUILDDIR)/texinfo info +@BUILD_DOCS_TRUE@ @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +@BUILD_DOCS_TRUE@gettext: +@BUILD_DOCS_TRUE@ $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale +@BUILD_DOCS_TRUE@ @echo +@BUILD_DOCS_TRUE@ @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +@BUILD_DOCS_TRUE@changes: +@BUILD_DOCS_TRUE@ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes +@BUILD_DOCS_TRUE@ @echo +@BUILD_DOCS_TRUE@ @echo "The overview file is in $(BUILDDIR)/changes." + +@BUILD_DOCS_TRUE@linkcheck: +@BUILD_DOCS_TRUE@ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck +@BUILD_DOCS_TRUE@ @echo +@BUILD_DOCS_TRUE@ @echo "Link check complete; look for any errors in the above output " \ +@BUILD_DOCS_TRUE@ "or in $(BUILDDIR)/linkcheck/output.txt." + +@BUILD_DOCS_TRUE@doctest: +@BUILD_DOCS_TRUE@ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest +@BUILD_DOCS_TRUE@ @echo "Testing of doctests in the sources finished, look at the " \ +@BUILD_DOCS_TRUE@ "results in $(BUILDDIR)/doctest/output.txt." + +@BUILD_DOCS_TRUE@xml: +@BUILD_DOCS_TRUE@ $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml +@BUILD_DOCS_TRUE@ @echo +@BUILD_DOCS_TRUE@ @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + +@BUILD_DOCS_TRUE@pseudoxml: +@BUILD_DOCS_TRUE@ $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml +@BUILD_DOCS_TRUE@ @echo +@BUILD_DOCS_TRUE@ @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/doc/NOTE_vrrp_vmac.txt b/doc/NOTE_vrrp_vmac.txt new file mode 100644 index 0000000..9c36f1d --- /dev/null +++ b/doc/NOTE_vrrp_vmac.txt @@ -0,0 +1,87 @@ + + Note on using VRRP with Virtual MAC address + ============================================= + Alexandre Cassen + July 11th 2012 + + +To reduce takeover impact, some networking environment would require using +VRRP with VMAC address. To reach that goal Keepalived VRRP framework implements +VMAC support by the invocation of 'use_vmac' keyword in configuration file. + +Internally, Keepalived code will bring up virtual interfaces, each interface +dedicated to a specific virtual_router. Keepalived uses Linux kernel macvlan +driver to defines thoses interfaces. It is then mandatory to use kernel +compiled with macvlan support. + +In addition we can mention that VRRP VMAC will work only with kernel including +the following patch : + +http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=729e72a10930ef765c11a5a35031ba47f18221c4 + +By default MACVLAN interface are in VEPA mode which filters out received +packets whose MAC source address matches that of the MACVLAN interface. Setting +MACVLAN interface in private mode will not filter based on source MAC address. + +Alternatively, you can specify 'vmac_xmit_base' which will cause the VRRP +messages to be transmitted and received on the underlying interface whilst ARP +will happen from the the VMAC interface. + +You may also need to tweak your physical interfaces to play around with well +known ARP issues. If you have issues, try the following configurations : + +1) Global configuration + + net.ipv4.conf.all.arp_ignore = 1 + net.ipv4.conf.all.arp_announce = 1 + net.ipv4.conf.all.arp_filter = 0 + +2) Physical interface configuration + +For the physical ethernet interface running VRRP instance use: + +net.ipv4.conf.eth0.arp_filter = 1 + +3) VMAC interface + +consider the following VRRP configuration : + +vrrp_instance instance1 { + state BACKUP + interface eth0 + virtual_router_id 250 + use_vmac + vmac_xmit_base # Transmit VRRP adverts over physical interface + priority 150 + advert_int 1 + virtual_ipaddress { + 10.0.0.254 + } +} + +The 'use_vmac' keyword will drive keepalived code to create a macvlan interface +named 'vrrp.250' (default internal paradigm is vrrp.{virtual_router_id}, you can +override this naming by giving an argument to 'use_vmac' keyword, eg: use_vmac +vrrp250). + +you then need to configure interface with : +net.ipv4.conf.vrrp.250.arp_filter = 0 +net.ipv4.conf.vrrp.250.accept_local = 1 (this is needed for the address owner case) +net.ipv4.conf.vrrp.250.rp_filter = 0 + +you can create notify_master script to automate this configuration step for you : + +vrrp_instance instance1 { + state BACKUP + interface eth0 + virtual_router_id 250 + use_vmac + priority 150 + advert_int 1 + virtual_ipaddress { + 10.0.0.254 + } + notify_master "/usr/local/bin/vmac_tweak.sh vrrp.250" +} + + diff --git a/doc/VRRP-MIB.txt b/doc/VRRP-MIB.txt new file mode 100644 index 0000000..81a2f74 --- /dev/null +++ b/doc/VRRP-MIB.txt @@ -0,0 +1,792 @@ +VRRP-MIB DEFINITIONS ::= BEGIN + + IMPORTS + MODULE-IDENTITY, OBJECT-TYPE, + NOTIFICATION-TYPE, Counter32, + Integer32, IpAddress, mib-2 FROM SNMPv2-SMI + + TEXTUAL-CONVENTION, RowStatus, + MacAddress, TruthValue, TimeStamp FROM SNMPv2-TC + + MODULE-COMPLIANCE, OBJECT-GROUP, + NOTIFICATION-GROUP FROM SNMPv2-CONF + ifIndex FROM IF-MIB; + + + vrrpMIB MODULE-IDENTITY + LAST-UPDATED "200003030000Z" + ORGANIZATION "IETF VRRP Working Group" + CONTACT-INFO + "Brian R. Jewell + Postal: Copper Mountain Networks, Inc. + 2470 Embarcadero Way + Palo Alto, California 94303 + Tel: +1 650 687 3367 + E-Mail: bjewell@coppermountain.com" + + DESCRIPTION + "This MIB describes objects used for managing Virtual Router + Redundancy Protocol (VRRP) routers." + REVISION "200003030000Z" -- 03 Mar 2000 + DESCRIPTION "Initial version as published in RFC 2787." + ::= { mib-2 68 } + +-- ******************************************************************* +-- Textual Conventions +-- ******************************************************************* + + VrId ::= TEXTUAL-CONVENTION + STATUS current + DESCRIPTION + "A number which, along with an interface index (ifIndex), + serves to uniquely identify a virtual router on a given VRRP + router. A set of one or more associated addresses is assigned + to a VRID." + SYNTAX Integer32 (1..255) + +-- ******************************************************************* +-- VRRP MIB Groups +-- ******************************************************************* + + vrrpOperations OBJECT IDENTIFIER ::= { vrrpMIB 1 } + vrrpStatistics OBJECT IDENTIFIER ::= { vrrpMIB 2 } + vrrpConformance OBJECT IDENTIFIER ::= { vrrpMIB 3 } + + +-- ******************************************************************* +-- Start of MIB objects +-- ******************************************************************* + + vrrpNodeVersion OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "This value identifies the particular version of the VRRP + supported by this node." + ::= { vrrpOperations 1 } + + vrrpNotificationCntl OBJECT-TYPE + SYNTAX INTEGER { + enabled (1), + disabled (2) + } + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "Indicates whether the VRRP-enabled router will generate + SNMP traps for events defined in this MIB. 'Enabled' + results in SNMP traps; 'disabled', no traps are sent." + DEFVAL { enabled } + ::= { vrrpOperations 2 } + +-- ******************************************************************* +-- VRRP Operations Table +-- ******************************************************************* + + vrrpOperTable OBJECT-TYPE + SYNTAX SEQUENCE OF VrrpOperEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Operations table for a VRRP router which consists of a + sequence (i.e., one or more conceptual rows) of + 'vrrpOperEntry' items." + ::= { vrrpOperations 3 } + + vrrpOperEntry OBJECT-TYPE + SYNTAX VrrpOperEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "An entry in the vrrpOperTable containing the operational + characteristics of a virtual router. On a VRRP router, + a given virtual router is identified by a combination + of the IF index and VRID. + + Rows in the table cannot be modified unless the value + of `vrrpOperAdminState' is `disabled' and the + `vrrpOperState' has transitioned to `initialize'." + + INDEX { ifIndex, vrrpOperVrId } + ::= { vrrpOperTable 1 } + + VrrpOperEntry ::= + SEQUENCE { + vrrpOperVrId + VrId, + vrrpOperVirtualMacAddr + MacAddress, + vrrpOperState + INTEGER, + vrrpOperAdminState + INTEGER, + vrrpOperPriority + Integer32, + vrrpOperIpAddrCount + Integer32, + vrrpOperMasterIpAddr + IpAddress, + vrrpOperPrimaryIpAddr + IpAddress, + vrrpOperAuthType + INTEGER, + vrrpOperAuthKey + OCTET STRING, + vrrpOperAdvertisementInterval + Integer32, + vrrpOperPreemptMode + TruthValue, + vrrpOperVirtualRouterUpTime + TimeStamp, + vrrpOperProtocol + INTEGER, + vrrpOperRowStatus + RowStatus + } + + vrrpOperVrId OBJECT-TYPE + SYNTAX VrId + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "This object contains the Virtual Router Identifier (VRID)." + ::= { vrrpOperEntry 1 } + + vrrpOperVirtualMacAddr OBJECT-TYPE + SYNTAX MacAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The virtual MAC address of the virtual router. Although this + object can be derived from the 'vrrpOperVrId' object, it is + defined so that it is easily obtainable by a management + application and can be included in VRRP-related SNMP traps." + ::= { vrrpOperEntry 2 } + + vrrpOperState OBJECT-TYPE + SYNTAX INTEGER { + initialize(1), + backup(2), + master(3) + } + MAX-ACCESS read-only + STATUS current + + DESCRIPTION + "The current state of the virtual router. This object has + three defined values: + + - `initialize', which indicates that all the + virtual router is waiting for a startup event. + + - `backup', which indicates the virtual router is + monitoring the availability of the master router. + + - `master', which indicates that the virtual router + is forwarding packets for IP addresses that are + associated with this router. + + Setting the `vrrpOperAdminState' object (below) initiates + transitions in the value of this object." + ::= { vrrpOperEntry 3 } + + vrrpOperAdminState OBJECT-TYPE + SYNTAX INTEGER { + up(1), + down(2) + } + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "This object will enable/disable the virtual router + function. Setting the value to `up', will transition + the state of the virtual router from `initialize' to `backup' + or `master', depending on the value of `vrrpOperPriority'. + Setting the value to `down', will transition the + router from `master' or `backup' to `initialize'. State + transitions may not be immediate; they sometimes depend on + other factors, such as the interface (IF) state. + + The `vrrpOperAdminState' object must be set to `down' prior + to modifying the other read-create objects in the conceptual + row. The value of the `vrrpOperRowStatus' object (below) + must be `active', signifying that the conceptual row + is valid (i.e., the objects are correctly set), + in order for this object to be set to `up'." + DEFVAL { down } + ::= { vrrpOperEntry 4 } + + vrrpOperPriority OBJECT-TYPE + SYNTAX Integer32 (0..255) + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "This object specifies the priority to be used for the + virtual router master election process. Higher values imply + higher priority. + + A priority of '0', although not settable, is sent by + the master router to indicate that this router has ceased + to participate in VRRP and a backup virtual router should + transition to become a new master. + + A priority of 255 is used for the router that owns the + associated IP address(es)." + DEFVAL { 100 } + ::= { vrrpOperEntry 5 } + + vrrpOperIpAddrCount OBJECT-TYPE + SYNTAX Integer32 (0..255) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of IP addresses that are associated with this + virtual router. This number is equal to the number of rows + in the vrrpAssoIpAddrTable that correspond to a given IF + index/VRID pair." + ::= { vrrpOperEntry 6 } + + vrrpOperMasterIpAddr OBJECT-TYPE + SYNTAX IpAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The master router's real (primary) IP address. This is + the IP address listed as the source in VRRP advertisement + last received by this virtual router." + ::= { vrrpOperEntry 7 } + + vrrpOperPrimaryIpAddr OBJECT-TYPE + SYNTAX IpAddress + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "In the case where there is more than one IP address for + a given `ifIndex', this object is used to specify the IP + address that will become the `vrrpOperMasterIpAddr', should + the virtual router transition from backup to master. If + this object is set to 0.0.0.0, the IP address which is + numerically lowest will be selected." + DEFVAL { '00000000'H } -- 0.0.0.0 + ::= { vrrpOperEntry 8 } + + vrrpOperAuthType OBJECT-TYPE + SYNTAX INTEGER { + noAuthentication(1), -- VRRP protocol exchanges are not + -- authenticated. + simpleTextPassword(2), -- Exchanges are authenticated by a + -- clear text password. + ipAuthenticationHeader(3) -- Exchanges are authenticated using + -- the IP authentication header. + } + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "Authentication type used for VRRP protocol exchanges between + virtual routers. This value of this object is the same for a + given ifIndex. + + New enumerations to this list can only be added via a new + RFC on the standards track." + DEFVAL { noAuthentication } + ::= { vrrpOperEntry 9 } + + vrrpOperAuthKey OBJECT-TYPE + SYNTAX OCTET STRING (SIZE (0..16)) + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "The Authentication Key. This object is set according to + the value of the 'vrrpOperAuthType' object + ('simpleTextPassword' or 'ipAuthenticationHeader'). If the + length of the value is less than 16 octets, the agent will + left adjust and zero fill to 16 octets. The value of this + object is the same for a given ifIndex. + + When read, vrrpOperAuthKey always returns an Octet String + of length zero." + ::= { vrrpOperEntry 10 } + + vrrpOperAdvertisementInterval OBJECT-TYPE + SYNTAX Integer32 (1..255) + UNITS "seconds" + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "The time interval, in seconds, between sending + advertisement messages. Only the master router sends + VRRP advertisements." + DEFVAL { 1 } + ::= { vrrpOperEntry 11 } + + vrrpOperPreemptMode OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "Controls whether a higher priority virtual router will + preempt a lower priority master." + DEFVAL { true } + ::= { vrrpOperEntry 12 } + + vrrpOperVirtualRouterUpTime OBJECT-TYPE + SYNTAX TimeStamp + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "This is the value of the `sysUpTime' object when this + virtual router (i.e., the `vrrpOperState') transitioned + out of `initialized'." + ::= { vrrpOperEntry 13 } + + vrrpOperProtocol OBJECT-TYPE + SYNTAX INTEGER { + ip (1), + bridge (2), + decnet (3), + other (4) + } + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "The particular protocol being controlled by this Virtual + Router. + + New enumerations to this list can only be added via a new + RFC on the standards track." + DEFVAL { ip } + ::= { vrrpOperEntry 14 } + + vrrpOperRowStatus OBJECT-TYPE + SYNTAX RowStatus + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "The row status variable, used in accordance to installation + and removal conventions for conceptual rows. The rowstatus of + a currently active row in the vrrpOperTable is constrained + by the operational state of the corresponding virtual router. + When `vrrpOperRowStatus' is set to active(1), no other + objects in the conceptual row, with the exception of + `vrrpOperAdminState', can be modified. Prior to setting the + `vrrpOperRowStatus' object from `active' to a different value, + the `vrrpOperAdminState' object must be set to `down' and the + `vrrpOperState' object be transitioned to `initialize'. + + To create a row in this table, a manager sets this object + to either createAndGo(4) or createAndWait(5). Until instances + of all corresponding columns are appropriately configured, + the value of the corresponding instance of the `vrrpOperRowStatus' + column will be read as notReady(3). + In particular, a newly created row cannot be made active(1) + until (minimally) the corresponding instance of + `vrrpOperVrId' has been set and there is at least one active + row in the `vrrpAssoIpAddrTable' defining an associated + IP address for the virtual router." + ::= { vrrpOperEntry 15 } + + +-- ******************************************************************* +-- VRRP Associated IP Address Table +-- ******************************************************************* + + vrrpAssoIpAddrTable OBJECT-TYPE + SYNTAX SEQUENCE OF VrrpAssoIpAddrEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "The table of addresses associated with this virtual router." + ::= { vrrpOperations 4 } + + vrrpAssoIpAddrEntry OBJECT-TYPE + SYNTAX VrrpAssoIpAddrEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "An entry in the table contains an IP address that is + associated with a virtual router. The number of rows for + a given ifIndex and VrId will equal the number of IP + addresses associated (e.g., backed up) by the virtual + router (equivalent to 'vrrpOperIpAddrCount'). + + Rows in the table cannot be modified unless the value + of `vrrpOperAdminState' is `disabled' and the + `vrrpOperState' has transitioned to `initialize'." + + INDEX { ifIndex, vrrpOperVrId, vrrpAssoIpAddr } + ::= { vrrpAssoIpAddrTable 1 } + + VrrpAssoIpAddrEntry ::= + SEQUENCE { + vrrpAssoIpAddr + IpAddress, + vrrpAssoIpAddrRowStatus + RowStatus + } + + vrrpAssoIpAddr OBJECT-TYPE + SYNTAX IpAddress + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "The assigned IP addresses that a virtual router is + responsible for backing up." + ::= { vrrpAssoIpAddrEntry 1 } + + vrrpAssoIpAddrRowStatus OBJECT-TYPE + SYNTAX RowStatus + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "The row status variable, used according to installation + and removal conventions for conceptual rows. Setting this + object to active(1) or createAndGo(4) results in the + addition of an associated address for a virtual router. + Destroying the entry or setting it to notInService(2) + removes the associated address from the virtual router. + The use of other values is implementation-dependent." + ::= { vrrpAssoIpAddrEntry 2 } + + +-- ******************************************************************* +-- VRRP Router Statistics +-- ******************************************************************* + + vrrpRouterChecksumErrors OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of VRRP packets received with an invalid + VRRP checksum value." + ::= { vrrpStatistics 1 } + + vrrpRouterVersionErrors OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of VRRP packets received with an unknown + or unsupported version number." + ::= { vrrpStatistics 2 } + + vrrpRouterVrIdErrors OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of VRRP packets received with an invalid + VRID for this virtual router." + ::= { vrrpStatistics 3 } + +-- ******************************************************************* +-- VRRP Router Statistics Table +-- ******************************************************************* + + vrrpRouterStatsTable OBJECT-TYPE + SYNTAX SEQUENCE OF VrrpRouterStatsEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table of virtual router statistics." + ::= { vrrpStatistics 4 } + + vrrpRouterStatsEntry OBJECT-TYPE + SYNTAX VrrpRouterStatsEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "An entry in the table, containing statistics information + about a given virtual router." + AUGMENTS { vrrpOperEntry } + ::= { vrrpRouterStatsTable 1 } + + VrrpRouterStatsEntry ::= + SEQUENCE { + vrrpStatsBecomeMaster + Counter32, + vrrpStatsAdvertiseRcvd + Counter32, + vrrpStatsAdvertiseIntervalErrors + Counter32, + vrrpStatsAuthFailures + Counter32, + vrrpStatsIpTtlErrors + Counter32, + vrrpStatsPriorityZeroPktsRcvd + Counter32, + vrrpStatsPriorityZeroPktsSent + Counter32, + vrrpStatsInvalidTypePktsRcvd + Counter32, + vrrpStatsAddressListErrors + Counter32, + vrrpStatsInvalidAuthType + Counter32, + vrrpStatsAuthTypeMismatch + Counter32, + vrrpStatsPacketLengthErrors + Counter32 + } + + vrrpStatsBecomeMaster OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of times that this virtual router's state + has transitioned to MASTER." + ::= { vrrpRouterStatsEntry 1 } + + vrrpStatsAdvertiseRcvd OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of VRRP advertisements received by this + virtual router." + ::= { vrrpRouterStatsEntry 2 } + + vrrpStatsAdvertiseIntervalErrors OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of VRRP advertisement packets received + for which the advertisement interval is different than the + one configured for the local virtual router." + ::= { vrrpRouterStatsEntry 3 } + + vrrpStatsAuthFailures OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of VRRP packets received that do not pass + the authentication check." + ::= { vrrpRouterStatsEntry 4 } + + vrrpStatsIpTtlErrors OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of VRRP packets received by the virtual + router with IP TTL (Time-To-Live) not equal to 255." + ::= { vrrpRouterStatsEntry 5 } + + vrrpStatsPriorityZeroPktsRcvd OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of VRRP packets received by the virtual + router with a priority of '0'." + ::= { vrrpRouterStatsEntry 6 } + + vrrpStatsPriorityZeroPktsSent OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of VRRP packets sent by the virtual router + with a priority of '0'." + ::= { vrrpRouterStatsEntry 7 } + + vrrpStatsInvalidTypePktsRcvd OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of VRRP packets received by the virtual router + with an invalid value in the 'type' field." + ::= { vrrpRouterStatsEntry 8 } + + vrrpStatsAddressListErrors OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of packets received for which the address + list does not match the locally configured list for the + virtual router." + ::= { vrrpRouterStatsEntry 9 } + + vrrpStatsInvalidAuthType OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of packets received with an unknown + authentication type." + ::= { vrrpRouterStatsEntry 10 } + + vrrpStatsAuthTypeMismatch OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of packets received with 'Auth Type' not + equal to the locally configured authentication method + (`vrrpOperAuthType')." + ::= { vrrpRouterStatsEntry 11 } + + vrrpStatsPacketLengthErrors OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of packets received with a packet length + less than the length of the VRRP header." + ::= { vrrpRouterStatsEntry 12 } + +-- ******************************************************************* +-- Trap Definitions +-- ******************************************************************* + + vrrpNotifications OBJECT IDENTIFIER ::= { vrrpMIB 0 } + + vrrpTrapPacketSrc OBJECT-TYPE + SYNTAX IpAddress + MAX-ACCESS accessible-for-notify + STATUS current + DESCRIPTION + "The IP address of an inbound VRRP packet. Used by + vrrpTrapAuthFailure trap." + ::= { vrrpOperations 5 } + + vrrpTrapAuthErrorType OBJECT-TYPE + SYNTAX INTEGER { + invalidAuthType (1), + authTypeMismatch (2), + authFailure (3) + } + MAX-ACCESS accessible-for-notify + STATUS current + DESCRIPTION + "Potential types of configuration conflicts. + Used by vrrpAuthFailure trap." + ::= { vrrpOperations 6 } + + vrrpTrapNewMaster NOTIFICATION-TYPE + OBJECTS { vrrpOperMasterIpAddr + } + STATUS current + DESCRIPTION + "The newMaster trap indicates that the sending agent + has transitioned to 'Master' state." + ::= { vrrpNotifications 1 } + + vrrpTrapAuthFailure NOTIFICATION-TYPE + OBJECTS { vrrpTrapPacketSrc, + vrrpTrapAuthErrorType + } + STATUS current + DESCRIPTION + "A vrrpAuthFailure trap signifies that a packet has + been received from a router whose authentication key + or authentication type conflicts with this router's + authentication key or authentication type. Implementation + of this trap is optional." + ::= { vrrpNotifications 2 } + + +-- ******************************************************************* +-- Conformance Information +-- ******************************************************************* + + vrrpMIBCompliances OBJECT IDENTIFIER ::= { vrrpConformance 1 } + vrrpMIBGroups OBJECT IDENTIFIER ::= { vrrpConformance 2 } + +-- ................................................................... +-- Compliance Statements +-- ................................................................... + + vrrpMIBCompliance MODULE-COMPLIANCE + STATUS current + DESCRIPTION + "The core compliance statement for all VRRP implementations." + MODULE -- this module + MANDATORY-GROUPS { + vrrpOperGroup, + vrrpStatsGroup + } + OBJECT vrrpOperPriority + WRITE-SYNTAX Integer32 (1..255) + DESCRIPTION "SETable values are from 1 to 255." + ::= { vrrpMIBCompliances 1 } + +-- ................................................................... +-- Conformance Groups +-- ................................................................... + + vrrpOperGroup OBJECT-GROUP + OBJECTS { + vrrpNodeVersion, + vrrpNotificationCntl, + vrrpOperVirtualMacAddr, + vrrpOperState, + vrrpOperAdminState, + vrrpOperPriority, + vrrpOperIpAddrCount, + vrrpOperMasterIpAddr, + vrrpOperPrimaryIpAddr, + vrrpOperAuthType, + vrrpOperAuthKey, + vrrpOperAdvertisementInterval, + vrrpOperPreemptMode, + vrrpOperVirtualRouterUpTime, + vrrpOperProtocol, + vrrpOperRowStatus, + vrrpAssoIpAddrRowStatus + } + STATUS current + DESCRIPTION + "Conformance group for VRRP operations." + ::= { vrrpMIBGroups 1 } + + vrrpStatsGroup OBJECT-GROUP + OBJECTS { + vrrpRouterChecksumErrors, + vrrpRouterVersionErrors, + vrrpRouterVrIdErrors, + vrrpStatsBecomeMaster, + vrrpStatsAdvertiseRcvd, + vrrpStatsAdvertiseIntervalErrors, + vrrpStatsAuthFailures, + vrrpStatsIpTtlErrors, + vrrpStatsPriorityZeroPktsRcvd, + vrrpStatsPriorityZeroPktsSent, + vrrpStatsInvalidTypePktsRcvd, + vrrpStatsAddressListErrors, + vrrpStatsInvalidAuthType, + vrrpStatsAuthTypeMismatch, + vrrpStatsPacketLengthErrors + } + STATUS current + DESCRIPTION + "Conformance group for VRRP statistics." + ::= { vrrpMIBGroups 2 } + + vrrpTrapGroup OBJECT-GROUP + OBJECTS { + vrrpTrapPacketSrc, + vrrpTrapAuthErrorType + } + STATUS current + DESCRIPTION + "Conformance group for objects contained in VRRP notifications." + ::= { vrrpMIBGroups 3 } + + vrrpNotificationGroup NOTIFICATION-GROUP + NOTIFICATIONS { + vrrpTrapNewMaster, + vrrpTrapAuthFailure + } + STATUS current + DESCRIPTION + "The VRRP MIB Notification Group." + ::= { vrrpMIBGroups 4 } + +END diff --git a/doc/VRRPv3-MIB.txt b/doc/VRRPv3-MIB.txt new file mode 100644 index 0000000..5b935f8 --- /dev/null +++ b/doc/VRRPv3-MIB.txt @@ -0,0 +1,955 @@ +VRRPV3-MIB DEFINITIONS ::= BEGIN + + IMPORTS + MODULE-IDENTITY, OBJECT-TYPE, + NOTIFICATION-TYPE, Counter32, + Integer32, mib-2, Unsigned32, + Counter64, TimeTicks + FROM SNMPv2-SMI -- RFC2578 + + TEXTUAL-CONVENTION, RowStatus, + MacAddress, TruthValue, TimeStamp, + TimeInterval + FROM SNMPv2-TC -- RFC2579 + + MODULE-COMPLIANCE, OBJECT-GROUP, + NOTIFICATION-GROUP + FROM SNMPv2-CONF -- RFC2580 + + ifIndex + FROM IF-MIB -- RFC2863 + + InetAddressType, InetAddress + FROM INET-ADDRESS-MIB; -- RFC4001 + + vrrpv3MIB MODULE-IDENTITY + LAST-UPDATED "201708140000Z" -- Aug 14, 2017 + ORGANIZATION "IETF VRRP Working Group" + CONTACT-INFO + "WG E-Mail: vrrp@ietf.org + + Editor: Kalyan Tata + Nokia + 313 Fairchild Dr, + Mountain View, CA 94043 + Tata_kalyan@yahoo.com" + + DESCRIPTION + "This MIB describes objects used for managing Virtual + Router Redundancy Protocol version 3 (VRRPv3). + + Copyright (c) 2012 IETF Trust and the persons + identified as authors of the code. All rights + reserved. + + Redistribution and use in source and binary forms, + with or without modification, is permitted pursuant + to, and subject to the license terms contained in, + the Simplified BSD License set forth in Section + 4.c of the IETF Trust's Legal Provisions Relating + to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of the MIB module is part of RFC 6527. + Please see the RFC for full legal notices." + + REVISION "201708140000Z" -- Aug 14, 2017 + DESCRIPTION "Apply RFC 6527 errata id 4168 and 5086." + + REVISION "201202130000Z" -- Feb 13, 2012 + DESCRIPTION "Initial version as published in RFC 6527." + + ::= { mib-2 207 } + +-- Textual Conventions + + Vrrpv3VrIdTC ::= TEXTUAL-CONVENTION + DISPLAY-HINT "d" + STATUS current + DESCRIPTION + "The value of the Virtual Router Identifier noted as + (VRID) in RFC 5798. This, along with interface index + (ifIndex) and IP version, serves to uniquely identify + a virtual router on a given VRRP router." + REFERENCE "RFC 5798 (Sections 3 and 5.2.3)" + SYNTAX Integer32 (1..255) + +-- VRRPv3 MIB Groups + + vrrpv3Notifications OBJECT IDENTIFIER ::= { vrrpv3MIB 0 } + vrrpv3Objects OBJECT IDENTIFIER ::= { vrrpv3MIB 1 } + vrrpv3Conformance OBJECT IDENTIFIER ::= { vrrpv3MIB 2 } + +-- VRRPv3 MIB Objects + + vrrpv3Operations OBJECT IDENTIFIER ::= { vrrpv3Objects 1 } + vrrpv3Statistics OBJECT IDENTIFIER ::= { vrrpv3Objects 2 } + +-- VRRPv3 Operations Table + + vrrpv3OperationsTable OBJECT-TYPE + SYNTAX SEQUENCE OF Vrrpv3OperationsEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Unified Operations table for a VRRP router that + consists of a sequence (i.e., one or more conceptual + rows) of 'vrrpv3OperationsEntry' items each of which + describe the operational characteristics of a virtual + router." + + ::= { vrrpv3Operations 1 } + + vrrpv3OperationsEntry OBJECT-TYPE + SYNTAX Vrrpv3OperationsEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "An entry in the vrrpv3OperationsTable containing the + operational characteristics of a virtual router. + On a VRRP router, a given virtual router is + identified by a combination of ifIndex, VRID, and + the IP version. ifIndex represents an interface of + the router. + + A row must be created with vrrpv3OperationsStatus + set to initialize(1) and cannot transition to + backup(2) or master(3) until + vrrpv3OperationsRowStatus is transitioned to + active(1). + + The information in this table is persistent and when + written the entity SHOULD save the change to non- + volatile storage." + + INDEX { ifIndex, vrrpv3OperationsVrId, + vrrpv3OperationsInetAddrType + } + ::= { vrrpv3OperationsTable 1 } + + Vrrpv3OperationsEntry ::= + + SEQUENCE { + vrrpv3OperationsVrId + Vrrpv3VrIdTC, + vrrpv3OperationsInetAddrType + InetAddressType, + vrrpv3OperationsMasterIpAddr + InetAddress, + vrrpv3OperationsPrimaryIpAddr + InetAddress, + vrrpv3OperationsVirtualMacAddr + MacAddress, + vrrpv3OperationsStatus + INTEGER, + vrrpv3OperationsPriority + Unsigned32, + vrrpv3OperationsAddrCount + Integer32, + vrrpv3OperationsAdvInterval + TimeInterval, + vrrpv3OperationsPreemptMode + TruthValue, + vrrpv3OperationsAcceptMode + TruthValue, + vrrpv3OperationsUpTime + TimeTicks, + vrrpv3OperationsRowStatus + RowStatus + } + vrrpv3OperationsVrId OBJECT-TYPE + SYNTAX Vrrpv3VrIdTC + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "This object contains the Virtual Router Identifier + (VRID)." + REFERENCE "RFC 4001" + ::= { vrrpv3OperationsEntry 1 } + + vrrpv3OperationsInetAddrType OBJECT-TYPE + SYNTAX InetAddressType + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "The IP address type of Vrrpv3OperationsEntry and + Vrrpv3AssociatedIpAddrEntry. This value determines + the type for vrrpv3OperationsMasterIpAddr, + vrrpv3OperationsPrimaryIpAddr, and + vrrpv3AssociatedIpAddrAddress. + + ipv4(1) and ipv6(2) are the only two values supported + in this MIB module." + REFERENCE "RFC 4001" + ::= { vrrpv3OperationsEntry 2 } + + vrrpv3OperationsMasterIpAddr OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The master router's real IP address. The master router + would set this address to vrrpv3OperationsPrimaryIpAddr + while transitioning to master state. For backup + routers, this is the IP address listed as the source in + the VRRP advertisement last received by this virtual + router." + REFERENCE "RFC 5798" + ::= { vrrpv3OperationsEntry 3 } + + vrrpv3OperationsPrimaryIpAddr OBJECT-TYPE + SYNTAX InetAddress + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "In the case where there is more than one IP + Address (associated IP addresses) for a given + 'ifIndex', this object is used to specify the IP + address that will become the + vrrpv3OperationsMasterIpAddr', should the virtual + router transition from backup state to master." + ::= { vrrpv3OperationsEntry 4 } + + vrrpv3OperationsVirtualMacAddr OBJECT-TYPE + SYNTAX MacAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The virtual MAC address of the virtual router. + Although this object can be derived from the + 'vrrpv3OperationsVrId' object, it is defined so that it + is easily obtainable by a management application and + can be included in VRRP-related SNMP notifications." + ::= { vrrpv3OperationsEntry 5 } + + vrrpv3OperationsStatus OBJECT-TYPE + SYNTAX INTEGER { + initialize(1), + backup(2), + master(3) + } + MAX-ACCESS read-only + STATUS current + + DESCRIPTION + "The current state of the virtual router. This object + has three defined values: + + - 'initialize', which indicates that the + virtual router is waiting for a startup event. + + - 'backup', which indicates that the virtual router is + monitoring the availability of the master router. + + - 'master', which indicates that the virtual router + is forwarding packets for IP addresses that are + associated with this router." + REFERENCE "RFC 5798" + ::= { vrrpv3OperationsEntry 6 } + + vrrpv3OperationsPriority OBJECT-TYPE + SYNTAX Unsigned32 (0..255) + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "This object specifies the priority to be used for the + virtual router master election process; higher values + imply higher priority. + + A priority of '0', although not settable, is sent by + the master router to indicate that this router has + ceased to participate in VRRP, and a backup virtual + router should transition to become a new master. + + A priority of 255 is used for the router that owns the + associated IP address(es) for VRRP over IPv4 and hence + is not settable. + + Setting the values of this object to 0 or 255 should be + rejected by the agents implementing this MIB module. + For example, an SNMP agent would return 'badValue(3)' + when a user tries to set the values 0 or 255 for this + object." + + REFERENCE "RFC 5798, Section 6.1" + DEFVAL { 100 } + ::= { vrrpv3OperationsEntry 7 } + + vrrpv3OperationsAddrCount OBJECT-TYPE + SYNTAX Integer32 (0..255) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of IP addresses that are associated with + this virtual router. This number is equal to the + number of rows in the vrrpv3AssociatedAddrTable that + correspond to a given ifIndex/VRID/IP version." + REFERENCE "RFC 5798, Section 6.1" + ::= { vrrpv3OperationsEntry 8 } + + vrrpv3OperationsAdvInterval OBJECT-TYPE + SYNTAX TimeInterval (1..4095) + UNITS "centiseconds" + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "The time interval, in centiseconds, between sending + advertisement messages. Only the master router sends + VRRP advertisements." + REFERENCE "RFC 5798, Section 6.1" + DEFVAL { 100} + ::= { vrrpv3OperationsEntry 9 } + + vrrpv3OperationsPreemptMode OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "Controls whether a higher priority virtual router will + preempt a lower priority master." + REFERENCE "RFC 5798, Section 6.1" + DEFVAL { true } + ::= { vrrpv3OperationsEntry 10 } + + vrrpv3OperationsAcceptMode OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "Controls whether a virtual router in master state + will accept packets addressed to the address owner's + address as its own if it is not the address + owner. Default is false(2)." + DEFVAL { false } + ::= { vrrpv3OperationsEntry 11 } + + vrrpv3OperationsUpTime OBJECT-TYPE + SYNTAX TimeTicks + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "This value represents the amount of time, in + TimeTicks (hundredth of a second), since this virtual + router (i.e., the 'vrrpv3OperationsStatus') + transitioned out of 'initialize'." + REFERENCE "RFC 5798, Section 6.1" + ::= { vrrpv3OperationsEntry 12 } + + vrrpv3OperationsRowStatus OBJECT-TYPE + SYNTAX RowStatus + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "The RowStatus variable should be used in accordance to + installation and removal conventions for conceptual + rows. + + To create a row in this table, a manager sets this + object to either createAndGo(4) or createAndWait(5). + Until instances of all corresponding columns are + appropriately configured, the value of the + corresponding instance of the + 'vrrpv3OperationsRowStatus' column will be read as + notReady(3). + In particular, a newly created row cannot be made + active(1) until (minimally) the corresponding instance + of vrrpv3OperationsInetAddrType, vrrpv3OperationsVrId, + and vrrpv3OperationsPrimaryIpAddr has been set, and + there is at least one active row in the + 'vrrpv3AssociatedIpAddrTable' defining an associated + IP address. + + notInService(2) should be used to administratively + bring the row down. + + A typical order of operation to add a row is: + 1. Create a row in vrrpv3OperationsTable with + createAndWait(5). + 2. Create one or more corresponding rows in + vrrpv3AssociatedIpAddrTable. + 3. Populate the vrrpv3OperationsEntry. + 4. Set vrrpv3OperationsRowStatus to active(1). + + A typical order of operation to delete an entry is: + 1. Set vrrpv3OperationsRowStatus to notInService(2). + 2. Set the corresponding rows in + vrrpv3AssociatedIpAddrTable to destroy(6) to delete + the entry. + 3. Set vrrpv3OperationsRowStatus to destroy(6) to + delete the entry." + ::= { vrrpv3OperationsEntry 13 } + +-- VRRP Associated Address Table + + vrrpv3AssociatedIpAddrTable OBJECT-TYPE + SYNTAX SEQUENCE OF Vrrpv3AssociatedIpAddrEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "The table of addresses associated with each virtual + router." + ::= { vrrpv3Operations 2 } + + vrrpv3AssociatedIpAddrEntry OBJECT-TYPE + SYNTAX Vrrpv3AssociatedIpAddrEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "An entry in the table contains an IP address that is + associated with a virtual router. The number of rows + for a given IP version, VrID, and ifIndex will equal + the number of IP addresses associated (e.g., backed up) + by the virtual router (equivalent to + 'vrrpv3OperationsIpAddrCount'). + + Rows in the table cannot be modified unless the value + of 'vrrpv3OperationsStatus' for the corresponding entry + in the vrrpv3OperationsTable has transitioned to + initialize(1). + + The information in this table is persistent and when + written the entity SHOULD save the change to non- + volatile storage." + + INDEX { ifIndex, vrrpv3OperationsVrId, + vrrpv3OperationsInetAddrType, + vrrpv3AssociatedIpAddrAddress } + + ::= { vrrpv3AssociatedIpAddrTable 1 } + + Vrrpv3AssociatedIpAddrEntry ::= + SEQUENCE { + vrrpv3AssociatedIpAddrAddress + + InetAddress, + vrrpv3AssociatedIpAddrRowStatus + RowStatus + } + + vrrpv3AssociatedIpAddrAddress OBJECT-TYPE + SYNTAX InetAddress (SIZE (0|4|16)) + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "The assigned IP addresses that a virtual router is + responsible for backing up. + + The IP address type is determined by the value of + vrrpv3OperationsInetAddrType in the index of this + row." + REFERENCE "RFC 5798" + ::= { vrrpv3AssociatedIpAddrEntry 1 } + + vrrpv3AssociatedIpAddrRowStatus OBJECT-TYPE + SYNTAX RowStatus + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "The row status variable, used according to + installation and removal conventions for conceptual + rows. To create a row in this table, a manager sets + this object to either createAndGo(4) or + createAndWait(5). Setting this object to active(1) + results in the addition of an associated address for a + virtual router. Setting this object to notInService(2) + results in administratively bringing down the row. + + Destroying the entry or setting it to destroy(6) + removes the associated address from the virtual router. + The use of other values is implementation-dependent. + + Implementations should not allow deletion of the last + row corresponding to an active row in + vrrpv3OperationsTable. + + Refer to the description of vrrpv3OperationsRowStatus + for typical row creation and deletion scenarios." + ::= { vrrpv3AssociatedIpAddrEntry 2 } + +-- VRRP Router Statistics + + vrrpv3RouterChecksumErrors OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of VRRP packets received with an + invalid VRRP checksum value. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + vrrpv3GlobalStatisticsDiscontinuityTime." + + REFERENCE "RFC 5798, Section 5.2.8" + ::= { vrrpv3Statistics 1 } + + vrrpv3RouterVersionErrors OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of VRRP packets received with an + unknown or unsupported version number. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + vrrpv3GlobalStatisticsDiscontinuityTime." + + REFERENCE "RFC 5798, Section 5.2.1" + ::= { vrrpv3Statistics 2 } + + vrrpv3RouterVrIdErrors OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of VRRP packets received with a + VRID that is not valid for any virtual router on this + router. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + vrrpv3GlobalStatisticsDiscontinuityTime." + + REFERENCE "RFC 5798, Section 5.2.3" + ::= { vrrpv3Statistics 3 } + + vrrpv3GlobalStatisticsDiscontinuityTime OBJECT-TYPE + SYNTAX TimeStamp + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The value of sysUpTime on the most recent occasion at + which one of vrrpv3RouterChecksumErrors, + vrrpv3RouterVersionErrors, and vrrpv3RouterVrIdErrors + suffered a discontinuity. + + If no such discontinuities have occurred since the last + re-initialization of the local management subsystem, + then this object contains a zero value." + + ::= { vrrpv3Statistics 4 } + +-- VRRP Router Statistics Table + + vrrpv3StatisticsTable OBJECT-TYPE + SYNTAX SEQUENCE OF Vrrpv3StatisticsEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table of virtual router statistics." + ::= { vrrpv3Statistics 5 } + + vrrpv3StatisticsEntry OBJECT-TYPE + SYNTAX Vrrpv3StatisticsEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "An entry in the table containing statistics + information about a given virtual router." + AUGMENTS { vrrpv3OperationsEntry } + ::= { vrrpv3StatisticsTable 1 } + + Vrrpv3StatisticsEntry ::= + SEQUENCE { + vrrpv3StatisticsMasterTransitions + Counter32, + vrrpv3StatisticsNewMasterReason + INTEGER, + vrrpv3StatisticsRcvdAdvertisements + Counter64, + vrrpv3StatisticsAdvIntervalErrors + Counter64, + vrrpv3StatisticsIpTtlErrors + Counter64, + vrrpv3StatisticsProtoErrReason + INTEGER, + vrrpv3StatisticsRcvdPriZeroPackets + Counter64, + vrrpv3StatisticsSentPriZeroPackets + Counter64, + vrrpv3StatisticsRcvdInvalidTypePackets + Counter64, + vrrpv3StatisticsAddressListErrors + Counter64, + vrrpv3StatisticsPacketLengthErrors + Counter64, + vrrpv3StatisticsRowDiscontinuityTime + TimeStamp, + vrrpv3StatisticsRefreshRate + Unsigned32 + } + + vrrpv3StatisticsMasterTransitions OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of times that this virtual router's + state has transitioned to master state. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + vrrpv3StatisticsRowDiscontinuityTime." + ::= { vrrpv3StatisticsEntry 1 } + + vrrpv3StatisticsNewMasterReason OBJECT-TYPE + SYNTAX INTEGER { + notMaster (0), + priority (1), + preempted (2), + masterNoResponse (3) + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "This indicates the reason for the virtual router to + transition to master state. If the virtual router + never transitioned to master state, the value of this + object is notMaster(0). Otherwise, this indicates the + reason this virtual router transitioned to master + state the last time. Used by vrrpv3NewMaster + notification." + ::= { vrrpv3StatisticsEntry 2 } + + vrrpv3StatisticsRcvdAdvertisements OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of VRRP advertisements received by + this virtual router. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + vrrpv3StatisticsRowDiscontinuityTime." + + ::= { vrrpv3StatisticsEntry 3 } + + vrrpv3StatisticsAdvIntervalErrors OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of VRRP advertisement packets + received for which the advertisement interval is + different from the vrrpv3OperationsAdvInterval + configured on this virtual router. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + vrrpv3StatisticsRowDiscontinuityTime." + + ::= { vrrpv3StatisticsEntry 4 } + + vrrpv3StatisticsIpTtlErrors OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of VRRP packets received by the + virtual router with IPv4 TTL (for VRRP over IPv4) or + IPv6 Hop Limit (for VRRP over IPv6) not equal to 255. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + vrrpv3StatisticsRowDiscontinuityTime." + REFERENCE "RFC 5798, Section 5.1.1.3" + ::= { vrrpv3StatisticsEntry 5 } + + vrrpv3StatisticsProtoErrReason OBJECT-TYPE + SYNTAX INTEGER { + noError (0), + ipTtlError (1), + versionError (2), + checksumError (3), + vrIdError(4) + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "This indicates the reason for the last protocol + error. This SHOULD be set to noError(0) when no + protocol errors are encountered. Used by + vrrpv3ProtoError notification." + ::= { vrrpv3StatisticsEntry 6 } + + vrrpv3StatisticsRcvdPriZeroPackets OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of VRRP packets received by the + virtual router with a priority of '0'. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + vrrpv3StatisticsRowDiscontinuityTime." + REFERENCE "RFC 5798, Section 5.2.4" + ::= { vrrpv3StatisticsEntry 7 } + + vrrpv3StatisticsSentPriZeroPackets OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of VRRP packets sent by the virtual + router with a priority of '0'. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + vrrpv3StatisticsRowDiscontinuityTime." + REFERENCE "RFC 5798, Section 5.2.4" + ::= { vrrpv3StatisticsEntry 8 } + + vrrpv3StatisticsRcvdInvalidTypePackets OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of VRRP packets received by the virtual + router with an invalid value in the 'type' field. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + vrrpv3StatisticsRowDiscontinuityTime." + ::= { vrrpv3StatisticsEntry 9 } + + vrrpv3StatisticsAddressListErrors OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of packets received for which the + address list does not match the locally configured + list for the virtual router. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + vrrpv3StatisticsRowDiscontinuityTime." + ::= { vrrpv3StatisticsEntry 10 } + + vrrpv3StatisticsPacketLengthErrors OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of packets received with a packet + length less than the length of the VRRP header. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + vrrpv3StatisticsRowDiscontinuityTime." + ::= { vrrpv3StatisticsEntry 11 } + + vrrpv3StatisticsRowDiscontinuityTime OBJECT-TYPE + SYNTAX TimeStamp + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The value of sysUpTime on the most recent occasion at + which any one or more of this entry's counters + suffered a discontinuity. + + If no such discontinuities have occurred since the last + re-initialization of the local management subsystem, + then this object contains a zero value." + ::= { vrrpv3StatisticsEntry 12 } + + vrrpv3StatisticsRefreshRate OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "milliseconds" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The minimum reasonable polling interval for this entry. + This object provides an indication of the minimum + amount of time required to update the counters in this + entry." + ::= { vrrpv3StatisticsEntry 13 } + +-- Notification Definitions +-- Notifications may be controlled using SNMP-NOTIFICATION-MIB + + vrrpv3NewMaster NOTIFICATION-TYPE + OBJECTS { + vrrpv3OperationsMasterIpAddr, + vrrpv3StatisticsNewMasterReason + } + STATUS current + DESCRIPTION + "The newMaster notification indicates that the sending + agent has transitioned to master state." + ::= { vrrpv3Notifications 1 } + + vrrpv3ProtoError NOTIFICATION-TYPE + OBJECTS { + vrrpv3StatisticsProtoErrReason + } + STATUS current + DESCRIPTION + "The notification indicates that the sending agent has + encountered the protocol error indicated by + vrrpv3StatisticsProtoErrReason." + ::= { vrrpv3Notifications 2 } + +-- Conformance Information + + vrrpv3Compliances OBJECT IDENTIFIER ::= { vrrpv3Conformance 1 } + vrrpv3Groups OBJECT IDENTIFIER ::= { vrrpv3Conformance 2 } + +-- Compliance Statements + + vrrpv3FullCompliance MODULE-COMPLIANCE + STATUS current + DESCRIPTION + "The compliance statement" + MODULE -- this module + MANDATORY-GROUPS { + vrrpv3OperationsGroup, + vrrpv3StatisticsGroup, + vrrpv3InfoGroup, + vrrpv3NotificationsGroup + } + OBJECT vrrpv3OperationsPriority + WRITE-SYNTAX Unsigned32 (1..254) + DESCRIPTION "Setable values are from 1 to 254." + ::= { vrrpv3Compliances 1 } + + vrrpv3ReadOnlyCompliance MODULE-COMPLIANCE + STATUS current + DESCRIPTION + "When this MIB module is implemented without support + for read-create (i.e., in read-only mode), then such + an implementation can claim read-only compliance. + Such a device can then be monitored, but cannot be + configured with this MIB." + + MODULE -- this module + MANDATORY-GROUPS { + vrrpv3OperationsGroup, + vrrpv3StatisticsGroup, + vrrpv3StatisticsDiscontinuityGroup, + vrrpv3InfoGroup, + vrrpv3NotificationsGroup + } + + OBJECT vrrpv3OperationsPriority + MIN-ACCESS read-only + DESCRIPTION "Write access is not required." + + OBJECT vrrpv3OperationsPrimaryIpAddr + MIN-ACCESS read-only + DESCRIPTION "Write access is not required." + OBJECT vrrpv3OperationsAdvInterval + MIN-ACCESS read-only + DESCRIPTION "Write access is not required." + + OBJECT vrrpv3OperationsPreemptMode + MIN-ACCESS read-only + DESCRIPTION "Write access is not required." + + OBJECT vrrpv3OperationsAcceptMode + MIN-ACCESS read-only + DESCRIPTION "Write access is not required." + + OBJECT vrrpv3OperationsRowStatus + MIN-ACCESS read-only + DESCRIPTION "Write access is not required." + + OBJECT vrrpv3AssociatedIpAddrRowStatus + MIN-ACCESS read-only + DESCRIPTION "Write access is not required." + + ::= { vrrpv3Compliances 2 } + +-- Conformance Groups + + vrrpv3OperationsGroup OBJECT-GROUP + OBJECTS { + vrrpv3OperationsVirtualMacAddr, + vrrpv3OperationsStatus, + vrrpv3OperationsPriority, + vrrpv3OperationsMasterIpAddr, + vrrpv3OperationsAdvInterval, + vrrpv3OperationsPreemptMode, + vrrpv3OperationsAcceptMode, + vrrpv3OperationsUpTime, + vrrpv3OperationsRowStatus, + vrrpv3OperationsAddrCount, + vrrpv3OperationsPrimaryIpAddr, + vrrpv3AssociatedIpAddrRowStatus + } + STATUS current + DESCRIPTION + "Conformance group for VRRPv3 operations." + ::= { vrrpv3Groups 1 } + + vrrpv3StatisticsGroup OBJECT-GROUP + OBJECTS { + vrrpv3RouterChecksumErrors, + vrrpv3RouterVersionErrors, + vrrpv3RouterVrIdErrors, + vrrpv3StatisticsMasterTransitions, + vrrpv3StatisticsNewMasterReason, + vrrpv3StatisticsRcvdAdvertisements, + vrrpv3StatisticsAdvIntervalErrors, + vrrpv3StatisticsRcvdPriZeroPackets, + vrrpv3StatisticsSentPriZeroPackets, + vrrpv3StatisticsRcvdInvalidTypePackets, + vrrpv3StatisticsIpTtlErrors, + vrrpv3StatisticsProtoErrReason, + vrrpv3StatisticsAddressListErrors, + vrrpv3StatisticsPacketLengthErrors, + vrrpv3StatisticsRowDiscontinuityTime, + vrrpv3StatisticsRefreshRate + } + STATUS current + DESCRIPTION + "Conformance group for VRRPv3 statistics." + ::= { vrrpv3Groups 2 } + + vrrpv3StatisticsDiscontinuityGroup OBJECT-GROUP + OBJECTS { + vrrpv3GlobalStatisticsDiscontinuityTime + } + STATUS current + DESCRIPTION + "Objects providing information about counter + discontinuities." + ::= { vrrpv3Groups 3 } + + vrrpv3InfoGroup OBJECT-GROUP + OBJECTS { + vrrpv3StatisticsProtoErrReason, + vrrpv3StatisticsNewMasterReason + } + STATUS current + DESCRIPTION + "Conformance group for objects contained in VRRPv3 + notifications." + ::= { vrrpv3Groups 4 } + + vrrpv3NotificationsGroup NOTIFICATION-GROUP + NOTIFICATIONS { + vrrpv3NewMaster, + vrrpv3ProtoError + } + STATUS current + DESCRIPTION + "The VRRP MIB Notification Group." + ::= { vrrpv3Groups 5 } + +END diff --git a/doc/keepalived.conf.SYNOPSIS b/doc/keepalived.conf.SYNOPSIS new file mode 100644 index 0000000..807adf0 --- /dev/null +++ b/doc/keepalived.conf.SYNOPSIS @@ -0,0 +1,1325 @@ +This file describe all the Keepalived available keywords. The keepalived.conf +file is compounded by three configurations parts : + + * Globals configurations + * VRRP configuration + * LVS configuration + * BFD configuration + +0. Comment string + +There is 2 valid comment valid string : # or ! If you want to add comment +in you configuration file use this char. + +0.1. Parameter syntax + + is one of on|off|true|false|yes|no or omitted which defaults to on + +0.2. Conditional configuration and configuration id + +The config-id defaults to the first part of the node name as returned by +uname, and can be overridden with the -i or --config-id command line option. + +Any configuration line starting with (i.e. before any whitespace) '@' is a +conditional configuration line. The word immediately following (i.e. +without any space) the '@' character is compared against the config-id, +and if they don't match, the configuration line is ignored. + +Alternatively, '@^' is a negative comparison, so if the word immediately +following does NOT match the config-id, the configuration line IS included. + +The purpose of this is to allow a single configuration file to be used for +multiple systems, where the only differences are likely to be the router_id, +vrrp instance priorities, and possibly interface names. + +For example: + +global_defs +{ +@main router_id main_router +@backup router_id backup_router +} +... +vrrp_instance VRRP1 { + ... +@main unicast_src_ip 1.2.3.4 +@backup unicast_src_ip 1.2.3.5 +@backup2 unicast_src_ip 1.2.3.6 + + unicast_peer { +@^main 1.2.3.4 +@^backup 1.2.3.5 +@^backup2 1.2.3.6 + } +} + +If keepalived is invoked with -i main, or if -i is not specified and the node +name is main.SOMETHING, then the router_id will be set to main_router, +if invoked with -i backup, or the node name is backup, then backup_router, +if not invoked with -i and the node name is not main or backup, or with +-i anything else, then the router_id will not be set. + +The unicast peers for main will be 1.2.3.5 and 1.2.3.6. + +0.3. Scripts + +There are three classes of scripts can be configured to be executed. + +a. Notify scripts that are run when a vrrp instance or vrrp group changes state, + or a virtual server quorum changes between up and down. + +b. vrrp tracking scripts that will cause vrrp instances to go down it they exit + a non-zero exist status, or if a weight is specified will add or subtract the + weight to/from the priority of that vrrp instance. + +c. LVS checker misc scripts that will cause a real server to be configured down + if they exit with a non-zero status. + +By default the scripts will be executed by user keepalived_script if that user +exists, or if not by root, but for each script the user/group under which it is +to be executed can be specified. + +There are significant security implications if scripts are executed with root +privileges, especially if the scripts themselves are modifiable or replaceable +by a non root user. Consequently, security checks are made at startup to ensure +that if a script is executed by root, then it cannot be modified or replaced by +a non root user. + +All scripts should be written so that they will terminate on receipt of a SIGTERM +signal. Scripts will be sent SIGTERM if their parent terminates, or it is a script +the keepalived is awaiting its exit status and it has run for too long. + +0.4 include directive + +It is possible to include further configuration files from within a configuration +file, and this can be done to any depth. + +The format of the include directive is: +include FILENAME + +FILENAME can be a fully qualified or relative pathname, and can include wildcards, +including csh style brace expressions such as "{foo/{,cat,dog},bar}" if glob() +supports them. + +After opening an included file, the current directory is set to the directory of +the file itself, so any relative paths included from a file are relative to the +directory of the including file itself. + +0.5 Parameter substitution + +Substitutable parameters can be specified. The format for defining a parameter is: +$PARAMETER=VALUE +where there must be no space before the '=' and only whitespace may preceed to '$'. +Empty values are allowed. + +Parameter names can be made up of any combination of A-Za-z0-9 and _, but cannot start +with a digit. Parameter names starting with an underscore should be considered +reserved names that keepalived will define for various pre-defined options. + +After a parameter is defined, any occurrence of $PARAMETER followed by +whitespace, or any occurrence of ${PARAMETER} (which need not be followed by +whitespace) will be replaced by VALUE. + +Replacement is recursive, so that if a parameter value itself includes a +replaceable parameter, then after the first substitution, the parameter +in the value will then be replaced; the substitution is done at replacement +time and not at definition time, so for example: + +$ADDRESS_BASE=10.2.${ADDRESS_BASE_SUB} +$ADDRESS_BASE_SUB=0 + ${ADDRESS_BASE}.100/32 +$ADDRESS_BASE_SUB=10 + ${ADDRESS_BASE}.100/32 + +will produce: + 10.2.0.100/32 + 10.2.10.100/32 + +Note in the above examples the use of both ADDRESS_BASE and ADDRESS_BASE_SUB +required braces ({}) since the parameters were not followed by whitespace +(after the first substitution which produced 10.2.${ADDRESS_BASE_SUB}.100/32 +the parameter is still not followed by whitespace). + +If a parameter is not defined, it will not be replaced at all, so for +example ${UNDEF_PARAMETER} will remain in the configuration if it is +undefined; this means that existing configuration that contains a '$' +character (for example in a script definition) will not be changed so +long as no new parameter definitions are added to the configuration. + +Parameter substitution works in conjunction with conditional configuration. +For example: +@main $PRIORITY=240 +@backup $PRIORITY=200 +... +vrrp_instance VI_0 { + priority $PRIORITY +} + +will produce: +... +vrrp_instance VI_0 { + priority 240 +} +if the config_id is main. + +$IF_MAIN=@main +$IF_MAIN priority 240 + +will produce + priority 240 +if the config_id is main and nothing if the config_id is not main, although +why anyone would want to use this rather than simply +@main priority 240 +is not known. + +Multiline definitions are also suppored, but when used there must be nothing on +the line after the parameter name. A multiline definition is specified by ending +each line except the last with a '\' character. + +Example: + +$INSTANCE= \ +vrrp_instance VI_${NUM} { \ + interface eth0.${NUM} \ + use_vmac vrrp${NUM}.1 \ + virtual_router_id 1 \ +@high priority 130 \ +@low priority 120 \ + advert_int 1 \ + virtual_ipaddress { \ + 10.0.${NUM}.254/24 \ + } \ + track_script { \ + offset_instance_${NUM} \ + } \ +} + +$NUM=0 +$INSTANCE + +$NUM=1 +$INSTANCE + +The use of multiline definitions can be nested. + +Example: + +$RS= \ + real_server 192.168.${VS_NUM}.${RS_NUM} 80 { \ + weight 1 \ + inhibit_on_failure \ + smtp_alert \ + MISC_CHECK { \ + misc_path "${_PWD}/scripts/vs.sh RS_misc.${INST}.${VS_NUM}.${RS_NUM}.0 10.0.${VS_NUM}.4:80->192.168.${VS_NUM}.${RS_NUM}:80" \ + } \ + MISC_CHECK { \ + misc_path "${_PWD}/scripts/vs.sh RS_misc.${INST}.${VS_NUM}.${RS_NUM}.1 10.0.${VS_NUM}.4:80->192.168.${VS_NUM}.${RS_NUM}:80" \ + } \ + notify_up "${_PWD}/scripts/notify.sh RS_notify.${INST}.${VS_NUM}.${RS_NUM} UP 10.0.${VS_NUM}.4:80->192.168.${VS_NUM}.${RS_NUM}:80" \ + notify_down "${_PWD}/scripts/notify.sh RS_notify.${INST}.${VS_NUM}.${RS_NUM} DOWN 10.0.${VS_NUM}.4:80->192.168.${VS_NUM}.${RS_NUM}:80" \ + } + +$VS= \ +virtual_server 10.0.${VS_NUM}.4 80 { \ + quorum 2 \ + quorum_up "${_PWD}/scripts/notify.sh VS_notify.${INST} UP 10.0.${VS_NUM}.4:80" \ + quorum_down "${_PWD}/scripts/notify.sh VS_notify.${INST} DOWN 10.0.${VS_NUM}.4:80" \ +$RS_NUM=1 \ +$RS \ +$RS_NUM=2 \ +$RS \ +$RS_NUM=3 \ +$RS \ +} + +$VS_NUM=0 +$ALPHA=alpha +$VS + +$VS_NUM=1 +$ALPHA= +$VS + +The above will create 2 virtual servers, each with 3 real servers + + +0.5.1 Pre-defined definitions + +The following pre-defined definitions are defined: +${_PWD} The directory of the current configuration file + (this can be changed if using the include directive). +${_INSTANCE} The instance name (as defined by the -i option, defaults + to hostname). + +Additional pre-defiend definitions will be added as their need is identified. +It will normally be quite straightforward to add additional pre-defiend +definitions, so if you need one, or have a good idea for one, then raise +an issue at https://github.com/acasson/keepalived/issues requesting it. + +0.6 Sequence blocks + +A line starting ~SEQ(var, start, step, end) will cause the remainder of the +line to be processed multiple times, with the variable $var set initially to +start, and then $var will be incremented by step repeatedly, terminating when +it is greater than end. step may be omitted, in which case it defaults to 1 or +-1, depending on whether end is greater or less than start. Start may also be +omitted, in which case it defaults to 1 if end > 0 or -1 if end < 0. + +For example: + ~SEQ(SUBNET, 0, 3) ip_address 10.0.$SUBNET.1 +would produce: + ip_address 10.0.0.1 + ip_address 10.0.1.1 + ip_address 10.0.2.1 + ip_address 10.0.3.1 + +There can be multiple ~SEQ elements on a line, so + $VI4= \ + vrrp_track_file offset_instance_4.${IF}.${NUM}.${ID} { \ + file "${_PWD}/679/track_files/4.${IF}.${NUM}.${ID}" \ + weight -100 \ + } \ + \ + vrrp_instance vrrp4.${IF}.${NUM}.${ID} { \ + interface bond${IF}.${NUM} \ + use_vmac vrrp4.${IF}.${NUM}.${ID} \ + virtual_router_id ${ID} \ + priority 130 \ + virtual_ipaddress { \ + 10.${IF}.${NUM}.${ID}/24 \ + } \ + \ + track_file { \ + offset_instance_4.${IF}.${NUM}.${ID} \ + } \ + } + + ~SEQ(IF,0,7) ~SEQ(NUM,0,31) ~SEQ(ID,1,254) $VI4 + +will produce 65024 vrrp instances with names from vrrp4.0.0.1 through to +vrrp4.7.31.254. + +0.7 Quoted strings + +Quoted strings are specified between " characters; more specifically a string +will only end after a quoted string if there is whitespace afterwards. For +example, +"abcd" efg h jkl "mnop" +will be the single string "abcd efg h jkl mnop", i.e. the embedded " characters +are removed. + +Quoted strings can also have escaped characters, like the shell. \a, \b, \E, \f, +\n, \r, \t, \v, \nnn and \xXX (where nnn is up to 3 octal digits, and XX is any +sequence of hex digits) and \cC (which produces the control version of +character C) are all supported. \C for any other character C is just +treated as an escaped version of character C, so \\ is a \ character, and +\" will be a " character, but it won't start or terminate a quoted string. + +For specifying scripts with parameters, unquoted spaces will separate the +parameters. If it is required for a parameter to contain a space, it should +be enclosed in single quotes ('). + +0.8 Configuration file syntax parser + +Traditionally the configuration file parser has not been one of the strengths of +keepalived. yukki maintains a project on github that is a keepalived syntax +checker that may be of use. It can be downloaded from https://github.com/yuuki/gokc + +1. Globals configurations + +This block is divided in 5 sub-blocks : + + * Global definitions + * Static track groups + * Static addresses + * Static rules + * Static routes + + 1.1. Global definitions + + The configuration block looks like : + +global_defs { # Block identification + notification_email { # Email address to send alerts to + # Standard email address + + ... + } + notification_email_from # Email From dealing with SMTP proto + # defaults to keepalived@ + smtp_server
| [] + # SMTP server IP address or domain name + # with optional port number (defaults to 25) + smtp_helo_name # name to use in HELO messages + # defaults to local host name + smtp_connect_timeout # Number of seconds timeout connect + # remote SMTP server + smtp_alert # Sets default state for all smtp_alerts + smtp_alert_vrrp # Sets default state for vrrp smtp_alerts + smtp_alert_checker # Sets default state for checker smtp_alerts + no_email_faults # Don't send smtp alerts for fault conditions + router_id # String identifying router + vrrp_garp_interval # Sets the default interval between Gratuitous ARP + # (in seconds, resolution microseconds) + vrrp_gna_interval # Sets the default interval between unsolicited NA + # (in seconds, resolution microseconds) + vrrp_mcast_group4 # optional, default 224.0.0.18 + vrrp_mcast_group6 # optional, default ff02::12 + vrrp_skip_check_adv_addr # Checking all the addresses in a received VRRP advert can be time consuming. + # Setting this flag means the check won't be carried out if the advert is + # from the same master router as the previous advert received. + # Default: Don't skip. + default_interface # sets the default interface for static addresses, default eth0 + lvs_sync_daemon [id ] [maxlen ] [port ] [ttl ] [group ] + # Binding interface, vrrp instance and optional + # syncid (0 to 255) for lvs syncd + # maxlen (1..65507) maximum packet length + # port (1..65535) UDP port number to use + # ttl (1..255) + # group - multicast group address (IPv4 or IPv6) + # NOTE: maxlen, port, ttl and group are only available on Linux 4.3 or later. + lvs_timeouts [tcp TO] [tcpfin TO] [udp [TO] # LVS session timeouts + lvs_flush # flush any existing LVS configuration at startup + vrrp_garp_master_delay # delay in seconds for second set of gratuitous ARP + # messages after MASTER state transition, default 5. + # 0 means no second set. + vrrp_garp_master_repeat # how many gratuitous ARP messages after MASTER + # state transition should be sent, default 5 + vrrp_garp_lower_prio_delay # delay for second set of gratuitous ARPs after lower + # priority advert received when MASTER + vrrp_garp_lower_prio_repeat # number of gratuitous ARP messages to send at a time + # after lower priority advert received when MASTER + vrrp_garp_master_refresh # Periodic delay in seconds sending + # gratuitous ARP while in MASTER state + # Default: 0 (no refreshing) + vrrp_garp_master_refresh_repeat # how many gratuitous ARP messages should be sent + # at each periodic repeat + # Default: one (per period) + vrrp_lower_prio_no_advert [] # If a lower priority advert is received, just discard + # it and don't send another advert. This causes adherence + # to the RFCs. + vrrp_higher_prio_send_advert [] # If we are master and receive a higher priority + # advert, send an advert (which will be lower priority + # than the other master), before we transition to + # backup. This means that if the other master has + # garp_lower_priority_repeat set, it will resend garp + # messages. This is to get around the problem of their + # having been two simultaneous masters, and the last GARP + # messages seen were from us. + vrrp_version # Default VRRP version (default 2) + vrrp_iptables [keepalived_in [keepalived_out]] # default INPUT + # Specifies the iptables chains to add entries to + # If no table names are specied, no entries are added + vrrp_ipsets ipset4 [ipset6 [ipset_if6]] # Set the ipset set names to use. If no names are specified, + # ipsets will not be used. The default ipset4 name is 'keepalived'. + # If ipset6 is not specified, '6' as appended to the ipset4 name. + # If ipset_if6 is not specified, any trailing '6' from ipset6 + # is removed and '_if6' appended + vrrp_check_unicast_src # Check source address of a unicast packet is a + # unicast peer + vrrp_strict # Enforce strict VRRP protocol compliance. This will prohibit: + # 0 VIPs + # unicast peers + # IPv6 addresses in VRRP version 2 + # Sets: + # vrrp_lower_priority_dont_send_advert + # + # The following 4 options can be used if vrrp or checker processes + # are timing out. This can be seen by a backup vrrp instance becoming + # master even when the master is still running, due to the master or + # backup systems being busy, they are not processing the vrrp packets. + vrrp_priority # Set the vrrp child process priority (negative values increase priority) + checker_priority # Set the checker child process priority + bfd_priority # Set the BFD child process priority + vrrp_no_swap # Set the vrrp child process non swappable + checker_no_swap # Set the checker child process non swappable + bfd_no_swap # Set the BFD child process non swappable + vrrp_rt_priority # Set the vrrp child process to use real-time scheduling at the specified priority + checker_rt_priority # Set the checker child process to use real-time scheduling at the specified priority + bfd_rt_priority # Set the BFD child process to use real-time scheduling at the specified priority + vrrp_rlimit_rtime # Set the limit on CPU time between blocking system calls, in microseconds (default 10000) + checker_rlimit_rtime # as above + bfd_rlimit_rtime # as above + # + # If keepalived has been build with SNMP support, + # the following keywords are available + # Note: keepalived, checker and rfc support can be + # individually enabled/disabled + snmp_socket :
[:] # specify socket to use for connecting to SNMP master agent (default unix:/var/agentx/master) + # (see source module keepalived/vrrp/vrrp_snmp.c for more details) + enable_snmp_vrrp # enable SNMP handling of vrrp element of KEEPALIVED MIB + enable_snmp_checker # enable SNMP handling of checker element of KEEPALIVED MIB + enable_snmp_rfc # enable SNMP handling of RFC2787 and RFC6527 VRRP MIBs + enable_snmp_rfcv2 # enable SNMP handling of RFC2787 VRRPv2 MIB + enable_snmp_rfcv3 # enable SNMP handling of RFC6527 VRRPv3 MIB + enable_traps # enable SNMP trap generation + # + enable_dbus # enable the DBus interface + dbus_service_name SERVICE_NAME # Name of DBus service (default org.keepalived.Vrrp1) + # Useful if you want to run multiple keepalived processes with DBus enabled + # + script_user USERNAME [GROUPNAME] # Specify the default username/groupname to run scripts under + # If groupname is not specified, the group of the user is used. + # If this option is not specified, the user defaults to keepalived_script + # if that user exists, otherwise root. + enable_script_security # Don't run scripts configured to be run as root if any part of the path + # is writable by a non-root user. + notify_fifo FIFO_NAME # FIFO to write notify events to + # See vrrp_notify_fifo and lvs_notify_fifo for format of output + # For further details, see the description under vrrp_sync_group see + # doc/samples/sample_notify_fifo.sh for sample usage. + notify_fifo_script STRING|QUOTED_STRING [username [groupname]] + # script to be run by keepalived to process notify events + # The FIFO name will be passed to the script as the last parameter + vrrp_notify_fifo FIFO_NAME # FIFO to write vrrp notify events to (must be different from other FIFO names) + # The string written will be a line of the form: INSTANCE "VI_1" MASTER 100 + # and will be terminated with a new line character. + # For further details of the output, see the description under vrrp_sync_group + # and doc/samples/sample_notify_fifo.sh for sample usage. + vrrp_notify_fifo_script STRING|QUOTED_STRING [username [groupname]] + # script to be run by keepalived to process vrrp notify events + # The FIFO name will be passed to the script as the last parameter + lvs_notify_fifo FIFO_NAME # FIFO to write notify healthchecker events to (must be different from other FIFO names) + # The string written will be a line of the form: + # VS [192.168.201.15]:tcp:80 {UP|DOWN} + # RS [1.2.3.4]:tcp:80 [192.168.201.15]:tcp:80 {UP|DOWN} + # and will be terminated with a new line character. + lvs_notify_fifo_script STRING|QUOTED_STRING [username [groupname]] + # script to be run by keepalived to process healthchecher notify events + # The FIFO name will be passed to the script as the last parameter + dynamic_interfaces [allow_if_changes] # Allow configuration to include interfaces that don't exist at startup. + # This allows keepalived to work with interfaces that may be deleted + # and restored and also allows virtual and static routes and rules on + # VMAC interfaces. + # allow_if_changes allows an interface to be deleted and recreated with a + # different type or underlying interface, eg changing from vlan to macvlan + # or changing a macvlan from eth1 to eth2. This is predominantly used for + # reporting duplicate VRID errors at startup if allow_if_changes is not set. + + # The following options are only needed for large configurations, where either + # keepalived creates a large number of interface, or the system has a large + # number of interface. These options only need using if + # "Netlink: Receive buffer overrun" messages are seen in the system logs. + # If the buffer size needed exceeds the value in /proc/sys/net/core/rmem_max + # the corresponding force option will need to be set. + vrrp_netlink_cmd_rcv_bufs BYTES # Set netlink receive buffer size. This is useful for + vrrp_netlink_cmd_rcv_bufs_force # very large configurations where a large number of interfaces exist, and + vrrp_netlink_monitor_rcv_bufs BYTES # the initial read of the interfaces on the system causes a netlink buffer + vrrp_netlink_monitor_rcv_bufs_force # overrun. + lvs_netlink_cmd_rcv_bufs BYTES # The vrrp netlink command and monitor socket and the checker command + lvs_netlink_cmd_rcv_bufs_force # and monitor socket buffer sizes can be independently set. + lvs_netlink_monitor_rcv_bufs BYTES # The force flag means to use SO_RCVBUFFORCE, so that the buffer size can + lvs_netlink_monitor_rcv_bufs_force # exceed /proc/sys/net/core/rmem_max. + + # When a socket is opened, the kernel configures the max rx buffer size for + # the socket to /proc/sys/net/core/rmem_default. On some systems this can be + # very large, and even generally this can be much larger than necessary. + # This isn't a problem so long as keepalived is reading all queued data from + # it's sockets, but if rmem_default was set sufficiently large, and if for + # some reason keepalived stopped reading, it could consume all system memory. + # The vrrp_rx_bufs_policy allows configuring of the rx bufs size when the + # sockets are opened. If the policy is MTU, the rx buf size is configured + # to the total of interface's MTU * vrrp_rx_bufs_multiplier for each vrrp + # instance using the socket. Likewise, if the policy is ADVERT, then it is + # the total of each vrrp instances advert packet size * multiplier. + # If policy is set to a number, the rx buf size is configured to that number. + vrrp_rx_bufs_policy [MTU|ADVERT|NUMBER] # default is to use system default + vrrp_rx_bufs_multiplier NUMBER # default 3 + + rs_init_notifies # Send notifies at startup for real servers that are starting up + no_checker_emails # Don't send an email every time a real server checker changes state; + # only send email when a real server is added or removed + umask [NUMBER|BITS] # The umask to use for creating files. The number can be specified in hex, octal + # or decimal. BITS are I{R|W|X}{USR|GRP|OTH}, e.g. IRGRP, separated by '|'s. + # The default umask is IWGRP | IWOTH. This option cannot override the + # command-line option. +} + +net_namespace NAME # Set the network namespace to run in + # The directory /var/run/keepalived will be created as an unshared mount point, + # for example for pid files. + # syslog entries will have _NAME appended to the ident. + # Note: the namespace cannot be changed on a configuration reload +namespace_with_ipsets # ipsets wasn't network namespace aware until Linux 3.13, and so if running with + # an earlier version of the kernel, by default use of ipsets is disabled if using + # a namespace and vrrp_ipsets isn't specified. + # This options overrides the default and allows ipsets to be used + # with a namespace on kernels prior to 3.13. + +instance NAME # If multiple instances of keepalived are run in the same namespace, this will + # create pid files with NAME as part of the file names, in /var/run/keepalived. + # Note: the instance name cannot be changed on a configuration reload + +use_pid_dir # Create pid files in /var/run/keepalived + +linkbeat_use_polling # Use media link failure detection polling fashion + +child_wait_time SECS # Time for main process to allow for child processes to exit on termination + # in seconds (default 5). This can be needed for very large configurations. + + 1.2. Static track groups + + Static track groups are used to allow vrrp instances to track static addresses, + routes and rules. If a static address/route/rule specifies a track group, then + if the address/route/rule is deleted, the vrrp instance will transition to backup, + or to fault state if the address/route/rule cannot be re-added. + + The syntax for a track group is: + + track_group GROUP1 { + group { + VI_1 + VI_2 + } + } + + 1.3. Static addresses + + The configuration block looks like : + +static_ipaddress { # block identification + # If no dev element is specified, it defaults to the default_interface (default eth0) + # The track_group specification refers to a named track_group which lists the vrrp instances which + # will track the address, i.e. if the address is deleted and cannot be restored the vrrp instances + # will transition to fault state. + # no_track means that the address will not be reinstated if it is deleted + # Note: the broadcast address may be specified as '-' or '+' to clear or set the host + # bits of the address. + [/] [brd ] [dev ] [scope ] [label