pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/34114 )


Change subject: stream: Use new flag OSMO_SOCK_F_SCTP_ASCONF_SUPPORTED for SCTP 
sockets
......................................................................

stream: Use new flag OSMO_SOCK_F_SCTP_ASCONF_SUPPORTED for SCTP sockets

This is required if the user of the stream API wants to use SCTP extra
features such as setting the Peer Primary Address through ASCONF.

At a later point we may want to add new osmo_stream APIs to set extra
flags for the socket, or maybe simply add a new API specifically to
enable ASCONF for the stream.

Depends: libosmocore.git Change-Id Iac07031927b66a9d32d2bb2faab817e4c922a359
Related: OS#6076
Change-Id: I807b3748b8535d8e75ceea812d7baaf153fa1d60
---
M src/stream_cli.c
M src/stream_srv.c
2 files changed, 21 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/14/34114/1

diff --git a/src/stream_cli.c b/src/stream_cli.c
index d7d6b90..70e4890 100644
--- a/src/stream_cli.c
+++ b/src/stream_cli.c
@@ -747,7 +747,7 @@
                ret = osmo_sock_init2_multiaddr(AF_UNSPEC, SOCK_STREAM, 
cli->proto,
                                                (const char **)cli->local_addr, 
cli->local_addrcnt, cli->local_port,
                                                (const char **)cli->addr, 
cli->addrcnt, cli->port,
-                                               
OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_BIND|OSMO_SOCK_F_NONBLOCK);
+                                               
OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_BIND|OSMO_SOCK_F_NONBLOCK|OSMO_SOCK_F_SCTP_ASCONF_SUPPORTED);
                break;
 #endif
        default:
@@ -826,7 +826,7 @@
                        ret = osmo_sock_init2_multiaddr(cli->sk_domain, 
cli->sk_type, cli->proto,
                                                        (const char 
**)cli->local_addr, cli->local_addrcnt, cli->local_port,
                                                        (const char 
**)cli->addr, cli->addrcnt, cli->port,
-                                                       
OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_BIND|OSMO_SOCK_F_NONBLOCK);
+                                                       
OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_BIND|OSMO_SOCK_F_NONBLOCK|OSMO_SOCK_F_SCTP_ASCONF_SUPPORTED);
                        break;
 #endif
                default:
diff --git a/src/stream_srv.c b/src/stream_srv.c
index 17925af..c8d3233 100644
--- a/src/stream_srv.c
+++ b/src/stream_srv.c
@@ -411,7 +411,7 @@
                case IPPROTO_SCTP:
                        ret = osmo_sock_init2_multiaddr(link->sk_domain, 
link->sk_type, link->proto,
                                                        (const char 
**)link->addr, link->addrcnt, link->port,
-                                                       NULL, 0, 0, 
OSMO_SOCK_F_BIND);
+                                                       NULL, 0, 0, 
OSMO_SOCK_F_BIND|OSMO_SOCK_F_SCTP_ASCONF_SUPPORTED);
                        break;
 #endif
                default:

--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34114
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I807b3748b8535d8e75ceea812d7baaf153fa1d60
Gerrit-Change-Number: 34114
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to