Keepalived 2.0.14 發布,C 語言編寫的路由軟體

2021-01-11 開源中國

Keepalived 2.0.14 已發布, Keepalived 是一款用 C 編寫的路由軟體。該項目的主要目標是為 Linux 系統和基於 Linux 的基礎設備提供簡單而強大的負載均衡和高可用性(HA)。

具體更新內容如下:

* Add compiler warning -Wfloat-conversion and fix new warnings.
  It was discovered that passing 0.000001 as a parameter specified
  as uint32_t to a function did not generate any warning of type
  mismatch, or loss of precision.
  This commit adds -Wfloat-conversion and fixes 3 instances of new
  warnings that were generated.
* For non systemd enviroment, it occurs syntax error 'fi'.
  To avoid syntax error, modify keepalived.spec.in.
* When uninstall keepalived with init upstart, stop keepalived process.
* Fix type re LOG_INGO should be LOG_INFO * 6git stash --cached.
  The code was actualy in a #ifdef INCLUDE_UNUSED_CODE block, and
  so isn't currently compiled.
* Register missing thread function for thread debugging.
* Fix reutrn value of notify_script_compare misusing issue.
* Fix typo in keepalived.conf man page re BFD min_rx.
* Fix segfault when bfd process reloads config.
  Issue #1145 reported the bdf process was segfaulting when reloading.
  The bfd process was freeing and allocating a new thread_master_t
  when reloading, which doesn't work. This commit changes the bfd
  process to clean and reinitialise the thread_master_t.
* Fix segfault in handle_proc_ev().
  On Linux 3.10 the ack bit can be set in a connector message, and
  the CPU number is set to UINT32_MAX. This commit skips acks, and
  also checks that CPU number is within range of the number of CPUs
  on the system.
* Fix OpenSSL init failure with OpenSSL v1.1.1.
  OpenSSL v1.1.1, but not v1.1.0h or v1.1.1b failed in SSL_CTX_new()
  if OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG) had previously
  been called.
  This commit doesn't call OPENSSL_init_crypto() if doing so causes
  SSL_CTX_new() to fail.
* Remove all references to libnfnetlink.
  Commit 2899da6 (Stop using linbl for mcast group membership and
  setting rx buf sizes) stopped using libnfnetlink, but INSTALL and
  keepalived.spec.in were not updated accordingly.
* Fix genhash re OPENSSL_init_crypto bug and improve configure.ac.
  Commit fe6d6ac (Fix OpenSSL init failure with OpenSSL v1.1.1) didn't
  update the identical code in genhash/ssl.c. Also, an improvement for
  the test in configure.ac was suggested.
* Fix log output when real server removed.
  FMT_VS() and FMT_RS() both call inet_sockaddrtotrio which uses a
  static buffer to return the formatted string, but since FMT_VS(),
  wheich simply calls format_vs() copies the returned string to its
  own static buffer, if FMT_VS() was called before FMT_RS() then
  the returned strings from both could be used.
  The problem occurs when both FMT_VS() and FMT_RS() are used as
  parameters to log_message() (or printf etc). It appeared to work
  fine on x86_64, but was writing the same IP address for both the
  real server and virtual server on ARM architectures. This is due
  to the compiler evaluating parameters to the log_message() function
  call in a different order on the different architectures.
  This commit adds inet_sockaddrtotrio_r() which allows the output
  to be in a buffer specified by the caller, and so FMT_VS() and
  FMT_RS() can now be called in either order without one overwriting
  a buffer used by the other.
* Streamline some string formatting with FMT_RS() and FMR_VS().
  Following commit 9fe353d (Fix log output when real server removed)
  some code can be streamlined now that the order of calling FMT_VS()
  and FMT_RS() does not matter.
* Replace FMT_HTTP_RS(), FMT_TCP_RS() and FMT_DNS_RS() with FMT_CHK().
  They were all simply defined to be FMT_CHK() so just replace them
  with that. This made it much simpler to find all used of FMT_CHK().
* Fix building with gcc 4.4.7 (Centos 6.5).
  gcc v4.4.7 doesn't support -Wfloat-conversion, so check for it at
  configure time.
* Add dumping checker config/status when receive SIGUSR1.
* Don't put alpha mode checkers into failed state at reload
  If a new checker is added at a reload, unless the real server aleady
  has failed checkers, then ignore the alpha mode of the checker. This
  means that the real server, if up, won't be taken down and then brought
  back up again almost straight away. If the real server already has
  failed checkers, then setting an alpha mode checker down initially
  won't take down the real server, so we can allow the alpha mode setting
  to apply.
* Handle alpha mode checkers initial failure at startup better.
* Fix compile failure discovered by Travis-CI.
* Fix calling syslog when not using signalfd().
  Pull request #1149 identified that syslog is AS-Unsafe (see signal-safety
  man page), and that therefore signals should be blocked when calling it.
  This commit blocks signals when calling syslog()/vsyslog() when signalfd()
  is not being used.
* Rationalise function attributes.
* Fix enable-optimise configure option.
* Use AS_HELP_STRING for all options in configure.ac.
* Streamline genhash -h option.
* Make genhash -v version match keepalived.
* Fix config check of virtual server quorum against weights of real
  servers.
* Fix some configure tested checks for OPENSSL_init_crypto.
* Add infrastructure for adding additional compiler warnings.
* Add standard and extra compiler warnings.
* Add and resolve missing-declarations and missing-prototypes warnings
  Approximately 16 additional functions are now declared static.
* Add and resolve old-style-definitions warnings
* Add and resolve redundant-decls warnings
* Add and resolve jump-misses-init warnings
* Add and resolve shadow warnings
* Add and resolve unsuffixed-float-constants warnings
* Add and resolve suggest-attribute=const warnings
* Add and resolve suggest-attribute=format warnings
* Add and resolve suggest-attribute=malloc warnings
* Add and resolve suggest-attribute=noreturn warnings
* Add and resolve suggest-attribute=pure warnings
* Add and resolve unused-macros warnings
* Add and resolve null-dereference warnings
* Add and resolve float-equal warnings
* Add and resolve stack-protector warnings
* Add and resolve strict-overflow=4 warnings
* Add and resolve pointer-arith warnings
  This particularly includes adding a number of bytes to a void *.
* Add and resolve cast-qual warnings
* Resolve additional warnings identified on Centos 6.5/gcc 4.4.7
* Remove static from zalloc()
* Fix some compiler warnings on Ubuntu Xenial, and add comments re
  others.
* Rename LIST parameters to lst in list_head.h to avoid upper case.
* Fix real server checkers moving from failed to OK on reload.
* add rs judgement in migrate_checkers.
* Detect connection failure in genhash and exit rather than loop.
* Add another function pure attribute.
* Fix sending notifies for vrrp instances at startup when in sync group
  Issue #1155 idenfified that notify scripts for vrrp instance transition
  to backup state when keepalived started up were not being sent if
  the vrrp instance was in a sync group. It was also the case that SNMP
  traps, SMTP alerts and FIFO notifies were not being sent either.
  This commit make keepalived send the initial notifies when the vrrp
  instance is in a sync group.
* Fix building keepalived RPM on Fedora 26.
  For some reason -fPIC is needed when testing for the presence of
  setns().
* Add vrrp_startup_delay configuration option.
  Some systems that start keepalived at boot time need to delay the
  startup of the vrrp instances, due to network interfaces taking
  time to properly come up. This commit adds a global configuration
  option vrrp_startup_delay that delays the vrrp instances starting
  up, for the specified number of seconds.
* Handle checkers properly when reload immediately after startup.
* Streamline some of the SMTP checker code.
* Create separate checker for each host in SMTP_CHECK block
  Having multiple host entries in an SMTP_CHECK block is deprecated.
  This commit streamlines the SMTP_CHECK code by creating a separate
  SMTP checker for each host declared in the SMTP_CHECK block, so that
  apart from parsing the configuration, the code no longer handles
  multiple hosts per checker.
  The support for parsing configuration with multiple hosts is only
  enabled if WITH_HOST_ENTRIES is defined in check_smtp.c. It is
  currently enabled, but when support for multiple hosts in the
  SMTP_CHECK block is finally removed, it will simply be a matter of
  deleting all code in the WITH_HOST_ENTRIES conditional blocks.
* Make checker fail if ENETUNREACH returned by connect().
  The connect() call can return some immediate errors such as ENETUNREACH.
  These were not being treated as a failure of the checker, since the code
  used to assume that any non success return by connect() meant that the
  connection was in progress.
  keepalived will now treat ENETUNREACH, EHOSTUNREACH, ECONNREFUSED,
  EHOSTDOWN, ENETDOWN, ECONNRESET, ECONNABORTED, ETIMEDOUT, when returned
  by connect(), as meaning that the checker has failed.
* Don't set SO_LINGER with a timeout of 0
  SO_LINGER with a timeout of 0 causes a TCP connection to be reset
  rather than cleanly closed. Instead of specifying a timeout of 0,
  use 5 seconds, so that there is an orderly shutdown of the TCP
  connection, but the close socket doesn't remain in TIMED_WAIT state
  for more than a short time.
* nftables: fix build with kernel lower than 4.1.
* Remove dead code and cosmectics.
  Remove code marked as UNUSED where things simply go nowhere even if
  define is set. We keep for the moment UNUSED code related to debug
  helpers used during coding process.

更新日誌:http://www.keepalived.org/changelog.html

相關焦點

  • 黑馬程式設計師:keepalived實現雙機熱備
    下載keepalived :說明:目前在CentOS7上安裝需要1.3.2以上版本,否則會出現一個作業系統內核錯誤,不好搞定,建議使用root用戶安裝2. 解壓keepalived :tar -xvf keepalived-1.3.4.tar.gz3. .
  • 搭建高可用負載均衡器: haproxy+keepalived
    2.2 主機配置2.2.1 所有主機上關閉防火牆systemctl stop firewalldsystemctl disable firewalld2.2.2 所有主機關閉selinuxsetenforce 0vi /etc/selinux/configSELINUX=disabled2.3 安裝haproxy和keepalivedlb1和
  • 在計算機軟體領域 C語言之父和Linux之父誰更偉大
    9月1號 : Linux 0.01在網上發布。 1992 1月5號 : Linux v0.12 release 版本的內核重新以GUN GPL的協議發布。原來的許可證是禁止任何商業用途的。通過這次協議變更,發布和出售修改或未修改版的Linux成為了可能,只要你將這些複製版本以相同的GPL許可證發布,並且有相對應完整的原始碼。
  • C語言怎麼樣?今天聊聊C語言的發展史!
    4.4 Unix與C語言 從C語言在Unix V2版本出現之後,Unix的V3版本開始,已經可以在Unix內核中見到大量C語言編寫的代碼。 據裡奇所說:到1973年初,現代C的基本知識已經完成。
  • 單片機C語言程序設計:INT0 中斷計數
    ;if(DSY_Buffer[2]==0)   //高位為 0 時不顯示{DSY_Buffer[2]=0x0a;                          if(DSY_Buffer[1]==0) //高位為 0,若第二位為 0 同樣不顯示                         DSY_Buffer
  • 摘要:編寫第一個NDK,使用C語言進行輸出。
    編寫第一個NDK,使用C語言進行輸出。新建一個android工程JniTest。右鍵項目->Android tools->Add Native Support...,填寫生成庫的名稱,會在項目目錄下生成jni文件夾和obj文件夾。
  • C語言程序設計試題及答案
    A) 1 B) 2 C) 2.0 D) 2.57、下面屬於合法的C語言長整型常量的是( )。A) 'a'&&'b' B) a<=b C) a||b+c&&b-c D) !((a<b)&&!c||1)14、設有數組定義:char array[]=「student」;則數組所佔的存貯空間為( )。
  • C語言之父和Linux之父誰更偉大?
    9月1號 : Linux 0.01在網上發布。 1992 1月5號 : Linux v0.12 release 版本的內核重新以GUN GPL的協議發布。原來的許可證是禁止任何商業用途的。通過這次協議變更,發布和出售修改或未修改版的Linux成為了可能,只要你將這些複製版本以相同的GPL許可證發布,並且有相對應完整的原始碼。
  • C語言程序設計試題與答案B卷
    A)a[2][4] B)a[1,3]   C)a[2][2]   D)a(2)(1)16、對do-while語言錯誤的說法是( )。A)可構成多重循環結構 B)循環次數不可能為0C)循環次數可能為0 D)先執行後判斷17、設int x=1,a=9,b=6,c=7,d=8;則執行語句:if(a>b) if(c>d)x=2;else x=3; 後,x的值是( )。
  • ICEREST 1.0.1.2 發布,RESTful 路由框架
    ICEREST 1.0.1.2 發布了,ICEREST是一個非常輕量級只有200k左右的RESTful路由框架,通過ICEREST
  • CCSA TC618/NGOF發布WSON2.0技術白皮書
    白皮書由NGOF大容量WDM工作組組織編寫,主要參與編寫單位包括中國電信、中國聯通、中國移動、中國信息通信研究院、華為、烽火、中興、上海諾基亞貝爾。會上,白皮書的主要編輯者之一、來自中國電信研究院的高級工程師唐建軍博士對白皮書做了深度解讀。
  • C/C++的起源與發展故事,我是最牛的軟體程式語言,不接受反駁
    C語言和C++語言之所以被稱為經典,是因為Windows、Linux、UNIX、DOS四大作業系統的核心代碼大部分是使用C和C++編寫;之所以說堅挺,是因為當前軟體領域採用的程式語言中,這兩種語言基本上長期處於TOP 10的序列。所以可以說這兩種語言是最牛的程式語言。對於C語言的誕生和起源,可以說是偶然中的必然。
  • 自考「C語言程序設計」模擬試題十一
    C.6   D.8  3.在C語言中,合法的長整型常數是(   )  A.0L  B.4962710   C.0.054838743   D.2.1869 e10  4.執行語句「x=(a=3,b=a——)」後,x,a,b的值依次是(   )  A.3,3,2   B.3,2,2   C.3,2,3   D.2,3,2  5.設有語句
  • ARM中ADS環境下C語言和彙編語言混合編程及示例
    稍大規模的嵌入式程序設計中,大部分的代碼都是用C來編寫的,主要是因為C語言具有較強的結構性,便於人的理解,並且具有大量的庫支持。但對於一寫硬體上的操作,很多地方還是要用到彙編語言,例如硬體系統的初始化中的CPU 狀態的設定,中斷的使能,主頻的設定,RAM控制參數等。
  • 編寫C語言程序時會有哪些常見錯誤?
    【標點符號】1、在編寫程序時,如果出現中文標點,編譯器會報錯;2、每一行代碼末尾需要有一個分號「;」;3、使用注釋時,一定要成對使用;【大、小寫】1、在C語言中是區分大小寫的。例如:我們寫的main函數,如果要是改成大寫Main這種形式,是行不通的,如圖3-6-1所示:2、在C語言裡,文件命名一定要是英文的。
  • 基於CGI的無線路由中簡訊功能設計
    針對嵌入式無線路由的迅速普及,為實現良好人機互動,提出將短消息功能植入可使用上網卡的無線路由的動態Web中。用C語言進行CGI程序設計,採用PDU簡訊模式,實現無線路由設備中簡訊的收發。實驗結果也證實了此方案的正確性、實用性和可擴展性。
  • 單片機常用的14個C語言算法
    例如: 求 m="14" ,n=6 的最大公約數. m n r 14 6 2 6 2 0 void main() { int nm,r,n,m,t; printf("please input two numbers:\n"); scanf("%d,%d",&m,&n); nm=n*m; if (m<n)
  • 二級c語言考試改革_計算機二級考試c語言考試題型 - CSDN
    教育招生考試院的官網上在12月10日已經發布了明年3月份計算機等級考試的通告。網站:http://chaxun.neea.edu.cn三、計算機二級考試的簡介以及C語言的試題分析1、計算機二級考試是全國計算機等級考試(National Computer Rank Examination,簡稱NCRE)四個等級中的一個等級,考核計算機基礎知識和使用一種高級計算機語言編寫程序以及上機調試的基本技能。計算機二級考試採用全國統一命題、統一考試的形式。
  • 「C語言從入門到入土」必備C語言基礎筆記整理
    彙編語言——>B語言——>C語言2、C語言的特性首先C語言就是你的女朋友。無論你讓它幹什麼,它絕對不會自己找到方法。,PI); //PI相當於一個常量 return 0;}四、運算符和表達式1、C語言常見運算符(1)算術運算符(+ - * / %)(2)關係運算符(>,&