Hi Andrei,

I recently saw in tcp_options.c:238, that tcp_wq_timeout variable is directly written, which is not really supported by the cfg framework.

The handle to the cfg structure may be only a temporary handle allocated for the shake of the fixup function, and the structure may be freed after the fixup function exists. So the modifications done this way can be lost. This is the case when more than one modifications are made with cfg_set_delated, and tcp_wq_timeout is not the first modification in the list. If tcp_wq_timeout is the first modification in the list, then the shm variable is changed immediately without waiting for the commit action, and the change cannot be reverted.

The preferred way is to rewrite the void** param of the fixup function, and store only a single value in ticks, like in tm module.

Regards,
Miklos
_______________________________________________
Serdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/serdev

Reply via email to