summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranonym <anonym@riseup.net>2017-03-19 00:17:40 +0100
committeranonym <anonym@riseup.net>2017-03-19 00:17:40 +0100
commit857dac3104e1f57013a6ce766f806c149c9758b3 (patch)
tree0a704758864b51ae0ea9dddc295b22d68ec965a9
parentf4948e1a25a44c4f8b4f1e3ae72a8ac98903e279 (diff)
parentfdd50f83f44aa9f46f08ab8bbedf646b2efb3a06 (diff)
Merge branch 'stable' into devel
-rw-r--r--features/support/helpers/firewall_helper.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/features/support/helpers/firewall_helper.rb b/features/support/helpers/firewall_helper.rb
index 25029a2..97f0eeb 100644
--- a/features/support/helpers/firewall_helper.rb
+++ b/features/support/helpers/firewall_helper.rb
@@ -52,12 +52,15 @@ def pcap_connections_helper(pcap_file, opts = {})
sport: sport,
dport: dport,
}
- # It seems *Packet.parse can return nil despite *Packet.can_parse?
- # returning true. (#11508)
- if ip_packet
+ # It seems *Packet.parse can return an IP packet without source
+ # and/or destination address. (#11508)
+ begin
packet_info[:saddr] = ip_packet.ip_saddr
packet_info[:daddr] = ip_packet.ip_daddr
- else
+ rescue NoMethodError
+ # noop
+ end
+ if not(packet_info.has_key?(:saddr)) || not(packet_info.has_key?(:daddr))
puts "We were hit by #11508. PacketFu bug? Packet info: #{packet_info}"
end
connections << packet_info