Skip to content

SyslogOutputStream opens DatagramSocket bind on wildcard address #939

Open
@joao-rebelo

Description

@joao-rebelo

When SyslogOutputStream opens the DatagramSocket it uses the no-argument constructor which binds an available port on the wildcard address.

this.ds = new DatagramSocket();

This can be observed by having "random ports" getting (and remaining) open at the OS level (ss -tulnp) when having an application sending logs with the LogstashUdpSocketAppender.

Since we are only sending traffic through this socket it could be better to bind it on the localhost address instead by using an alternative DatagramSocket constructor or the DatagramSocket::bind method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions