[sr-dev] [kamailio/kamailio] Kamailio 5.1.x builds without raw socket support due to Makefile error (#1565)

Edwin Fine notifications at github.com
Wed Jun 13 23:02:21 CEST 2018


### Description

Kamailio compiles without raw sockets support, even though `src/Makefile.defs` should enable that by default, according to the Makefile.

### Troubleshooting

Not applicable.

#### Reproduction

Build kamailio on Debian 8.10 Linux using the standard `Makefile.defs`, and add `udp4_raw = 0` to the config file. You should get the warning shown in the log message provided below.

#### Debugging Data

Not applicable

#### Log Messages

```
kamailio[89847]: WARNING: <core> [core/cfg.y:3427]: warn_at(): warning in config file <redacted>, line 66, column 12: raw socket support not compiled in
```

#### SIP Traffic

Not Applicable

### Possible Solutions

This is the solution proposed in PR #1564.

```
diff --git a/src/Makefile.defs b/src/Makefile.defs
index 428a236..3a2480c 100644
--- a/src/Makefile.defs
+++ b/src/Makefile.defs
@@ -1755,7 +1755,7 @@ ifeq ($(OS), linux)
        C_DEFS+=-DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD \
                        -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H \
                        -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER -DHAVE_IP_MREQN
-       ifneq ($(RAW_SOCKS), yes)
+       ifeq ($(RAW_SOCKS), yes)
                C_DEFS+= -DUSE_RAW_SOCKS
        endif
        ifneq ($(found_lock_method), yes)
```

### Additional Information

  * **Kamailio Version** - output of `kamailio -v`

```
version: kamailio 5.1.3 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 4.9.2
```

* **Operating System**:

```
Debian 8.10
Kernel 3.16.0-4-amd64 #1 SMP Debian 3.16.51-3 (2017-12-13) x86_64 GNU/Linux
```


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1565
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20180613/fae2ed93/attachment.html>


More information about the sr-dev mailing list