Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kamailio 4.4.x: Warning from core for TOS #598

Closed
dunst0 opened this issue May 4, 2016 · 7 comments
Closed

kamailio 4.4.x: Warning from core for TOS #598

dunst0 opened this issue May 4, 2016 · 7 comments

Comments

@dunst0
Copy link
Contributor

dunst0 commented May 4, 2016

While testing the kamailio version 4.4.x on FreeBSD I found this in the log.

May  4 17:16:26 <local0.warn> voip-integration-cust1 kamailio[1145]: WARNING: <core> [tcp_main.c:2754]: tcp_init(): setsockopt tos: Invalid argument
# freebsd-version 
10.3-RELEASE
version: kamailio 4.4.0 (amd64/freebsd) d4f23c
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_PTHREAD_MUTEX, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, select, kqueue.
id: d4f23c 
compiled on 16:52:24 Apr 30 2016 with clang 3.4

In my config I haven't set any TOS

@miconda
Copy link
Member

miconda commented May 5, 2016

Default value is set to IPTOS_LOWDELAY, this should be defined on bsd -- otherwise should not compile. What version of BSD do you run?

miconda added a commit that referenced this issue May 5, 2016
@dunst0
Copy link
Contributor Author

dunst0 commented May 9, 2016

I run FreeBSD 10.3-RELEASE.

miconda added a commit that referenced this issue May 9, 2016
- to help with GH #598

(cherry picked from commit 0118338)
@miconda
Copy link
Member

miconda commented May 10, 2016

Are you using IPv6? Some searches on the net reveal other projects having same error reported for IP_TOS if the socket is IPv6.

@dunst0
Copy link
Contributor Author

dunst0 commented May 10, 2016

yes but only with loopback at the moment

#!substdef  "/NETWORK_INTERFACE_IPv6/[::1]/"
listen=NETWORK_INTERFACE_IPv6:5060

@dunst0
Copy link
Contributor Author

dunst0 commented May 12, 2016

lastest master

 0(30442) WARNING: <core> [tcp_main.c:2754]: tcp_init(): setsockopt tos: Invalid argument (16)

Then I removed the IPv6 listening and the TOS warning disapared.

@miconda
Copy link
Member

miconda commented May 12, 2016

Thanks for pursuing this. It looks like we need to skip setting this sock option for ipv6.

miconda added a commit that referenced this issue May 30, 2016
@miconda
Copy link
Member

miconda commented May 30, 2016

Added setting of IPV6_TCLASS option for IPv6 sockets, the alternative for ipv4 IP_TOS.

If any issue, open a bug for it. The patch will be backported soon.

@miconda miconda closed this as completed May 30, 2016
miconda added a commit that referenced this issue Jun 27, 2016
miconda added a commit that referenced this issue Jun 29, 2016
- to help with GH #598

(cherry picked from commit 0118338)
(cherry picked from commit fdeba44)
miconda added a commit that referenced this issue Jun 29, 2016
- reported in GH #598

(cherry picked from commit ff63e5c)
(cherry picked from commit 995d408)
miconda added a commit that referenced this issue Jul 4, 2016
- to help with GH #598

(cherry picked from commit 0118338)
(cherry picked from commit fdeba44)
(cherry picked from commit cf57bee)
miconda added a commit that referenced this issue Jul 4, 2016
- reported in GH #598

(cherry picked from commit ff63e5c)
(cherry picked from commit 995d408)
(cherry picked from commit bf5df06)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants