diff options
| author | yangwei <[email protected]> | 2024-03-25 15:19:48 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2024-03-25 15:20:26 +0800 |
| commit | 134ca507624c3ddf5163f002f1eee1473ee2b228 (patch) | |
| tree | a144e2f8a2418342cfbe5b0a2e2e055860f9b652 | |
| parent | 6bad4730f7a3089ace6072986256865b94a066fb (diff) | |
🐞 fix(inntermost logic upgrade): only judge the outermost GTPv1.0.17
| -rw-r--r-- | src/stellar_on_sapp/stellar_on_sapp.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/stellar_on_sapp/stellar_on_sapp.c b/src/stellar_on_sapp/stellar_on_sapp.c index 9d0096e..1bcc31a 100644 --- a/src/stellar_on_sapp/stellar_on_sapp.c +++ b/src/stellar_on_sapp/stellar_on_sapp.c @@ -28,29 +28,13 @@ int g_streaminfo_exdata_id=-1; static int stream_is_inner_most(struct streaminfo *a_stream) { - const struct streaminfo *pfather=NULL, *ptmp=a_stream; unsigned short tunnel_type=0; int tunnel_type_len=sizeof(unsigned short); MESA_get_stream_opt(a_stream, MSO_STREAM_UP_LAYER_TUNNEL_TYPE, (void *)&tunnel_type, &tunnel_type_len); - if (tunnel_type != STREAM_TUNNLE_NON) // tunnel_type != STREAM_TUNNLE_NON means it is a outer of tunnel + if (tunnel_type&STREAM_TUNNEL_GPRS_TUNNEL) // tunnel_type set STREAM_TUNNEL_GPRS_TUNNEL means it is a outer of GTP tunnel { return 0; } - - while(ptmp) - { - pfather = ptmp->pfather; - switch(ptmp->type) - { - case STREAM_TYPE_SOCKS4: - case STREAM_TYPE_SOCKS5: - case STREAM_TYPE_HTTP_PROXY: - return 0; - default: - break; - } - ptmp = pfather; - } return 1; } |
