[S] Change in libosmo-netif[master]: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to accept()

2023-12-17 Thread fixeria
fixeria has abandoned this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/35332?usp=email )

Change subject: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to 
accept()
..


Abandoned
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35332?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ie280c255fb2ba790b448e283439c42b766427352
Gerrit-Change-Number: 35332
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: abandon


[S] Change in libosmo-netif[master]: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to accept()

2023-12-16 Thread laforge
Attention is currently required from: fixeria.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/35332?usp=email )

Change subject: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to 
accept()
..


Patch Set 1: Code-Review-2


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

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ie280c255fb2ba790b448e283439c42b766427352
Gerrit-Change-Number: 35332
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Sat, 16 Dec 2023 19:47:39 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmo-netif[master]: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to accept()

2023-12-12 Thread pespin
Attention is currently required from: fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/35332?usp=email )

Change subject: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to 
accept()
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
> It's correct. […]
man 2 accept:

"""
The  addrlen  argument is a value-result argument: the caller must initialize 
it to contain the size (in bytes) of the structure pointed to by addr; on 
return it will contain the actual size of the peer address.

The returned address is truncated if the buffer provided is too small; in this 
case, addrlen will return a value greater than was  supplied  to  the call.

"""



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

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ie280c255fb2ba790b448e283439c42b766427352
Gerrit-Change-Number: 35332
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 12 Dec 2023 15:33:34 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[S] Change in libosmo-netif[master]: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to accept()

2023-12-12 Thread pespin
Attention is currently required from: fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/35332?usp=email )

Change subject: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to 
accept()
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
> Could you elaborate more please? […]
It's correct. the len passed to it needs to be the maximum size of the struct 
which can be copied in.



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

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ie280c255fb2ba790b448e283439c42b766427352
Gerrit-Change-Number: 35332
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 12 Dec 2023 15:32:32 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in libosmo-netif[master]: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to accept()

2023-12-12 Thread fixeria
Attention is currently required from: pespin.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/35332?usp=email )

Change subject: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to 
accept()
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
> This is wrong.
Could you elaborate more please?

We're passing a pointer to `osa.u.sa` (`struct sockaddr`) but sizeof 
`osa.u.sas` (`struct sockaddr_storage`) to `accept()`. Isn't this wrong?



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

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ie280c255fb2ba790b448e283439c42b766427352
Gerrit-Change-Number: 35332
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Tue, 12 Dec 2023 15:29:44 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in libosmo-netif[master]: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to accept()

2023-12-12 Thread pespin
Attention is currently required from: fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/35332?usp=email )

Change subject: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to 
accept()
..


Patch Set 1: Code-Review-2

(1 comment)

Patchset:

PS1: 
This is wrong.



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

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ie280c255fb2ba790b448e283439c42b766427352
Gerrit-Change-Number: 35332
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 12 Dec 2023 15:19:33 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmo-netif[master]: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to accept()

2023-12-12 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/35332?usp=email )


Change subject: osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to 
accept()
..

osmo_stream_srv_link_ofd_cb(): fix wrong socket size passed to accept()

Change-Id: Ie280c255fb2ba790b448e283439c42b766427352
Fixes: CID#321414
---
M src/stream_srv.c
1 file changed, 11 insertions(+), 1 deletion(-)



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

diff --git a/src/stream_srv.c b/src/stream_srv.c
index 0dca10a..7cad4c4 100644
--- a/src/stream_srv.c
+++ b/src/stream_srv.c
@@ -117,7 +117,7 @@
int ret;
int sock_fd;
struct osmo_sockaddr osa;
-   socklen_t sa_len = sizeof(osa.u.sas);
+   socklen_t sa_len = sizeof(osa.u.sa);
struct osmo_stream_srv_link *link = ofd->data;

ret = accept(ofd->fd, &osa.u.sa, &sa_len);

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

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ie280c255fb2ba790b448e283439c42b766427352
Gerrit-Change-Number: 35332
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange