The LINUX_VERSION_CODE is based on the upstream Linux version. In the case of the kernel you're using, it is based on the upstream 4.15.15 stable kernel which is the basis for LINUX_VERSION_CODE.
The version string in uname is the Ubuntu version number. LINUX_VERSION_CODE and the output of uname are not required to be in agreement. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1765048 Title: bionic: LINUX_VERSION_CODE incorrect? Status in linux package in Ubuntu: Confirmed Status in linux source package in Bionic: Confirmed Bug description: In linux/version.h there is a LINUX_VERSION_CODE define. Issue: According to the Keepalived developer(s), the define set in version 4.15.0-15.16, encoded value 265999, is incorrect. Instead of 4.15.0, it reflects 4.15.15. Seen on bionic. See https://github.com/acassen/keepalived/issues/838 , their comments copied here: "Converting 265999 to hex gives 0x40F0F, which means kernel version 4.15.15. This looks like linux/version.h is being incorrectly constructed, or there is a mismatch between the running kernel and the kernel header files." and "The #define LINUX_VERSION_CODE 265999 statement says that the headers are for Linux version 4.15.15, so keepalived is correctly reporting what is in linux/version.h header file. This issue probably needs to be reported to Ubuntu since it looks like the header file they are distributing is incorrect." root@hostname:~/keepalived# dpkg -l | grep linux-headers ii linux-headers-4.13.0-36 4.13.0-36.40 all Header files related to Linux kernel version 4.13.0 ii linux-headers-4.13.0-36-generic 4.13.0-36.40 amd64 Linux kernel headers for version 4.13.0 on 64 bit x86 SMP ii linux-headers-4.13.0-38 4.13.0-38.43 all Header files related to Linux kernel version 4.13.0 ii linux-headers-4.13.0-38-generic 4.13.0-38.43 amd64 Linux kernel headers for version 4.13.0 on 64 bit x86 SMP ii linux-headers-4.15.0-15 4.15.0-15.16 all Header files related to Linux kernel version 4.15.0 ii linux-headers-4.15.0-15-generic 4.15.0-15.16 amd64 Linux kernel headers for version 4.15.0 on 64 bit x86 SMP ii linux-headers-generic 4.15.0.15.16 amd64 Generic Linux kernel headers root@hostname:~/keepalived# root@hostname:~/keepalived# dpkg -S /usr/include/linux/version.h linux-libc-dev:amd64: /usr/include/linux/version.h root@hostname:~/keepalived# dpkg -l | grep linux-libc-dev ii linux-libc-dev:amd64 4.15.0-15.16 root@hostname:~# grep LINUX_VERSION_CODE /usr/include/linux/version.h #define LINUX_VERSION_CODE 265999 # uname -a Linux hostname 4.15.0-15-generic #16-Ubuntu SMP Wed Apr 4 13:58:14 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux Can you please advise if this is the case? Thanks in advance. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1765048/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp