Skip to content

Commit 1245f2b

Browse files
Apply patch provided by @rain2fog in #801
pppd → tun interface + embedded PPP code
1 parent 9236ffc commit 1245f2b

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
@@ -832,6 +832,11 @@ static int parse_xml_config(struct tunnel *tunnel, const char *buffer)
832832
if (!gateway)
833833
log_warn("No gateway address, using interface for routing\n");
834834

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

0 commit comments

Comments
 (0)