coova / coova-chilli

CoovaChilli is an open-source software access controller for captive portal hotspots.
Other
512 stars 258 forks source link

tun/tap can't pass TCP/ICMP packet with xt_coova after authentication #574

Open wp1411847064 opened 12 months ago

wp1411847064 commented 12 months ago

Before the authentication, I can be redirect to the splash page, and I can PING the gateway (10.1.0.1), but after the authentication, I can’t access the Internet, and i can’t PING the gateway (10.1.0.1) either.

It is found that the ICMP/TCP packet is lost without querying the routing table after PREROUTING, and it does not reach FORWARD, but the UDP packet can pass FORWARD, and at the same time the pout of [mac=30-03-C8-3F-26-23 src=10.1.0.3 state=1 bin=12314 bout=0 pin=141 pout=0] is 0.

If I comment the code [return 1;] , I can go online

ifdef HAVE_NETFILTER_COOVA

  if (_options.kname) {
    if (conn->peer) {
      appconn = (struct app_conn_t *)conn->peer;
      appconn->s_state.last_up_time =
          appconn->s_state.last_time = mainclock_now();
    }
    //return 1;//don't return ,call tun_encaps to send packets to the tun/tap
  }

endif

but I think it will not be accelerated by xt_coova.

the linux kernel version is 3.10.14, and there is no such problem on the linux kernel version 4.4.60 can someone help?