You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2019/12/31 23:59:50 UTC

[GitHub] [drill] cgivre opened a new pull request #1946: DRILL-7505: PCAP Plugin Fails on IPv6 Packets

cgivre opened a new pull request #1946: DRILL-7505: PCAP Plugin Fails on IPv6 Packets
URL: https://github.com/apache/drill/pull/1946
 
 
   In its current implementation, the PCAP parser fails with an exception if it encounters a protocol it does not have in its enumerated list. 
   This is not an acceptable strategy in that there are many protocols out there and having Drill crash when it encounters an unknown protocol is not helpful or useful.  This minor PR makes the PCAP plugin more fault tolerant.
   
   I tested this on proprietary PCAP files which are too large to include.  Existing unit tests are unaffected.
   
   Jira: [Drill-7505](https://issues.apache.org/jira/browse/DRILL-7505)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [drill] cgivre commented on issue #1946: DRILL-7505: PCAP Plugin Fails on IPv6 Packets

Posted by GitBox <gi...@apache.org>.
cgivre commented on issue #1946: DRILL-7505: PCAP Plugin Fails on IPv6 Packets
URL: https://github.com/apache/drill/pull/1946#issuecomment-570093777
 
 
   After looking at the PCAP and PCAP-NG plugins, both of these really do need some work. I'm going to submit some PRs in the next few weeks for some code cleanup and general improvements.  This is in support of a use case at my company, but in general, I'd like to consolidate the PCAP and PCAP-NG plugins into one so that improvements don't have to be duplicated across both plugins.  But... that's not for this PR.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [drill] arina-ielchiieva commented on issue #1946: DRILL-7505: PCAP Plugin Fails on IPv6 Packets

Posted by GitBox <gi...@apache.org>.
arina-ielchiieva commented on issue #1946: DRILL-7505: PCAP Plugin Fails on IPv6 Packets
URL: https://github.com/apache/drill/pull/1946#issuecomment-570163187
 
 
   +1, please squash the commits.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [drill] arina-ielchiieva commented on a change in pull request #1946: DRILL-7505: PCAP Plugin Fails on IPv6 Packets

Posted by GitBox <gi...@apache.org>.
arina-ielchiieva commented on a change in pull request #1946: DRILL-7505: PCAP Plugin Fails on IPv6 Packets
URL: https://github.com/apache/drill/pull/1946#discussion_r362326297
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/store/pcap/decoder/PacketConstants.java
 ##########
 @@ -40,7 +40,14 @@
   public static final int FRAGMENT_V6 = 44;
   public static final int AUTHENTICATION_V6 = 51;
   public static final int ENCAPSULATING_SECURITY_V6 = 50;
+  public static final int ICMPv6 = 58;
   public static final int MOBILITY_EXTENSION_V6 = 135;
+  public static final int HOST_IDENTITY_PROTOCOL = 139;
+  public static final int SHIM6_PROTOCOL = 140;
+
+  public static final int RESERVED_IPV6_1 = 253;
 
 Review comment:
   Please remove unused constants.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [drill] asfgit closed pull request #1946: DRILL-7505: PCAP Plugin Fails on IPv6 Packets

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #1946: DRILL-7505: PCAP Plugin Fails on IPv6 Packets
URL: https://github.com/apache/drill/pull/1946
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [drill] cgivre commented on issue #1946: DRILL-7505: PCAP Plugin Fails on IPv6 Packets

Posted by GitBox <gi...@apache.org>.
cgivre commented on issue #1946: DRILL-7505: PCAP Plugin Fails on IPv6 Packets
URL: https://github.com/apache/drill/pull/1946#issuecomment-570227893
 
 
   Thanks @arina-ielchiieva for the review.  Commits squashed.  Could we please merge this today as this is a blocker for a POC I'm working on?
   Thanks and Happy New Year!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [drill] arina-ielchiieva commented on a change in pull request #1946: DRILL-7505: PCAP Plugin Fails on IPv6 Packets

Posted by GitBox <gi...@apache.org>.
arina-ielchiieva commented on a change in pull request #1946: DRILL-7505: PCAP Plugin Fails on IPv6 Packets
URL: https://github.com/apache/drill/pull/1946#discussion_r362326283
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/store/pcapng/decoder/PacketDecoder.java
 ##########
 @@ -56,6 +56,8 @@ protected int processIpV6Packet() {
       return super.processIpV6Packet();
     } catch (IllegalStateException ise) {
       return -1;
+    } catch (ArrayIndexOutOfBoundsException e) {
 
 Review comment:
   Use multi-catch

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [drill] cgivre commented on a change in pull request #1946: DRILL-7505: PCAP Plugin Fails on IPv6 Packets

Posted by GitBox <gi...@apache.org>.
cgivre commented on a change in pull request #1946: DRILL-7505: PCAP Plugin Fails on IPv6 Packets
URL: https://github.com/apache/drill/pull/1946#discussion_r362350336
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/store/pcapng/decoder/PacketDecoder.java
 ##########
 @@ -56,6 +56,8 @@ protected int processIpV6Packet() {
       return super.processIpV6Packet();
     } catch (IllegalStateException ise) {
       return -1;
+    } catch (ArrayIndexOutOfBoundsException e) {
 
 Review comment:
   Fixed

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [drill] cgivre commented on a change in pull request #1946: DRILL-7505: PCAP Plugin Fails on IPv6 Packets

Posted by GitBox <gi...@apache.org>.
cgivre commented on a change in pull request #1946: DRILL-7505: PCAP Plugin Fails on IPv6 Packets
URL: https://github.com/apache/drill/pull/1946#discussion_r362350341
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/store/pcap/decoder/PacketConstants.java
 ##########
 @@ -40,7 +40,14 @@
   public static final int FRAGMENT_V6 = 44;
   public static final int AUTHENTICATION_V6 = 51;
   public static final int ENCAPSULATING_SECURITY_V6 = 50;
+  public static final int ICMPv6 = 58;
   public static final int MOBILITY_EXTENSION_V6 = 135;
+  public static final int HOST_IDENTITY_PROTOCOL = 139;
+  public static final int SHIM6_PROTOCOL = 140;
+
+  public static final int RESERVED_IPV6_1 = 253;
 
 Review comment:
   Fixed

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services