PDA

View Full Version : 14.04, netlink_diag kernel module



jjj3
April 25th, 2014, 05:13 PM
How can I download, build, and install the "netlink_diag" kernel module? I've never done with workflow before.

Here are some dumps that describe my system:

ubuntu@ip-10-118-238-44:/lib/modules/3.13.0-24-generic/kernel$ find . -name "*diag*"
./net/dccp/dccp_diag.ko
./net/ipv4/udp_diag.ko
./net/ipv4/inet_diag.ko
./net/ipv4/tcp_diag.ko


ubuntu@ip-10-118-238-44:~$ lsmod
Module Size Used by
dccp_diag 12596 0
dccp 73756 1 dccp_diag
udp_diag 12801 0
tcp_diag 12591 0
inet_diag 18543 3 tcp_diag,dccp_diag,udp_diag
isofs 39835 0
dm_crypt 23177 0


linux-headers-3.13.0-24 linux-headers-3.13.0-24-generic
ubuntu@ip-10-118-238-44:/usr/src$ find . -name "*diag*"
./linux-headers-3.13.0-24-generic/include/config/packet/diag.h
./linux-headers-3.13.0-24-generic/include/config/unix/diag.h
./linux-headers-3.13.0-24-generic/include/config/netlink/diag.h
./linux-headers-3.13.0-24-generic/include/config/inet/diag.h
./linux-headers-3.13.0-24-generic/include/config/inet/dccp/diag.h
./linux-headers-3.13.0-24-generic/include/config/inet/tcp/diag.h
./linux-headers-3.13.0-24-generic/include/config/inet/udp/diag.h
./linux-headers-3.13.0-24-generic/include/linux/sock_diag.h
./linux-headers-3.13.0-24-generic/include/linux/inet_diag.h
./linux-headers-3.13.0-24/include/uapi/linux/unix_diag.h
./linux-headers-3.13.0-24/include/uapi/linux/netlink_diag.h
./linux-headers-3.13.0-24/include/uapi/linux/sock_diag.h
./linux-headers-3.13.0-24/include/uapi/linux/packet_diag.h
./linux-headers-3.13.0-24/include/uapi/linux/inet_diag.h
./linux-headers-3.13.0-24/include/linux/sock_diag.h
./linux-headers-3.13.0-24/include/linux/inet_diag.h
./linux-headers-3.13.0-24/arch/s390/include/asm/diag.h

Doug S
April 25th, 2014, 08:10 PM
It is there by default on my system. I do not know why it is not on your system.
doug@s15:~$ ls -l /lib/modules/3.13.0-24-generic/kernel/net/netlink
total 12
-rw-r--r-- 1 root root 8404 Apr 10 13:13 netlink_diag.ko
doug@s15:~$ grep -i netlink_diag /boot/config-3.13.0-24-generic
CONFIG_NETLINK_DIAG=m
doug@s15:~$ uname -a
Linux s15 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

jjj3
April 25th, 2014, 09:11 PM
My question is more about how to install it if it is not there for some reason.

My VM image doesn't have everything for some reason.

Doug S
April 26th, 2014, 08:18 AM
My VM image doesn't have everything for some reason.Why not? In my opinion that is the root question here. It should be there. Try re-installing the kernel, Example (also on a VM):
doug@serv-tt:~$ doug@serv-tt:~$ sudo rm /lib/modules/3.13.0-24-generic/kernel/net/netlink/netlink_diag.ko <<< First I delete the module
doug@serv-tt:~$ ls -l /lib/modules/3.13.0-24-generic/kernel/net/netlink/netlink_diag.ko
ls: cannot access /lib/modules/3.13.0-24-generic/kernel/net/netlink/netlink_diag.ko: No such file or directory <<< And check it is gone.
doug@serv-tt:~$ sudo apt-get install --reinstall linux-image-extra-3.13.0-24-generic <<< Then I re-install the kernel
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/36.6 MB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 186066 files and directories currently installed.)
Preparing to unpack .../linux-image-extra-3.13.0-24-generic_3.13.0-24.46_amd64.deb ...
Unpacking linux-image-extra-3.13.0-24-generic (3.13.0-24.46) over (3.13.0-24.46) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-24-generic /boot/vmlinuz-3.13.0-24-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-24-generic /boot/vmlinuz-3.13.0-24-generic
Setting up linux-image-extra-3.13.0-24-generic (3.13.0-24.46) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Not updating initrd symbolic links since we are being updated/reinstalled
(3.13.0-24.46 was configured last, according to dpkg)
Not updating image symbolic links since we are being updated/reinstalled
(3.13.0-24.46 was configured last, according to dpkg)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-24-generic /boot/vmlinuz-3.13.0-24-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-24-generic /boot/vmlinuz-3.13.0-24-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-24-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.13.0-24-generic /boot/vmlinuz-3.13.0-24-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.13.0-24-generic /boot/vmlinuz-3.13.0-24-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.13.0-24-generic
Found initrd image: /boot/initrd.img-3.13.0-24-generic
Found linux image: /boot/vmlinuz-3.13.0-23-generic
Found initrd image: /boot/initrd.img-3.13.0-23-generic
Found linux image: /boot/vmlinuz-3.13.0-14-generic
Found initrd image: /boot/initrd.img-3.13.0-14-generic
Found linux image: /boot/vmlinuz-3.12.0-7-generic
Found initrd image: /boot/initrd.img-3.12.0-7-generic
Found linux image: /boot/vmlinuz-3.12.0-2-generic
Found initrd image: /boot/initrd.img-3.12.0-2-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
doug@serv-tt:~$ ls -l /lib/modules/3.13.0-24-generic/kernel/net/netlink/netlink_diag.ko <<< Then check if the module is now there.
-rw-r--r-- 1 root root 8404 Apr 10 13:13 /lib/modules/3.13.0-24-generic/kernel/net/netlink/netlink_diag.ko <<< It is.