Skip to content

Commit aafcd1b

Browse files
Merge pull request #74 from microsoft/20240820_EthernetParsingIssue
PCAPNG parser fix
2 parents 8158718 + 90ee622 commit aafcd1b

File tree

10 files changed

+11
-7
lines changed

10 files changed

+11
-7
lines changed
1.5 KB
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

SQL_Network_Analyzer/SQLNA/OutputText.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2086,7 +2086,7 @@ private static void DisplayLoginErrors(NetworkTrace Trace)
20862086

20872087
foreach (SQLServer s in Trace.sqlServers)
20882088
{
2089-
if (s.hasLoginFailures)
2089+
if (s.hasLoginFailures || s.hasSynFailure)
20902090
{
20912091
hasError = true;
20922092
List<FailedConnectionData> TimeoutRecords = new List<FailedConnectionData>();
@@ -2103,7 +2103,7 @@ private static void DisplayLoginErrors(NetworkTrace Trace)
21032103

21042104
foreach (ConversationData c in s.conversations)
21052105
{
2106-
if (c.hasLoginFailure)
2106+
if (c.hasLoginFailure || c.hasSynFailure)
21072107
{
21082108
FailedConnectionData td = new FailedConnectionData();
21092109

SQL_Network_Analyzer/SQLNA/PcapNGReader.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ void readInterfaceBlock()
181181
{
182182
OptType = read2Bytes();
183183
OptLen = read2Bytes();
184-
padding = OptLen % 4;
184+
// padding = OptLen % 4;
185+
padding = (OptLen % 4) == 0 ? 0: 4 - (OptLen % 4);
185186

186187
while (OptType != 0)
187188
{
@@ -205,9 +206,12 @@ void readInterfaceBlock()
205206
}
206207
}
207208

209+
if (r.BaseStream.Position >= nextBlockStart - 4) break; // potentially no OptType 0 at end of options, though this is not supposed to happen, the spec seems to allow it
210+
208211
OptType = read2Bytes();
209212
OptLen = read2Bytes();
210-
padding = OptLen % 4;
213+
// padding = OptLen % 4;
214+
padding = (OptLen % 4) == 0 ? 0 : 4 - (OptLen % 4);
211215
}
212216
}
213217

SQL_Network_Analyzer/SQLNA/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("Microsoft: CSS SQL Networking Team")]
1212
[assembly: AssemblyProduct("SQLNA.EXE")]
13-
[assembly: AssemblyCopyright("Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023")]
13+
[assembly: AssemblyCopyright("Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.5.2185.0")]
36-
[assembly: AssemblyFileVersion("1.5.2185.0")]
35+
[assembly: AssemblyVersion("1.5.2194.0")]
36+
[assembly: AssemblyFileVersion("1.5.2194.0")]
2.5 KB
Binary file not shown.
0 Bytes
Binary file not shown.
12.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)