Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Single subnet mode not working correctly
05-11-2017, 09:26 PM
Post: #1
Single subnet mode not working correctly
I'm sorry to say that the patch I submitted in this post is incorrect. It selects the correct adapter(s) when ohNet starts, but things go wrong when there is a change to the adapter configuration.

The code in line 116 of DviServer.cpp should be similar to the code in lines 104-107 but it isn't. This can cause additional adapters to be added that should be excluded by the single subnet setting. Similarly, the code in line 178 of DviProtocolUpnp.cpp should be similar to the code in lines 162-165 for the same reason.

It is easy to demonstrate the problem by doing the following:

1) Start ohNet on a machine with adapters A, B and C (on different subnets) with a single subnet setting for adapter A
2) ohNet advertises and listens (correctly) on adapter A only
3) Disable adapter B
4) ohNet advertises and listens (incorrectly) on adapters A and C
5) Enable adapter B
6) ohNet advertises and listens (incorrectly) on adapters A, B and C

This can cause problems when there are some adapters that are not suitable for use by ohNet and would cause ohNet to crash if they were not excluded. For example, this can happen with some VPN adapters.

I am attaching a patch to fix this problem. I have checked it very carefully and I have tested it on 1.17.2735 and I am sure that it is correct.


Attached File(s)
.zip  singlesubnet.zip (Size: 998 bytes / Downloads: 1)
Find all posts by this user
15-11-2017, 02:18 PM
Post: #2
RE: Single subnet mode not working correctly
Thanks for the patch. I've applied it now.
Find all posts by this user
15-11-2017, 05:43 PM
Post: #3
RE: Single subnet mode not working correctly
Many thanks and apologies again for my oversight with the initial patch!
Find all posts by this user


Forum Jump: