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

Zero-out the sockaddr struct before using it #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rosorio
Copy link

@rosorio rosorio commented Mar 28, 2020

It was reported that fcgiwrap doesn't work with IPv6, I start testing and found that the following command fails :

# /usr/local/sbin/fcgiwrap -s 'tcp6:[::1]:899'
Failed to bind: Can't assign requested address

After investigations I found that the issue was caused by an uninitialized sockaddr structure which is mandatory for IPv6. After that, fcgiwrap binds on IPv6 addresses without issue.

The sockaddr union struct must be zero-out
before usage at least for IPv6.

IEEE Std 1003.1, 2004 Edition says:
---
The sockaddr_in6 structure shall be set to zero by an
application prior to using it, since implementations
are free to have additional, implementation-defined
fields in sockaddr_in6.
uqs pushed a commit to freebsd/freebsd-ports that referenced this pull request Mar 28, 2020
Extend existing patch to fix IPv6 support.
Bump PORTREVISION

The fix zero-out the sockaddr structure before
using it as a sockaddr_in6 structure as explained
by IEEE Std 1003.1.

The patch was upstremed : gnosek/fcgiwrap#51

PR:		243721
Reported by:	<[email protected]>


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@529749 35697150-7ecd-e111-bb59-0022644237b5
uqs pushed a commit to freebsd/freebsd-ports that referenced this pull request Mar 28, 2020
Extend existing patch to fix IPv6 support.
Bump PORTREVISION

The fix zero-out the sockaddr structure before
using it as a sockaddr_in6 structure as explained
by IEEE Std 1003.1.

The patch was upstremed : gnosek/fcgiwrap#51

PR:		243721
Reported by:	<[email protected]>
Jehops pushed a commit to Jehops/freebsd-ports-legacy that referenced this pull request Mar 28, 2020
Extend existing patch to fix IPv6 support.
Bump PORTREVISION

The fix zero-out the sockaddr structure before
using it as a sockaddr_in6 structure as explained
by IEEE Std 1003.1.

The patch was upstremed : gnosek/fcgiwrap#51

PR:		243721
Reported by:	<[email protected]>


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@529749 35697150-7ecd-e111-bb59-0022644237b5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant