Skip to content

core: check for online status in pong handler#311

Merged
kp-mariappan-ramasamy merged 1 commit into
mainfrom
cvpn-2310-fix-ping-handler
Nov 17, 2025
Merged

core: check for online status in pong handler#311
kp-mariappan-ramasamy merged 1 commit into
mainfrom
cvpn-2310-fix-ping-handler

Conversation

@kp-mariappan-ramasamy
Copy link
Copy Markdown
Contributor

Description

Add a ONLINE check for pong handler

Motivation and Context

Avoid handling pong for non-online connections

How Has This Been Tested?

manual test by modifying client code

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • The correct base branch is being used, if not main

@kp-mariappan-ramasamy kp-mariappan-ramasamy requested a review from a team as a code owner November 17, 2025 06:58
@github-actions
Copy link
Copy Markdown

Code coverage summary for ba6e05b:

Filename                                                     Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
lightway-app-utils/src/args/cipher.rs                              5                 5     0.00%           1                 1     0.00%           5                 5     0.00%           0                 0         -
lightway-app-utils/src/args/connection_type.rs                     5                 5     0.00%           1                 1     0.00%           5                 5     0.00%           0                 0         -
lightway-app-utils/src/args/duration.rs                           19                15    21.05%           4                 3    25.00%          12                 9    25.00%           0                 0         -
lightway-app-utils/src/args/ip_map.rs                             19                19     0.00%           3                 3     0.00%          13                13     0.00%           0                 0         -
lightway-app-utils/src/args/logging.rs                            23                23     0.00%           2                 2     0.00%          16                16     0.00%           0                 0         -
lightway-app-utils/src/codec_ticker.rs                           140                17    87.86%          17                 4    76.47%          88                11    87.50%           0                 0         -
lightway-app-utils/src/connection_ticker.rs                      228                24    89.47%          28                 4    85.71%         125                15    88.00%           0                 0         -
lightway-app-utils/src/dplpmtud_timer.rs                         212                16    92.45%          22                 4    81.82%         117                11    90.60%           0                 0         -
lightway-app-utils/src/event_stream.rs                            19                 0   100.00%           3                 0   100.00%          11                 0   100.00%           0                 0         -
lightway-app-utils/src/sockopt/ip_mtu_discover.rs                 78                78     0.00%           6                 6     0.00%          68                68     0.00%           0                 0         -
lightway-app-utils/src/sockopt/ip_pktinfo.rs                      14                14     0.00%           1                 1     0.00%          16                16     0.00%           0                 0         -
lightway-app-utils/src/tun.rs                                    281               281     0.00%          31                31     0.00%         175               175     0.00%           0                 0         -
lightway-app-utils/src/utils.rs                                   21                21     0.00%           1                 1     0.00%          11                11     0.00%           0                 0         -
lightway-client/src/args.rs                                       35                14    60.00%           2                 1    50.00%          17                 8    52.94%           0                 0         -
lightway-client/src/dns_manager.rs                                16                16     0.00%           3                 3     0.00%          11                11     0.00%           0                 0         -
lightway-client/src/io/inside/tun.rs                              78                78     0.00%          11                11     0.00%          57                57     0.00%           0                 0         -
lightway-client/src/io/outside/tcp.rs                             80                80     0.00%          11                11     0.00%          48                48     0.00%           0                 0         -
lightway-client/src/io/outside/udp.rs                            117               117     0.00%          13                13     0.00%          70                70     0.00%           0                 0         -
lightway-client/src/keepalive.rs                                 808                64    92.08%          67                 8    88.06%         435                32    92.64%           0                 0         -
lightway-client/src/lib.rs                                       774               638    17.57%          56                45    19.64%         535               445    16.82%           0                 0         -
lightway-client/src/main.rs                                      171               171     0.00%          11                11     0.00%         137               137     0.00%           0                 0         -
lightway-client/src/platform/linux/dns_manager.rs                144                64    55.56%          16                 6    62.50%          94                40    57.45%           0                 0         -
lightway-client/src/route_manager.rs                            1008               213    78.87%          63                 7    88.89%         550               115    79.09%           0                 0         -
lightway-core/src/borrowed_bytesmut.rs                           378                 1    99.74%          24                 0   100.00%         189                 1    99.47%           0                 0         -
lightway-core/src/builder_predicates.rs                           24                12    50.00%           4                 2    50.00%          24                12    50.00%           0                 0         -
lightway-core/src/cipher.rs                                       13                 0   100.00%           2                 0   100.00%          10                 0   100.00%           0                 0         -
lightway-core/src/connection.rs                                 1266               636    49.76%          57                22    61.40%         878               416    52.62%           0                 0         -
lightway-core/src/connection/builders.rs                         230                47    79.57%          21                 8    61.90%         241                53    78.01%           0                 0         -
lightway-core/src/connection/dplpmtud.rs                        1738                95    94.53%          63                 0   100.00%         811                 9    98.89%           0                 0         -
lightway-core/src/connection/fragment_map.rs                     380                15    96.05%          25                 0   100.00%         258                 7    97.29%           0                 0         -
lightway-core/src/connection/io_adapter.rs                       528                26    95.08%          34                 5    85.29%         275                21    92.36%           0                 0         -
lightway-core/src/connection/key_update.rs                        34                13    61.76%           5                 0   100.00%          38                19    50.00%           0                 0         -
lightway-core/src/context.rs                                     193                39    79.79%          25                 7    72.00%         201                40    80.10%           0                 0         -
lightway-core/src/context/ip_pool.rs                               8                 3    62.50%           1                 0   100.00%           5                 0   100.00%           0                 0         -
lightway-core/src/context/server_auth.rs                          35                27    22.86%           4                 3    25.00%          24                20    16.67%           0                 0         -
lightway-core/src/encoding_request_states.rs                       3                 0   100.00%           1                 0   100.00%           3                 0   100.00%           0                 0         -
lightway-core/src/io.rs                                           10                10     0.00%           3                 3     0.00%           9                 9     0.00%           0                 0         -
lightway-core/src/lib.rs                                          20                11    45.00%           4                 1    75.00%          18                 9    50.00%           0                 0         -
lightway-core/src/metrics.rs                                      37                37     0.00%          15                15     0.00%          33                33     0.00%           0                 0         -
lightway-core/src/packet.rs                                       38                10    73.68%           4                 1    75.00%          30                 6    80.00%           0                 0         -
lightway-core/src/plugin.rs                                      304                13    95.72%          21                 3    85.71%         145                 7    95.17%           0                 0         -
lightway-core/src/utils.rs                                       339                31    90.86%          22                 2    90.91%         165                17    89.70%           0                 0         -
lightway-core/src/version.rs                                      94                 0   100.00%          17                 0   100.00%          82                 0   100.00%           0                 0         -
lightway-core/src/wire.rs                                        426                35    91.78%          28                 0   100.00%         225                 7    96.89%           0                 0         -
lightway-core/src/wire/auth_failure.rs                            27                 1    96.30%           3                 0   100.00%          17                 0   100.00%           0                 0         -
lightway-core/src/wire/auth_request.rs                           472                12    97.46%          26                 0   100.00%         241                 0   100.00%           0                 0         -
lightway-core/src/wire/auth_success_with_config_ipv4.rs          223                 4    98.21%          11                 0   100.00%         124                 0   100.00%           0                 0         -
lightway-core/src/wire/data.rs                                    52                 1    98.08%           5                 0   100.00%          34                 0   100.00%           0                 0         -
lightway-core/src/wire/data_frag.rs                              131                 1    99.24%          14                 0   100.00%          82                 0   100.00%           0                 0         -
lightway-core/src/wire/encoding_request.rs                        82                 2    97.56%           6                 0   100.00%          42                 1    97.62%           0                 0         -
lightway-core/src/wire/encoding_response.rs                       82                 2    97.56%           6                 0   100.00%          42                 1    97.62%           0                 0         -
lightway-core/src/wire/ping.rs                                    96                 3    96.88%           7                 0   100.00%          59                 0   100.00%           0                 0         -
lightway-core/src/wire/pong.rs                                    58                 2    96.55%           5                 0   100.00%          31                 0   100.00%           0                 0         -
lightway-core/src/wire/server_config.rs                           69                 2    97.10%           4                 0   100.00%          37                 0   100.00%           0                 0         -
lightway-server/src/auth.rs                                      282                55    80.50%          22                 6    72.73%         171                28    83.63%           0                 0         -
lightway-server/src/connection.rs                                129               129     0.00%          11                11     0.00%         105               105     0.00%           0                 0         -
lightway-server/src/connection_manager.rs                        334               334     0.00%          38                38     0.00%         268               268     0.00%           0                 0         -
lightway-server/src/connection_manager/connection_map.rs         409                18    95.60%          21                 1    95.24%         228                 7    96.93%           0                 0         -
lightway-server/src/io/inside/tun.rs                              44                44     0.00%           9                 9     0.00%          30                30     0.00%           0                 0         -
lightway-server/src/io/outside/tcp.rs                             90                90     0.00%           9                 9     0.00%          65                65     0.00%           0                 0         -
lightway-server/src/io/outside/udp.rs                            320               320     0.00%          16                16     0.00%         204               204     0.00%           0                 0         -
lightway-server/src/io/outside/udp/cmsg.rs                       182                47    74.18%          14                 5    64.29%         160                44    72.50%           0                 0         -
lightway-server/src/ip_manager.rs                                550                58    89.45%          22                 4    81.82%         247                28    88.66%           0                 0         -
lightway-server/src/ip_manager/ip_pool.rs                        542                 1    99.82%          27                 0   100.00%         252                 0   100.00%           0                 0         -
lightway-server/src/lib.rs                                       254               254     0.00%          13                13     0.00%         166               166     0.00%           0                 0         -
lightway-server/src/main.rs                                      219               219     0.00%          10                10     0.00%         112               112     0.00%           0                 0         -
lightway-server/src/metrics.rs                                   250               246     1.60%          82                80     2.44%         208               204     1.92%           0                 0         -
lightway-server/src/statistics.rs                                138                62    55.07%           8                 4    50.00%          89                37    58.43%           0                 0         -
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                          15428              4941    67.97%        1142               455    60.16%        9294              3304    64.45%           0                 0         -

✅ Region coverage 67% passes
✅ Line coverage 64% passes

@kp-mariappan-ramasamy kp-mariappan-ramasamy merged commit be06a46 into main Nov 17, 2025
19 checks passed
@kp-mariappan-ramasamy kp-mariappan-ramasamy deleted the cvpn-2310-fix-ping-handler branch November 17, 2025 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants