-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix NetworkPolicy logging for IPv6 connections #1990
Fix NetworkPolicy logging for IPv6 connections #1990
Conversation
The code in charge of parsing the PacketIn messages was only handling IPv4 packets and not filling-in any information for IPv6 packets, leading to logs with empty fields. Fixes antrea-io#1989
Codecov Report
@@ Coverage Diff @@
## main #1990 +/- ##
==========================================
- Coverage 65.37% 59.44% -5.93%
==========================================
Files 197 197
Lines 17217 17237 +20
==========================================
- Hits 11256 10247 -1009
- Misses 4786 5887 +1101
+ Partials 1175 1103 -72
Flags with carried forward coverage won't be shown. Click here to find out more.
|
} | ||
ob.protocolStr = opsv1alpha1.ProtocolsToString[int32(prot)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about:
val, ok := opsv1alpha1.ProtocolsToString[int32(prot)]
if !ok {
val = "UnsupportProtocol"
}
ob.protocolStr = val
And add ICMPv6 related info to ProtocolsToString
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion. I added support for IPv6-ICMP, and I removed the dependency on the ops API types, as it didn't make sense to me.
And add support for the IPv6-ICMP protocol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for fixing it so quickly
/test-all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
* Fix NetworkPolicy logging for IPv6 connections The code in charge of parsing the PacketIn messages was only handling IPv4 packets and not filling-in any information for IPv6 packets, leading to logs with empty fields. Fixes antrea-io#1989 * Remove dependency on pkg/apis/ops/v1alpha1 for packetin handling And add support for the IPv6-ICMP protocol
* Fix NetworkPolicy logging for IPv6 connections The code in charge of parsing the PacketIn messages was only handling IPv4 packets and not filling-in any information for IPv6 packets, leading to logs with empty fields. Fixes antrea-io#1989 * Remove dependency on pkg/apis/ops/v1alpha1 for packetin handling And add support for the IPv6-ICMP protocol
* Fix NetworkPolicy logging for IPv6 connections The code in charge of parsing the PacketIn messages was only handling IPv4 packets and not filling-in any information for IPv6 packets, leading to logs with empty fields. Fixes antrea-io#1989 * Remove dependency on pkg/apis/ops/v1alpha1 for packetin handling And add support for the IPv6-ICMP protocol
* Fix NetworkPolicy logging for IPv6 connections The code in charge of parsing the PacketIn messages was only handling IPv4 packets and not filling-in any information for IPv6 packets, leading to logs with empty fields. Fixes #1989 * Remove dependency on pkg/apis/ops/v1alpha1 for packetin handling And add support for the IPv6-ICMP protocol
* Fix NetworkPolicy logging for IPv6 connections The code in charge of parsing the PacketIn messages was only handling IPv4 packets and not filling-in any information for IPv6 packets, leading to logs with empty fields. Fixes antrea-io#1989 * Remove dependency on pkg/apis/ops/v1alpha1 for packetin handling And add support for the IPv6-ICMP protocol
* Fix NetworkPolicy logging for IPv6 connections The code in charge of parsing the PacketIn messages was only handling IPv4 packets and not filling-in any information for IPv6 packets, leading to logs with empty fields. Fixes #1989 * Remove dependency on pkg/apis/ops/v1alpha1 for packetin handling And add support for the IPv6-ICMP protocol
* Fix NetworkPolicy logging for IPv6 connections The code in charge of parsing the PacketIn messages was only handling IPv4 packets and not filling-in any information for IPv6 packets, leading to logs with empty fields. Fixes antrea-io#1989 * Remove dependency on pkg/apis/ops/v1alpha1 for packetin handling And add support for the IPv6-ICMP protocol
* Fix NetworkPolicy logging for IPv6 connections The code in charge of parsing the PacketIn messages was only handling IPv4 packets and not filling-in any information for IPv6 packets, leading to logs with empty fields. Fixes #1989 * Remove dependency on pkg/apis/ops/v1alpha1 for packetin handling And add support for the IPv6-ICMP protocol
The code in charge of parsing the PacketIn messages was only handling
IPv4 packets and not filling-in any information for IPv6 packets,
leading to logs with empty fields.
Fixes #1989
I ran the test successfully in an IPv6 cluster creating with Vagrant VMs: