Skip to content

Commit

Permalink
Merge branch 'master' into change_license_mit
Browse files Browse the repository at this point in the history
  • Loading branch information
kayoub5 committed Jan 4, 2024
2 parents 10fe375 + f7022f0 commit 9573375
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Test/Tunneling/TunnelDeviceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using SharpPcap.LibPcap;
using SharpPcap.Tunneling;
using System;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.NetworkInformation;
Expand Down Expand Up @@ -83,7 +84,14 @@ public void TestUdpTunnel()
var nic = TunnelDevice.GetTunnelInterfaces().First();
using var tapDevice = GetTunnelDevice(nic);
// Open TAP device first to ensure the virutal device is connected
tapDevice.Open(DeviceModes.Promiscuous);
try
{
tapDevice.Open(DeviceModes.Promiscuous);
}
catch (SystemException ex)
{
Assert.Fail(ex.Message);
}
var tapIp = IpHelper.GetIPAddress(nic);

using var tester = new UdpTester(tapIp);
Expand Down

0 comments on commit 9573375

Please sign in to comment.