Fix setting DSCP value for IKE packets on FreeBSD
When setting up DSCP on a connection under FreeBSD, DSCP is not applied on IKE packet :
Apr 19 09:43:41 04[NET] sending packet: from 192.168.1.2 to 192.168.1.1 Apr 19 09:43:41 04[NET] unable to set IP_TOS on socket: Invalid argument
In src/libcharon/plugins/socket_default/socket_default_socket.c the call to setsockopt() should be tweaked a little to make it work under FreeBSD.
You can find attached a patch solving the problem.
#1 Updated by Tobias Brunner about 1 year ago
- Tracker changed from Issue to Bug
- Subject changed from DSCP does not work on FreeBSD to Fix setting DSCP value for IKE packets on FreeBSD
- Category changed from libcharon to freebsd
- Status changed from New to Closed
- Assignee set to Tobias Brunner
- Target version set to 5.8.0
- Resolution set to Fixed
Thanks for the patch. I pushed a fix to master (since
SOL_IP(V6) are appropriately defined already if missing, and
u_int are the same size, the only actual issue was the type/size mismatch of