I want to use ipt_netflow with my ubuntu server 10.04.3 LTS,
i've added string
/sbin/modprobe ipt_NETFLOW destination=10.7.19.237:9996
in rc.local, but there is something wrong:
in dmesg i see following messages:
[ 7.070840] ipt_netflow version 1.7.1 (16128 buckets)
[ 7.071180] netflow: registered: /proc/net/stat/ipt_netflow
[ 7.071266] netflow: registered: sysctl net.netflow
[ 7.071312] netflow: error connecting UDP socket -101
[ 7.073574] netflow: remove destination 10.7.19.237:9996 ( (null))
[ 7.073597] ipt_netflow loaded.
in a few seconds i see
[ 7.780403] r8169 0000:01:00.0: eth0: unable to apply firmware patch
[ 7.782240] r8169 0000:01:00.0: eth0: link down
[ 7.782258] r8169 0000:01:00.0: eth0: link down
[ 7.782732] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 7.801313] ADDRCONF(NETDEV_UP): vlan100: link is not ready
[ 7.983556] ADDRCONF(NETDEV_UP): vlan195: link is not ready
[ 8.141814] ADDRCONF(NETDEV_UP): vlan173: link is not ready
[ 8.171537] ADDRCONF(NETDEV_UP): vlan174: link is not ready
[ 9.647723] r8169 0000:01:00.0: eth0: link up
[ 9.648170] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
i thing ipt_netflow want not loads because network device is not ready. isn't?
anyway, there is solution of my problem?
Set destination or load module AFTER network interfaces is up.
module of ethernet adapter was loaded before. i think it initializes device in background and it takes a few seconds.
now i solved this problem executing "sleep 5" before loading ipt_netflow module, but i think that's not so good way
Load module somewhere AFTER setting up network (ip address, routes). Imagine you set up ip address for eth0 but ethernet adapter still initializes in background? Oh not so good!
This is fixed. On connection error module will try to reconnect until success, so now it CAN be loaded BEFORE interfaces.