[sr-dev] rtpengine request don't fragment flag
Richard Fuchs
rfuchs at sipwise.com
Mon Jun 29 16:07:46 CEST 2015
On 29/06/15 02:11 AM, Juha Heinanen wrote:
> 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?
Good idea. I'm not sure how well this is supported on other (non-Linux)
Unixes, so it might be advisable to enclose this in #ifdefs.
Cheers
More information about the sr-dev
mailing list