Skip to content
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

Feat: Support IPv6 UDP sockets #56

Merged
merged 2 commits into from
Jan 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 3.4.5
- Added support for listening on IPv6 addresses

## 3.4.4
- Refactor: avoid global side-effect + cleanup [#62](https://github.com/logstash-plugins/logstash-input-syslog/pull/62)
* avoid setting `BasicSocket.do_not_reverse_lookup` as it has side effects for others
Expand Down
2 changes: 1 addition & 1 deletion lib/logstash/inputs/syslog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def udp_listener(output_queue)
@logger.info("Starting syslog udp listener", :address => "#{@host}:#{@port}")

@udp.close if @udp
@udp = UDPSocket.new(Socket::AF_INET)
@udp = UDPSocket.new (IPAddr.new(@host).ipv6? rescue nil) ? Socket::AF_INET6 : Socket::AF_INET
@udp.do_not_reverse_lookup = true
@udp.bind(@host, @port)

Expand Down
2 changes: 1 addition & 1 deletion logstash-input-syslog.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|

s.name = 'logstash-input-syslog'
s.version = '3.4.4'
s.version = '3.4.5'
s.licenses = ['Apache License (2.0)']
s.summary = "Reads syslog messages as events"
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
Expand Down