Date: Tue, 26 Sep 2006 06:26:42 -0400 From: Randall Stewart <rrs@cisco.com> To: Ian FREISLICH <if@hetzner.co.za> Cc: freebsd-current@freebsd.org Subject: Re: Anyone play with divert sockets lately? Message-ID: <45190062.6090306@cisco.com> In-Reply-To: <E1GS6aP-0007pm-Fy@hetzner.co.za> References: <E1GS6aP-0007pm-Fy@hetzner.co.za>
next in thread | previous in thread | raw e-mail | index | archive | help
Ian FREISLICH wrote: > > > I'm using divert sockets extensively for some tunnel/vpn software > I wrote _way_ back. It's running fine on -CURRENT (Tue Sep 19 > 08:33:01 SAST 2006), 4.11-STABLE, and just about everything in > between. I've not had to change the code substantially to make it > work on newer BSDs. All our VoIP goes through this piece of code: > > memset(&from, '\0', sizeof from); > from.sin_addr.s_addr = INADDR_ANY; > from.sin_port = config.tuns[config.tun].fw_rule; > while (tot + ntohs(hdr->length) <= (p - buf + in)) { > out = sendto(config.tuns[config.tun].div_fd, buf + tot, > ntohs(hdr->length), 0, (struct sockaddr *)&from, > sizeof(addr)); > ... > > Well, its interesting ... 6.1 appears to work.. but 7.0 does not.. Now I don't think the code we have does anything with setting the sin_port like you do (to config.tuns[]...) Maybe thats the issue... Not sure... I will have to go back and look at the code :-0 R -- Randall Stewart NSSTG - Cisco Systems Inc. 803-345-0369 <or> 815-342-5222 (cell)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45190062.6090306>