kern/165210: SCTP sockets don't bind on interfaces created by netgraph

Maxim WGH wgh at
Thu Feb 16 19:20:07 UTC 2012

>Number:         165210
>Category:       kern
>Synopsis:       SCTP sockets don't bind on interfaces created by netgraph
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 16 19:20:07 UTC 2012
>Originator:     Maxim "WGH"
>Release:        8.1-RELEASE-p1
FreeBSD torlan 8.1-RELEASE-p1 FreeBSD 8.1-RELEASE-p1 #8: Sat Oct 30 23:25:06 MSD 2010     wgh at torlan:/usr/obj/usr/src/sys/TORLAN  i386
I was experimenting with SCTP, and I noticed I couldn't bind SCTP socket to interface ng0, which was created by mpd5 (net/mpd5) daemon.
bind() system calls fails with errno 49 "Can't assign requested address". It does bind on any other address in the system, including (INADDR_ANY). The latter still doesn't allow incoming SCTP connections on that address though (although instead of "connection refused" I get hanging connect()).

I've looked through both netgraph and sctp source code. netgraph creates IFT_PROPVIRTUAL interfaces, and there is a function in sctp called sctp_is_desired_interface_type. The latter doesn't think that IFT_PROPVIRTUAL is something desirable.

I believe it's a bug, because netgraph is a generic framework, and there is no reason to not allow creation of SCTP sockets on its interfaces. For instance, I use L2TP provided by mpd5 as main internet connection.



More information about the freebsd-bugs mailing list