Project

General

Profile

Bug #3030

Fix setting DSCP value for IKE packets on FreeBSD

Added by Jean-Fran├žois Hren 3 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Category:
freebsd
Target version:
Start date:
Due date:
Estimated time:
Affected version:
5.7.2
Resolution:
Fixed

Description

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[500] to 192.168.1.1[500]
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.

ikedscp_freebsd.diff (900 Bytes) ikedscp_freebsd.diff Jean-Fran├žois Hren, 19.04.2019 09:50

Associated revisions

Revision 8da7dbe7 (diff)
Added by Tobias Brunner 3 months ago

socket-default: Fix setting DSCP value on FreeBSD

Fixes #3030.

History

#1 Updated by Tobias Brunner 3 months 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 int and u_int are the same size, the only actual issue was the type/size mismatch of ds4).

Also available in: Atom PDF