Comment 11 for bug 790679

Revision history for this message
David Martin (martin-lp) wrote :

Your patch works as it makes the pointer point to the struct correctly. It's just that on
exiting it is not yet set up yet and all values initialized to 0 (gcc default for static
structs or all static variables? I'm not sure there). That's why it won't send any messages
with your patch either:

error(hipd/hipd.c:345@hipd_main): hipd_init() failed!
error(lib/tool/nlink.c:279@netlink_talk): Cannot talk to rtnetlinkSocket operation on non-socket
error(lib/tool/xfrmapi.c:382@hip_xfrm_policy_delete): Security policy deletion failed.

And here comes in what Miika and René said. Your patch fixes one wrong call which is nice.
But making netlink_talk() more robust so that it can deal with any wrong call is more reliable.