Skip to content

Commit 4379a8c

Browse files
Apply patch provided by @rain2fog in #801
pppd → tun interface + embedded PPP code
1 parent a9fdd1a commit 4379a8c

File tree

5 files changed

+1071
-18
lines changed

5 files changed

+1071
-18
lines changed

src/http.c

+5
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,11 @@ static int parse_xml_config(struct tunnel *tunnel, const char *buffer)
834834
if (!gateway)
835835
log_warn("No gateway address, using interface for routing\n");
836836

837+
if (tunnel->use_tun) {
838+
tunnel->ipv4.ip_addr.s_addr = inet_addr(gateway);
839+
tunnel->ipv4.peer_addr.s_addr = inet_addr("192.0.2.1");
840+
}
841+
837842
// The dns search string
838843
val = buffer;
839844
while ((val = xml_find('<', "dns", val, 2))) {

0 commit comments

Comments
 (0)