diff --git a/src/core/link_sctp_linux.go b/src/core/link_sctp_linux.go index 85f01bc3..94ed61c8 100644 --- a/src/core/link_sctp_linux.go +++ b/src/core/link_sctp_linux.go @@ -63,7 +63,7 @@ func (l *linkSCTP) dial(url *url.URL, options linkOptions, sintf string) error { //l.core.log.Printf("Read buffer %d", rbuf) //l.core.log.Printf("Write buffer %d", wbuf) conn.(*sctp.SCTPConn).SetEvents(sctp.SCTP_EVENT_DATA_IO) - return l.handler(url.String(), info, conn, options, false) + return l.handler(url.String(), info, conn, options, false, false) } func (l *linkSCTP) listen(url *url.URL, sintf string) (*Listener, error) { @@ -114,7 +114,7 @@ func (l *linkSCTP) listen(url *url.URL, sintf string) (*Listener, error) { l.core.log.Printf("Read buffer %d", rbuf) l.core.log.Printf("Write buffer %d", wbuf) - if err = l.handler(name, info, conn, linkOptions{}, true); err != nil { + if err = l.handler(name, info, conn, linkOptions{}, true, addr.IP.IsLinkLocalUnicast()); err != nil { l.core.log.Errorln("Failed to create inbound link:", err) } } @@ -125,13 +125,13 @@ func (l *linkSCTP) listen(url *url.URL, sintf string) (*Listener, error) { return entry, nil } -func (l *linkSCTP) handler(name string, info linkInfo, conn net.Conn, options linkOptions, incoming bool) error { +func (l *linkSCTP) handler(name string, info linkInfo, conn net.Conn, options linkOptions, incoming bool, force boo) error { return l.links.create( conn, // connection name, // connection name info, // connection info incoming, // not incoming - false, // not forced + force, // not forced options, // connection options ) }