Hi. Use the SO_MARK option in the your application and -j CONNMARK --save-mark at mangle/OUTPUT. 2015-08-25 22:14 GMT+03:00 David Hinkle <hinkle@xxxxxxxxxxxxxx>: > I want to be able to set the connmark on a socket controlled by my > application from user space. Is there an API to do that already? > > I have been reviewing the kernel code and I can't seem to find one. > If there isn't, what would be your recommendation on the path to take > to implement such an option? It looks like setsockopt shouldn't be > too hard to extend. I guess extending ioctl or fcntl would be my > other options? But I see at least one place where getsockopt already > interacts with conntrack data, handling SO_ORIGINAL_DST. > > Advice, docs, and suggestions greatly appreciated. Thank you for your time. > > - David > -- > To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Anton. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html