Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Buffering Unix-domain socket

    Scheduled Pinned Locked Moved General pfSense Questions
    unixbufferingsockdgram
    1 Posts 1 Posters 203 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JonathanLeeJ
      JonathanLee
      last edited by

      Hello fellow Netgate open-source Community members can you please help?
      Does changing this setting in SystemAdvancedSystem Tunables cause any issues? Are there any problems with doing this from a cybersecurity perspective?

      net.local.dgram.recvspace: 262144
      net.local.dgram.maxdgram: 16384
      

      As quited on Freebsd's website
      "The Unix-domain sockets of type SOCK_DGRAM are unreliable and always
      non-blocking for write operations. The default receive buffer can be
      configured with net.local.dgram.recvspace. The maximum allowed data-
      gram size is limited by net.local.dgram.maxdgram. A SOCK_DGRAM socket
      that has been bound with bind(2) can have multiple peers connected at
      the same time. The modern FreeBSD implementation will allocate
      net.local.dgram.recvspace sized private buffers in the receive buffer
      of the bound socket for every connected socket, preventing a situation
      when a single writer can exhaust all of buffer space. Messages coming
      from unconnected sends using sendto(2) land on the shared buffer of the
      receiving socket, which has the same size limit. A side effect of the
      implementation is that it doesn't guarantee that writes from different
      senders will arrive at the receiver in the same chronological order
      they were sent. The order is preserved for writes coming through a
      particular connection."

      Ref:
      https://man.freebsd.org/cgi/man.cgi?query=unix&sektion=4

      Make sure to upvote

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.