<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello all,<br>
<br>
I would like to change the conntrack mark of a connection using
libnl. I have managed to query and delete connections using the <b>nfnl_ct_query
</b>and <b>nfnl_ct_del </b>functions but I haven't succeeded yet
in modifying a connection. I believe that <b>nfnl_ct_add </b>would
allow me to do this but despide returning NLE_SUCCESS I see no
change in the mark.<br>
<br>
Some of my code:<br>
...<br>
nfnl_ct_set_family ( ct_object, AF_INET ); // IPv4<br>
nfnl_ct_set_proto ( ct_object, 6 ); // TCP<br>
nfnl_ct_set_src ( ct_object, 0, src_addr );<br>
nfnl_ct_set_dst ( ct_object, 0, dest_addr );<br>
nfnl_ct_set_src_port( ct_object, 0, src_port );<br>
nfnl_ct_set_dst_port( ct_object, 0, dst_port );<br>
nfnl_ct_set_mark( ct_object, mark );<br>
nfnl_ct_add(nfnl_conntrack_sock, ct_object,
NLM_F_REQUEST|NLM_F_ACK);<br>
...<br>
<br>
Note that if I use these attributes, except for the mark, in a query
then I receive the connection whose mark I meant to change.<br>
<br>
Any help would be much appreciated.<br>
<br>
Best Regards,<br>
<br>
Stijn<br>
<br>
<br>
<html><body> <span style='font-size:10.0pt;font-family:Arial,sans-serif;color:green'>This message and any attachments herein are confidential, intended solely for the addressees and are SoftAtHome’s ownership. Any unauthorized use or dissemination is prohibited. If you are not the intended addressee of this message, please cancel it immediately and inform the sender.</span></body></html><br>
</body>
</html>