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

Give an error for addresses lacking a hostname #408

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Aug 17, 2024

  1. sock_util: add sock_addr_validate()

    A source or destination address of the form ":1234" is parsed as a
    hostname of "" which is guaranteed to never work.  While we don't want
    to give special error messages for all possible invalid addresses, this
    particular case can easily be produced from a broken shell script (with
    a hostname variable accidentally not set), so it's worth having a
    special error message.
    
    Suggested by:	Ross Richardson
    gperciva committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    d7c146c View commit details
    Browse the repository at this point in the history
  2. Use sock_addr_validate()

    We want to check that the addresses are syntactically valid before
    spiped daemonizes.
    
    It's not strictly necessary for spipe, but we might as well check it so
    that we can produce a usage() if necessary.
    
    Suggested by:	Ross Richardson
    gperciva committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    a98d619 View commit details
    Browse the repository at this point in the history