[sr-dev] rtpengine request don't fragment flag

Juha Heinanen jh at tutpro.com
Mon Jun 29 08:11:28 CEST 2015


as i reported on sr-users list, i noticed that sometimes rtpengine
requests from kamailio set ip header don't fragment flag that causes
icmp error message from a router on the path to rtpengine.  as result,
rtpengine modules things that the rtpengine is dead.

enclosed is an example of such an ip packet.

after i made this kind of patch to rtpengine.c, the flag is not set
anymore:

*** /usr/src/orig/kamailio/modules/rtpengine/rtpengine.c	2015-06-16 12:33:56.497242900 +0300
--- rtpengine.c	2015-06-29 09:03:26.959479313 +0300
***************
*** 1059,1064 ****
--- 1059,1065 ----
  	struct addrinfo hints, *res;
  	struct rtpp_set  *rtpp_list;
  	struct rtpp_node *pnode;
+ 	int ip_mtu_discover = IP_PMTUDISC_DONT;
  
  	if(rtpp_set_list==NULL )
  		return 0;
***************
*** 1121,1126 ****
--- 1122,1131 ----
  				return -1;
  			}
  
+ 			setsockopt(rtpp_socks[pnode->idx], IPPROTO_IP,
+ 				   IP_MTU_DISCOVER, &ip_mtu_discover,
+ 				   sizeof(ip_mtu_discover));
+ 
  			if (bind_force_send_ip(pnode->idx) == -1) {
  				LM_ERR("can't bind socket\n");
  				close(rtpp_socks[pnode->idx]);

any comments on this?

-- juha

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtpengine_offer.pcapng
Type: application/octet-stream
Size: 2428 bytes
Desc: rtpengine_offer.pcapng
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20150629/da60fbe3/attachment.obj>


More information about the sr-dev mailing list