Skip to content

Commit

Permalink
Merge pull request #393 from splunk/feature/fix-persist-conflict-udp
Browse files Browse the repository at this point in the history
Feature/fix persist conflict udp
  • Loading branch information
Ryan Faircloth authored and GitHub committed Apr 2, 2020
2 parents 2487050 + ab87f12 commit 26ce3ae
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
5 changes: 3 additions & 2 deletions package/etc/go_templates/source_network.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
syslog (
transport("udp")
so-reuseport(1)
persist-name("udp{{.instance}}")
persist-name("{{ .port_id }}{{ .instance }}")
port({{ getenv (print "SC4S_LISTEN_" .port_id "_UDP_PORT") "514" }})
ip-protocol(4)
so-rcvbuf({{getenv "SC4S_SOURCE_UDP_SO_RCVBUFF" "1703936"}})
Expand All @@ -23,8 +23,9 @@ source s_{{ .port_id }} {
channel {
source {
{{- if or (getenv (print "SC4S_LISTEN_" .port_id "_UDP_PORT")) (eq .port_id "DEFAULT") }}
{{- $port_id := .port_id }}
{{- range (math.Seq (getenv "SC4S_SOURCE_LISTEN_UDP_SOCKETS" "5"))}}
{{- $context := dict "instance" . "port_id" "DEFAULT" }}
{{- $context := dict "instance" . "port_id" $port_id }}
{{- template "UDP" $context }}
{{- end}}
{{- end}}
Expand Down
6 changes: 6 additions & 0 deletions tests/docker-compose-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ services:
- SC4S_LISTEN_JUNIPER_IDP_TCP_PORT=5004
- SC4S_LISTEN_PALOALTO_PANOS_TCP_PORT=5005
- SC4S_LISTEN_PFSENSE_TCP_PORT=5006
- SC4S_LISTEN_CISCO_ASA_UDP_PORT=5001
- SC4S_LISTEN_CISCO_IOS_UDP_PORT=5002
- SC4S_LISTEN_CISCO_MERAKI_UDP_PORT=5003
- SC4S_LISTEN_JUNIPER_IDP_UDP_PORT=5004
- SC4S_LISTEN_PALOALTO_PANOS_UDP_PORT=5005
- SC4S_LISTEN_PFSENSE_UDP_PORT=5006
- SC4S_ARCHIVE_GLOBAL=no
splunk:
build:
Expand Down
6 changes: 6 additions & 0 deletions tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ services:
- SC4S_LISTEN_JUNIPER_IDP_TCP_PORT=5004
- SC4S_LISTEN_PALOALTO_PANOS_TCP_PORT=5005
- SC4S_LISTEN_PFSENSE_TCP_PORT=5006
- SC4S_LISTEN_CISCO_ASA_UDP_PORT=5001
- SC4S_LISTEN_CISCO_IOS_UDP_PORT=5002
- SC4S_LISTEN_CISCO_MERAKI_UDP_PORT=5003
- SC4S_LISTEN_JUNIPER_IDP_UDP_PORT=5004
- SC4S_LISTEN_PALOALTO_PANOS_UDP_PORT=5005
- SC4S_LISTEN_PFSENSE_UDP_PORT=5006
- SC4S_ARCHIVE_GLOBAL=no
- SC4S_SOURCE_STORE_RAWMSG=yes
splunk:
Expand Down

0 comments on commit 26ce3ae

Please sign in to comment.