Dev: new option to mark all tincd socket of a tincd process

Guus Sliepen guus at tinc-vpn.org
Thu Oct 6 14:11:45 CEST 2016


On Wed, Oct 05, 2016 at 07:27:54PM +0200, Olivier Tirat wrote:

> I'd like to mark all sockets established by a tincd process with a mark
> passed as an argument in the command line.
[...]
> Do you think its something interesting?
> Do you think its a hard work to do?
> If not i could probably try to do it and propose a patch for that if you
> think it is interesting.

I think it is relatively easy to do. There are two places in
src/net_socket.c where you would have to call setsockopt() with the
SO_MARK option: configure_tcp() and setup_vpn_in_socket(). The first one
is run for all incoming and outgoing TCP sockets, the second one sets up
the UDP sockets.

Try it out and see if it really allows you to do the mark-based routing
you want. If it works, you can submit a patch or pull request.

-- 
Met vriendelijke groet / with kind regards,
     Guus Sliepen <guus at tinc-vpn.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20161006/8e2f4672/attachment.sig>


More information about the tinc mailing list