Skip to content

Commit

Permalink
Bind to any (IPv4) address
Browse files Browse the repository at this point in the history
  • Loading branch information
grafolean committed Apr 7, 2020
1 parent 1487976 commit 87264e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion netflowcollector.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
def pass_netflow_data(netflow_port, named_pipe_filename):
# endless loop - read netflow packets from UDP port and write them to named pipe:
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
server_address = ('localhost', netflow_port,)
server_address = ('', netflow_port,) # '' binds to any IPv4 address (not IPv6!)
log.debug('starting up on {} port {}'.format(*server_address))
sock.bind(server_address)

Expand Down

0 comments on commit 87264e2

Please sign in to comment.