Sending packets from VPN client to VPN server
Hi,
I was wondering if anyone can help me understanding why my code isn't working. I'm working on a project for fun modifying openvpn-2.2.2. What i need help with is this:
I have a packet cached in a buffer structure. And I want the VPN client to send it to the VPN server so it can reach its intended destination.
What i was trying to do is something like this:
struct buffer *buf = cached_buffer;buffer_turnover(buf->data, &c->c2.buf, buf, buf);pocess_incoming_tun(c);process_outgoing_tun(c);
Unfortunately, when I ran Wireshark on the virtual tun of the client I don't see that cached packet.
alternatively, I tried:
struct buffer *buf = cached_buffer;write_tun(c->c1.tuntap, BPTR(buf), BLEN(buf));
in this case I can see the packet in Wireshark but it's never received at the VPN server side.
Any insights or suggestion would be highly appreciated.
Thanks in advance,
Ab