0

I want to make a netfilter conntrack module for myself. So I copy all the source code about netfilter conntrack from kernel source tree to my external directory. It can be insmod after compiled. Then I add some members to the struct nf_conn, and it 's compiled successfully. However, it can't be insmod. The system gives me the message " disagrees about version of symbol ...." .

Can anyone help me ?

river
  • 694
  • 6
  • 22
  • I want to have my own conntrack modules without affect the original kernel proceess. The original conntrack module is kept as before. – river Oct 19 '17 at 01:26
  • Structure `nf_conn` you have modified used not only by netfilter conntrack module, but also in [other modules](http://elixir.free-electrons.com/linux/latest/ident/nf_conn). If your module uses functions from those modules, you need to recompile them too. (BTW, the symbol shown in "disagree about version" message probably uses given struct). – Tsyvarev Oct 19 '17 at 16:56
  • Thanks, I have got the solution. I answered myself. – river Oct 20 '17 at 04:10

1 Answers1

0

Just copy the file Module.symvers from directory of the modified conntrack modules to the current developing module. For the same function names , it will be used instead of that provided by kernel source tree.

Or modify the Makefile: obj-y := new_conntrack/ caller/

It will use the new CRC value from new_conntrack/ . https://www.kernel.org/doc/Documentation/kbuild/modules.txt

river
  • 694
  • 6
  • 22