You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(9) |
Feb
(11) |
Mar
(22) |
Apr
(73) |
May
(78) |
Jun
(146) |
Jul
(80) |
Aug
(27) |
Sep
(5) |
Oct
(14) |
Nov
(18) |
Dec
(27) |
2005 |
Jan
(20) |
Feb
(30) |
Mar
(19) |
Apr
(28) |
May
(50) |
Jun
(31) |
Jul
(32) |
Aug
(14) |
Sep
(36) |
Oct
(43) |
Nov
(74) |
Dec
(63) |
2006 |
Jan
(34) |
Feb
(32) |
Mar
(21) |
Apr
(76) |
May
(106) |
Jun
(72) |
Jul
(70) |
Aug
(175) |
Sep
(130) |
Oct
(39) |
Nov
(81) |
Dec
(43) |
2007 |
Jan
(81) |
Feb
(36) |
Mar
(20) |
Apr
(43) |
May
(54) |
Jun
(34) |
Jul
(44) |
Aug
(55) |
Sep
(44) |
Oct
(54) |
Nov
(43) |
Dec
(41) |
2008 |
Jan
(42) |
Feb
(84) |
Mar
(73) |
Apr
(30) |
May
(119) |
Jun
(54) |
Jul
(54) |
Aug
(93) |
Sep
(173) |
Oct
(130) |
Nov
(145) |
Dec
(153) |
2009 |
Jan
(59) |
Feb
(12) |
Mar
(28) |
Apr
(18) |
May
(56) |
Jun
(9) |
Jul
(28) |
Aug
(62) |
Sep
(16) |
Oct
(19) |
Nov
(15) |
Dec
(17) |
2010 |
Jan
(14) |
Feb
(36) |
Mar
(37) |
Apr
(30) |
May
(33) |
Jun
(53) |
Jul
(42) |
Aug
(50) |
Sep
(67) |
Oct
(66) |
Nov
(69) |
Dec
(36) |
2011 |
Jan
(52) |
Feb
(45) |
Mar
(49) |
Apr
(21) |
May
(34) |
Jun
(13) |
Jul
(19) |
Aug
(37) |
Sep
(43) |
Oct
(10) |
Nov
(23) |
Dec
(30) |
2012 |
Jan
(42) |
Feb
(36) |
Mar
(46) |
Apr
(25) |
May
(96) |
Jun
(146) |
Jul
(40) |
Aug
(28) |
Sep
(61) |
Oct
(45) |
Nov
(100) |
Dec
(53) |
2013 |
Jan
(79) |
Feb
(24) |
Mar
(134) |
Apr
(156) |
May
(118) |
Jun
(75) |
Jul
(278) |
Aug
(145) |
Sep
(136) |
Oct
(168) |
Nov
(137) |
Dec
(439) |
2014 |
Jan
(284) |
Feb
(158) |
Mar
(231) |
Apr
(275) |
May
(259) |
Jun
(91) |
Jul
(222) |
Aug
(215) |
Sep
(165) |
Oct
(166) |
Nov
(211) |
Dec
(150) |
2015 |
Jan
(164) |
Feb
(324) |
Mar
(299) |
Apr
(214) |
May
(111) |
Jun
(109) |
Jul
(105) |
Aug
(36) |
Sep
(58) |
Oct
(131) |
Nov
(68) |
Dec
(30) |
2016 |
Jan
(46) |
Feb
(87) |
Mar
(135) |
Apr
(174) |
May
(132) |
Jun
(135) |
Jul
(149) |
Aug
(125) |
Sep
(79) |
Oct
(49) |
Nov
(95) |
Dec
(102) |
2017 |
Jan
(104) |
Feb
(75) |
Mar
(72) |
Apr
(53) |
May
(18) |
Jun
(5) |
Jul
(14) |
Aug
(19) |
Sep
(2) |
Oct
(13) |
Nov
(21) |
Dec
(67) |
2018 |
Jan
(56) |
Feb
(50) |
Mar
(148) |
Apr
(41) |
May
(37) |
Jun
(34) |
Jul
(34) |
Aug
(11) |
Sep
(52) |
Oct
(48) |
Nov
(28) |
Dec
(46) |
2019 |
Jan
(29) |
Feb
(63) |
Mar
(95) |
Apr
(54) |
May
(14) |
Jun
(71) |
Jul
(60) |
Aug
(49) |
Sep
(3) |
Oct
(64) |
Nov
(115) |
Dec
(57) |
2020 |
Jan
(15) |
Feb
(9) |
Mar
(38) |
Apr
(27) |
May
(60) |
Jun
(53) |
Jul
(35) |
Aug
(46) |
Sep
(37) |
Oct
(64) |
Nov
(20) |
Dec
(25) |
2021 |
Jan
(20) |
Feb
(31) |
Mar
(27) |
Apr
(23) |
May
(21) |
Jun
(30) |
Jul
(30) |
Aug
(7) |
Sep
(18) |
Oct
|
Nov
(15) |
Dec
(4) |
2022 |
Jan
(3) |
Feb
(1) |
Mar
(10) |
Apr
|
May
(2) |
Jun
(26) |
Jul
(5) |
Aug
|
Sep
(1) |
Oct
(2) |
Nov
(9) |
Dec
(2) |
2023 |
Jan
(4) |
Feb
(4) |
Mar
(5) |
Apr
(10) |
May
(29) |
Jun
(17) |
Jul
|
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
|
2024 |
Jan
|
Feb
(6) |
Mar
|
Apr
(1) |
May
(6) |
Jun
|
Jul
(5) |
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(6) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <eri...@gm...> - 2019-03-19 10:08:03
|
From: Erik Hugne <eri...@gm...> When cancelling a subscription, we have to clear the cancel bit in the request before iterating over any established subscriptions with memcmp. Otherwise no subscription will ever be found, and it will not be possible to unsubscribe. Signed-off-by: Erik Hugne <eri...@gm...> --- Ignore my previous garbage patch, this solve the problem with one line. Looking through the history of topsrv.c, i cannot find that this has ever worked. net/tipc/topsrv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/tipc/topsrv.c b/net/tipc/topsrv.c index 4a708a4e8583..b05a89a723b1 100644 --- a/net/tipc/topsrv.c +++ b/net/tipc/topsrv.c @@ -363,6 +363,7 @@ static int tipc_conn_rcv_sub(struct tipc_topsrv *srv, struct tipc_subscription *sub; if (tipc_sub_read(s, filter) & TIPC_SUB_CANCEL) { + s->filter ^= __constant_ntohl(TIPC_SUB_CANCEL); tipc_conn_delete_sub(con, s); return 0; } -- 2.14.1 |
From: Erik H. <eri...@gm...> - 2019-03-18 20:12:45
|
Hi a raw memcmp of the subscriptions wont work here: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/tree/net/tipc/topsrv.c#n236 The subscription in the list may have filter set to 0x0, 0x1 or 0x2, but the received cancellation request this will always be 0x4 The result is that no sub will be found when processing the cancel request, and events will be generated until you close the topology connection. I made a real hacky workaround here: https://gist.github.com/Hugne/18f900fccb0fd606093ca294a1c5b961 |
From: David M. <da...@da...> - 2019-03-18 04:33:06
|
From: Jon Maloy <jon...@er...> Date: Sun, 17 Mar 2019 18:46:42 +0100 > From: Erik Hugne <eri...@gm...> > > We move the check that prevents connecting service ranges to after > the RDM/DGRAM check, and move address sanity control to a separate > function that also validates the service range. > > Fixes: 23998835be98 ("tipc: improve address sanity check in tipc_connect()") > Signed-off-by: Erik Hugne <eri...@gm...> > Signed-off-by: Jon Maloy <jon...@er...> > --- > v2: address check function returns bool as suggested by davem Applied and queued up for -stable, thanks Jon. |
From: Jon M. <jon...@er...> - 2019-03-17 17:46:52
|
From: Erik Hugne <eri...@gm...> We move the check that prevents connecting service ranges to after the RDM/DGRAM check, and move address sanity control to a separate function that also validates the service range. Fixes: 23998835be98 ("tipc: improve address sanity check in tipc_connect()") Signed-off-by: Erik Hugne <eri...@gm...> Signed-off-by: Jon Maloy <jon...@er...> --- v2: address check function returns bool as suggested by davem --- net/tipc/socket.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index d6b2686..b542f14 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -2349,6 +2349,16 @@ static int tipc_wait_for_connect(struct socket *sock, long *timeo_p) return 0; } +static bool tipc_sockaddr_is_sane(struct sockaddr_tipc *addr) +{ + if (addr->family != AF_TIPC) + return false; + if (addr->addrtype == TIPC_SERVICE_RANGE) + return (addr->addr.nameseq.lower <= addr->addr.nameseq.upper); + return (addr->addrtype == TIPC_SERVICE_ADDR || + addr->addrtype == TIPC_SOCKET_ADDR); +} + /** * tipc_connect - establish a connection to another TIPC port * @sock: socket structure @@ -2384,18 +2394,18 @@ static int tipc_connect(struct socket *sock, struct sockaddr *dest, if (!tipc_sk_type_connectionless(sk)) res = -EINVAL; goto exit; - } else if (dst->family != AF_TIPC) { - res = -EINVAL; } - if (dst->addrtype != TIPC_ADDR_ID && dst->addrtype != TIPC_ADDR_NAME) + if (!tipc_sockaddr_is_sane(dst)) { res = -EINVAL; - if (res) goto exit; - + } /* DGRAM/RDM connect(), just save the destaddr */ if (tipc_sk_type_connectionless(sk)) { memcpy(&tsk->peer, dest, destlen); goto exit; + } else if (dst->addrtype == TIPC_SERVICE_RANGE) { + res = -EINVAL; + goto exit; } previous = sk->sk_state; -- 2.1.4 |
From: <eri...@gm...> - 2019-03-17 09:51:17
|
From: Erik Hugne <eri...@gm...> We move the check that prevents connecting service service ranges to after the RDM/DGRAM check, and split out address sanitizing to a separate function that also validates the service range. Fixes: 23998835be98 ("tipc: improve address sanity check in tipc_connect()") Signed-off-by: Erik Hugne <eri...@gm...> --- v3: address check function returns bool as suggested by davem net/tipc/socket.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 3274ef625dba..0f678e92fd30 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -2349,6 +2349,16 @@ static int tipc_wait_for_connect(struct socket *sock, long *timeo_p) return 0; } +static bool tipc_sockaddr_is_sane(struct sockaddr_tipc *addr) +{ + if (addr->family != AF_TIPC) + return false; + if (addr->addrtype == TIPC_SERVICE_RANGE) + return (addr->addr.nameseq.lower <= addr->addr.nameseq.upper); + return (addr->addrtype == TIPC_SERVICE_ADDR || + addr->addrtype == TIPC_SOCKET_ADDR); +} + /** * tipc_connect - establish a connection to another TIPC port * @sock: socket structure @@ -2384,18 +2394,18 @@ static int tipc_connect(struct socket *sock, struct sockaddr *dest, if (!tipc_sk_type_connectionless(sk)) res = -EINVAL; goto exit; - } else if (dst->family != AF_TIPC) { - res = -EINVAL; } - if (dst->addrtype != TIPC_ADDR_ID && dst->addrtype != TIPC_ADDR_NAME) + if (!tipc_sockaddr_is_sane(dst)) { res = -EINVAL; - if (res) goto exit; - + } /* DGRAM/RDM connect(), just save the destaddr */ if (tipc_sk_type_connectionless(sk)) { memcpy(&tsk->peer, dest, destlen); goto exit; + } else if (dst->addrtype == TIPC_SERVICE_RANGE) { + res = -EINVAL; + goto exit; } previous = sk->sk_state; -- 2.14.1 |
From: David M. <da...@da...> - 2019-03-17 01:20:21
|
From: Kangjie Lu <kj...@um...> Date: Sat, 16 Mar 2019 16:46:05 -0500 > nla_nest_start may fail. The fix check its status and returns > -EMSGSIZE in case it fails. > > Signed-off-by: Kangjie Lu <kj...@um...> Applied, thanks. |
From: David M. <da...@da...> - 2019-03-16 19:19:13
|
From: Jon Maloy <jon...@er...> Date: Fri, 15 Mar 2019 21:11:00 +0100 > @@ -2349,6 +2349,16 @@ static int tipc_wait_for_connect(struct socket *sock, long *timeo_p) > return 0; > } > > +static int tipc_sockaddr_is_sane(struct sockaddr_tipc *addr) > +{ > + if (addr->family != AF_TIPC) > + return 0; I think bool and true/false are most appropriate for this function. |
From: David M. <da...@da...> - 2019-03-16 19:09:45
|
From: Kangjie Lu <kj...@um...> Date: Fri, 15 Mar 2019 12:11:59 -0500 > nla_nest_start could fail and requires a check. The fix returns > -EMSGSIZE if it fails. > > Signed-off-by: Kangjie Lu <kj...@um...> Applied. |
From: David M. <da...@da...> - 2019-03-16 18:37:38
|
From: Kangjie Lu <kj...@um...> Date: Fri, 15 Mar 2019 01:03:05 -0500 > nla_nest_start may fail. The fix check its status and returns > -EMSGSIZE in case it fails. > > Signed-off-by: Kangjie Lu <kj...@um...> The proper subsystem prefix is "tipc: " not "socket: " |
From: Jon M. <jon...@er...> - 2019-03-15 20:11:13
|
From: Erik Hugne <eri...@gm...> We move the check that prevents connecting service ranges to after the RDM/DGRAM check, and separate address sanity control to a separate function that also validates the service range. Fixes: 23998835be98 ("tipc: improve address sanity check in tipc_connect()") Signed-off-by: Erik Hugne <eri...@gm...> Signed-off-by: Jon Maloy <jon...@er...> --- net/tipc/socket.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 3274ef6..1950781 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -2349,6 +2349,16 @@ static int tipc_wait_for_connect(struct socket *sock, long *timeo_p) return 0; } +static int tipc_sockaddr_is_sane(struct sockaddr_tipc *addr) +{ + if (addr->family != AF_TIPC) + return 0; + if (addr->addrtype == TIPC_SERVICE_RANGE) + return (addr->addr.nameseq.lower <= addr->addr.nameseq.upper); + return (addr->addrtype == TIPC_SERVICE_ADDR || + addr->addrtype == TIPC_SOCKET_ADDR); +} + /** * tipc_connect - establish a connection to another TIPC port * @sock: socket structure @@ -2384,18 +2394,18 @@ static int tipc_connect(struct socket *sock, struct sockaddr *dest, if (!tipc_sk_type_connectionless(sk)) res = -EINVAL; goto exit; - } else if (dst->family != AF_TIPC) { - res = -EINVAL; } - if (dst->addrtype != TIPC_ADDR_ID && dst->addrtype != TIPC_ADDR_NAME) + if (!tipc_sockaddr_is_sane(dst)) { res = -EINVAL; - if (res) goto exit; - + } /* DGRAM/RDM connect(), just save the destaddr */ if (tipc_sk_type_connectionless(sk)) { memcpy(&tsk->peer, dest, destlen); goto exit; + } else if (dst->addrtype == TIPC_SERVICE_RANGE) { + res = -EINVAL; + goto exit; } previous = sk->sk_state; -- 2.1.4 |
From: Jon M. <jon...@er...> - 2019-03-15 19:13:53
|
Don’t worry. I was just too bugged down with other issues the last days. I’ll send it in today. BR ///jon From: Erik Hugne <eri...@gm...> Sent: 15-Mar-19 14:53 To: tip...@li...; Jon Maloy <jon...@er...>; Xue, Ying <yin...@wi...> Subject: Re: [PATCH v2] tipc: allow service ranges to be connect()'ed on RDM/DGRAM No love for this? :( RDM connect is pretty handicapped right now |
From: Erik H. <eri...@gm...> - 2019-03-15 18:52:51
|
No love for this? :( RDM connect is pretty handicapped right now |
From: <eri...@gm...> - 2019-03-11 20:46:33
|
From: Erik Hugne <eri...@gm...> We move the check that prevents connecting service service ranges to after the RDM/DGRAM check, and split out address sanitizing to a separate function that also validates the service range. Signed-off-by: Erik Hugne <eri...@gm...> --- I was pondering to move all sanitize stuff (including length check) to one function and just call that before socket is locked, but the AF_UNSPEC stuff made it complicated, so this just solves the problem i had with connect()'ing a multicast address to an RDM socket. net/tipc/socket.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 3274ef625dba..195078128c0d 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -2349,6 +2349,16 @@ static int tipc_wait_for_connect(struct socket *sock, long *timeo_p) return 0; } +static int tipc_sockaddr_is_sane(struct sockaddr_tipc *addr) +{ + if (addr->family != AF_TIPC) + return 0; + if (addr->addrtype == TIPC_SERVICE_RANGE) + return (addr->addr.nameseq.lower <= addr->addr.nameseq.upper); + return (addr->addrtype == TIPC_SERVICE_ADDR || + addr->addrtype == TIPC_SOCKET_ADDR); +} + /** * tipc_connect - establish a connection to another TIPC port * @sock: socket structure @@ -2384,18 +2394,18 @@ static int tipc_connect(struct socket *sock, struct sockaddr *dest, if (!tipc_sk_type_connectionless(sk)) res = -EINVAL; goto exit; - } else if (dst->family != AF_TIPC) { - res = -EINVAL; } - if (dst->addrtype != TIPC_ADDR_ID && dst->addrtype != TIPC_ADDR_NAME) + if (!tipc_sockaddr_is_sane(dst)) { res = -EINVAL; - if (res) goto exit; - + } /* DGRAM/RDM connect(), just save the destaddr */ if (tipc_sk_type_connectionless(sk)) { memcpy(&tsk->peer, dest, destlen); goto exit; + } else if (dst->addrtype == TIPC_SERVICE_RANGE) { + res = -EINVAL; + goto exit; } previous = sk->sk_state; -- 2.14.1 |
From: Jon M. <jon...@er...> - 2019-03-11 11:47:14
|
I think we should make the sanity control here, even if it may be redundant. To first see connect() return ok, and then have a message rejected because is illogical and confusing to the user. Besides, this is not time critical. ///jon From: Erik Hugne <eri...@gm...> Sent: 9-Mar-19 03:42 To: tip...@li...; Jon Maloy <jon...@er...>; Xue, Ying <yin...@wi...> Subject: Re: [PATCH net] tipc: allow multicast address to be associated for RDM/DGRAM sockets OTOH, an invalid address will be caught on the first send(), where -EHOSTUNREACH will be returned. Jon, what do you think? Den fre 8 mars 2019 kl 21:16 skrev Erik Hugne <eri...@gm...<mailto:eri...@gm...>>: I just realized that we may need to do some basic validation of TIPC_MULTICAST addresses. With this patch, it will allow to connect() an address with lower > upper, which is bad. Den fre 8 mars 2019 kl 20:09 skrev <eri...@gm...<mailto:eri...@gm...>>: From: Erik Hugne <eri...@gm...<mailto:eri...@gm...>> Perform the address type validation after we check if it's a connectionless socket, allowing TIPC_MULTICAST addresses to be associated with RDM/DGRAM sockets. This was broken in the commit listed below. Fixes: 23998835be98 ("tipc: improve address sanity check in tipc_connect()") Signed-off-by: Erik Hugne <eri...@gm...<mailto:eri...@gm...>> --- net/tipc/socket.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index e482b342bfa8..0ad8e6585adf 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -2387,16 +2387,15 @@ static int tipc_connect(struct socket *sock, struct sockaddr *dest, } else if (dst->family != AF_TIPC) { res = -EINVAL; } - if (dst->addrtype != TIPC_ADDR_ID && dst->addrtype != TIPC_ADDR_NAME) - res = -EINVAL; - if (res) - goto exit; - /* DGRAM/RDM connect(), just save the destaddr */ if (tipc_sk_type_connectionless(sk)) { memcpy(&tsk->peer, dest, destlen); goto exit; } + if (dst->addrtype != TIPC_ADDR_ID && dst->addrtype != TIPC_ADDR_NAME) + res = -EINVAL; + if (res) + goto exit; previous = sk->sk_state; -- 2.14.1 |
From: Erik H. <eri...@gm...> - 2019-03-09 08:42:12
|
OTOH, an invalid address will be caught on the first send(), where -EHOSTUNREACH will be returned. Jon, what do you think? Den fre 8 mars 2019 kl 21:16 skrev Erik Hugne <eri...@gm...>: > I just realized that we may need to do some basic validation of > TIPC_MULTICAST addresses. > With this patch, it will allow to connect() an address with lower > upper, > which is bad. > > > Den fre 8 mars 2019 kl 20:09 skrev <eri...@gm...>: > >> From: Erik Hugne <eri...@gm...> >> >> Perform the address type validation after we check if it's a >> connectionless socket, allowing TIPC_MULTICAST addresses to be >> associated with RDM/DGRAM sockets. This was broken in the commit >> listed below. >> >> Fixes: 23998835be98 ("tipc: improve address sanity check in >> tipc_connect()") >> Signed-off-by: Erik Hugne <eri...@gm...> >> --- >> net/tipc/socket.c | 9 ++++----- >> 1 file changed, 4 insertions(+), 5 deletions(-) >> >> diff --git a/net/tipc/socket.c b/net/tipc/socket.c >> index e482b342bfa8..0ad8e6585adf 100644 >> --- a/net/tipc/socket.c >> +++ b/net/tipc/socket.c >> @@ -2387,16 +2387,15 @@ static int tipc_connect(struct socket *sock, >> struct sockaddr *dest, >> } else if (dst->family != AF_TIPC) { >> res = -EINVAL; >> } >> - if (dst->addrtype != TIPC_ADDR_ID && dst->addrtype != >> TIPC_ADDR_NAME) >> - res = -EINVAL; >> - if (res) >> - goto exit; >> - >> /* DGRAM/RDM connect(), just save the destaddr */ >> if (tipc_sk_type_connectionless(sk)) { >> memcpy(&tsk->peer, dest, destlen); >> goto exit; >> } >> + if (dst->addrtype != TIPC_ADDR_ID && dst->addrtype != >> TIPC_ADDR_NAME) >> + res = -EINVAL; >> + if (res) >> + goto exit; >> >> previous = sk->sk_state; >> >> -- >> 2.14.1 >> >> |
From: Erik H. <eri...@gm...> - 2019-03-08 20:17:22
|
I just realized that we may need to do some basic validation of TIPC_MULTICAST addresses. With this patch, it will allow to connect() an address with lower > upper, which is bad. Den fre 8 mars 2019 kl 20:09 skrev <eri...@gm...>: > From: Erik Hugne <eri...@gm...> > > Perform the address type validation after we check if it's a > connectionless socket, allowing TIPC_MULTICAST addresses to be > associated with RDM/DGRAM sockets. This was broken in the commit > listed below. > > Fixes: 23998835be98 ("tipc: improve address sanity check in > tipc_connect()") > Signed-off-by: Erik Hugne <eri...@gm...> > --- > net/tipc/socket.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/net/tipc/socket.c b/net/tipc/socket.c > index e482b342bfa8..0ad8e6585adf 100644 > --- a/net/tipc/socket.c > +++ b/net/tipc/socket.c > @@ -2387,16 +2387,15 @@ static int tipc_connect(struct socket *sock, > struct sockaddr *dest, > } else if (dst->family != AF_TIPC) { > res = -EINVAL; > } > - if (dst->addrtype != TIPC_ADDR_ID && dst->addrtype != > TIPC_ADDR_NAME) > - res = -EINVAL; > - if (res) > - goto exit; > - > /* DGRAM/RDM connect(), just save the destaddr */ > if (tipc_sk_type_connectionless(sk)) { > memcpy(&tsk->peer, dest, destlen); > goto exit; > } > + if (dst->addrtype != TIPC_ADDR_ID && dst->addrtype != > TIPC_ADDR_NAME) > + res = -EINVAL; > + if (res) > + goto exit; > > previous = sk->sk_state; > > -- > 2.14.1 > > |
From: <eri...@gm...> - 2019-03-08 19:09:32
|
From: Erik Hugne <eri...@gm...> Perform the address type validation after we check if it's a connectionless socket, allowing TIPC_MULTICAST addresses to be associated with RDM/DGRAM sockets. This was broken in the commit listed below. Fixes: 23998835be98 ("tipc: improve address sanity check in tipc_connect()") Signed-off-by: Erik Hugne <eri...@gm...> --- net/tipc/socket.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index e482b342bfa8..0ad8e6585adf 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -2387,16 +2387,15 @@ static int tipc_connect(struct socket *sock, struct sockaddr *dest, } else if (dst->family != AF_TIPC) { res = -EINVAL; } - if (dst->addrtype != TIPC_ADDR_ID && dst->addrtype != TIPC_ADDR_NAME) - res = -EINVAL; - if (res) - goto exit; - /* DGRAM/RDM connect(), just save the destaddr */ if (tipc_sk_type_connectionless(sk)) { memcpy(&tsk->peer, dest, destlen); goto exit; } + if (dst->addrtype != TIPC_ADDR_ID && dst->addrtype != TIPC_ADDR_NAME) + res = -EINVAL; + if (res) + goto exit; previous = sk->sk_state; -- 2.14.1 |
From: Erik H. <eri...@gm...> - 2019-03-08 17:24:00
|
Seems to have been broken since: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/net/tipc/socket.c?id=23998835be98a6842e5698fa1824f404c7de850d I would say net. Ill submit a new wit proper subject and "Fixes" tag. //E On Fri, 8 Mar 2019, 13:38 Jon Maloy, <jon...@er...> wrote: > Looks ok with me. Was there something broken, or is it a new feature ? > I.e., should I send it to net or net-next ? > > ///jon > > > > -----Original Message----- > > From: eri...@gm... <eri...@gm...> > > Sent: 7-Mar-19 15:27 > > To: tip...@li...; Jon Maloy > > <jon...@er...>; yin...@wi... > > Cc: Erik Hugne <eri...@gm...> > > Subject: [PATCH] tipc: allow multicast address to be associated for > > RDM/DGRAM sockets > > > > From: Erik Hugne <eri...@gm...> > > > > Perform the address type validation after we check if it's a > connectionless > > socket, allowing TIPC_MULTICAST addresses to be associated with > > RDM/DGRAM sockets. > > --- > > net/tipc/socket.c | 9 ++++----- > > 1 file changed, 4 insertions(+), 5 deletions(-) > > > > diff --git a/net/tipc/socket.c b/net/tipc/socket.c index > > 3274ef625dba..dbfe12b07461 100644 > > --- a/net/tipc/socket.c > > +++ b/net/tipc/socket.c > > @@ -2387,16 +2387,15 @@ static int tipc_connect(struct socket *sock, > struct > > sockaddr *dest, > > } else if (dst->family != AF_TIPC) { > > res = -EINVAL; > > } > > - if (dst->addrtype != TIPC_ADDR_ID && dst->addrtype != > > TIPC_ADDR_NAME) > > - res = -EINVAL; > > - if (res) > > - goto exit; > > - > > /* DGRAM/RDM connect(), just save the destaddr */ > > if (tipc_sk_type_connectionless(sk)) { > > memcpy(&tsk->peer, dest, destlen); > > goto exit; > > } > > + if (dst->addrtype != TIPC_ADDR_ID && dst->addrtype != > > TIPC_ADDR_NAME) > > + res = -EINVAL; > > + if (res) > > + goto exit; > > > > previous = sk->sk_state; > > > > -- > > 2.14.1 > > |
From: Jon M. <jon...@er...> - 2019-03-08 12:39:05
|
Looks ok with me. Was there something broken, or is it a new feature ? I.e., should I send it to net or net-next ? ///jon > -----Original Message----- > From: eri...@gm... <eri...@gm...> > Sent: 7-Mar-19 15:27 > To: tip...@li...; Jon Maloy > <jon...@er...>; yin...@wi... > Cc: Erik Hugne <eri...@gm...> > Subject: [PATCH] tipc: allow multicast address to be associated for > RDM/DGRAM sockets > > From: Erik Hugne <eri...@gm...> > > Perform the address type validation after we check if it's a connectionless > socket, allowing TIPC_MULTICAST addresses to be associated with > RDM/DGRAM sockets. > --- > net/tipc/socket.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/net/tipc/socket.c b/net/tipc/socket.c index > 3274ef625dba..dbfe12b07461 100644 > --- a/net/tipc/socket.c > +++ b/net/tipc/socket.c > @@ -2387,16 +2387,15 @@ static int tipc_connect(struct socket *sock, struct > sockaddr *dest, > } else if (dst->family != AF_TIPC) { > res = -EINVAL; > } > - if (dst->addrtype != TIPC_ADDR_ID && dst->addrtype != > TIPC_ADDR_NAME) > - res = -EINVAL; > - if (res) > - goto exit; > - > /* DGRAM/RDM connect(), just save the destaddr */ > if (tipc_sk_type_connectionless(sk)) { > memcpy(&tsk->peer, dest, destlen); > goto exit; > } > + if (dst->addrtype != TIPC_ADDR_ID && dst->addrtype != > TIPC_ADDR_NAME) > + res = -EINVAL; > + if (res) > + goto exit; > > previous = sk->sk_state; > > -- > 2.14.1 |
From: <eri...@gm...> - 2019-03-07 20:26:57
|
From: Erik Hugne <eri...@gm...> Perform the address type validation after we check if it's a connectionless socket, allowing TIPC_MULTICAST addresses to be associated with RDM/DGRAM sockets. --- net/tipc/socket.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 3274ef625dba..dbfe12b07461 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -2387,16 +2387,15 @@ static int tipc_connect(struct socket *sock, struct sockaddr *dest, } else if (dst->family != AF_TIPC) { res = -EINVAL; } - if (dst->addrtype != TIPC_ADDR_ID && dst->addrtype != TIPC_ADDR_NAME) - res = -EINVAL; - if (res) - goto exit; - /* DGRAM/RDM connect(), just save the destaddr */ if (tipc_sk_type_connectionless(sk)) { memcpy(&tsk->peer, dest, destlen); goto exit; } + if (dst->addrtype != TIPC_ADDR_ID && dst->addrtype != TIPC_ADDR_NAME) + res = -EINVAL; + if (res) + goto exit; previous = sk->sk_state; -- 2.14.1 |
From: David M. <da...@da...> - 2019-03-05 20:50:20
|
From: Jon Maloy <jon...@er...> Date: Mon, 4 Mar 2019 23:26:10 +0100 > From: Erik Hugne <eri...@gm...> > > Fix regression bug introduced in > commit 365ad353c256 ("tipc: reduce risk of user starvation during link > congestion") > > Only signal -EDESTADDRREQ for RDM/DGRAM if we don't have a cached > sockaddr. > > Signed-off-by: Erik Hugne <eri...@gm...> > Signed-off-by: Jon Maloy <jon...@er...> Please provide a proper Fixes: tag next time, I fixed it up for you this time around. Applied, thanks. |
From: Jon M. <jon...@er...> - 2019-03-04 22:26:22
|
From: Erik Hugne <eri...@gm...> Fix regression bug introduced in commit 365ad353c256 ("tipc: reduce risk of user starvation during link congestion") Only signal -EDESTADDRREQ for RDM/DGRAM if we don't have a cached sockaddr. Signed-off-by: Erik Hugne <eri...@gm...> Signed-off-by: Jon Maloy <jon...@er...> --- net/tipc/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 70343ac..139694f 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -1333,7 +1333,7 @@ static int __tipc_sendmsg(struct socket *sock, struct msghdr *m, size_t dlen) if (unlikely(!dest)) { dest = &tsk->peer; - if (!syn || dest->family != AF_TIPC) + if (!syn && dest->family != AF_TIPC) return -EDESTADDRREQ; } -- 2.1.4 |
From: Erik H. <eri...@gm...> - 2019-03-04 10:57:41
|
If you are interested in network redirection support for bash: https://github.com/Hugne/bash/commit/master Currently, it works in RDM/DGRAM mode only i want to keep the interface simple and not involve any seqpacket/rdm switches in the file path specification. So currently, you can do something like this: Write and read (a simple RDM echo server is running on 1000/123) > # exec 3 <>/dev/tipc/1000/123 > # echo FOO >&3 > # cat <&3 FOO Write in its simplest form > # echo FOO > /dev/tipc/1000/123 I have not added any serving socket functionality, bash don't have that for tcp/udp redir either. Any thoughts or comments? |
From: <eri...@gm...> - 2019-03-03 18:51:39
|
From: Erik Hugne <eri...@gm...> Fix regression bug introduced in commit 365ad353c256 ("tipc: reduce risk of user starvation during link congestion") Only signal -EDESTADDRREQ for RDM/DGRAM if we don't have a cached sockaddr. Signed-off-by: Erik Hugne <eri...@gm...> --- Jon/Ying, i have a very limited test setup, i hope you can review and ensure that the proposed change is safe. I have tested it (on net-next) that it at least solves the problem i had. Once the fix is mainline, i will submit patches to bash for shell network redirection. This should be in net, because it's a bug that breaks connectionless messaging in many ways. Feel free to forward it there after your review/signoff. net/tipc/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index e482b342bfa8..3274ef625dba 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -1333,7 +1333,7 @@ static int __tipc_sendmsg(struct socket *sock, struct msghdr *m, size_t dlen) if (unlikely(!dest)) { dest = &tsk->peer; - if (!syn || dest->family != AF_TIPC) + if (!syn && dest->family != AF_TIPC) return -EDESTADDRREQ; } -- 2.14.1 |
From: Erik H. <eri...@gm...> - 2019-03-02 20:12:06
|
Yes, this is a regression bug.. tested on my ubuntu vm with 4.13 kernel It seems that it's still in net-next, https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/tree/net/tipc/socket.c#n1334 syn is always false for RDM, leading to this check to fail with EDESTADDRREQ In older kernels there was another bug where m->msg_namelen was checked (even if we used a cached sockaddr), but that seems to have been fixed Den lör 2 mars 2019 kl 19:57 skrev Erik Hugne <eri...@gm...>: > It was added in this one, sorry > > https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/net/tipc/socket.c?id=f2f8036e391eb82ee78764483f869f2feafb5da8 > > Den lör 2 mars 2019 kl 19:21 skrev Erik Hugne <eri...@gm...>: > >> Hi, i dont seem to be able to post to the list for some reason.. :/ >> >> >> I'm doing some TIPC related work on the GNU bash project, and got stuck >> when i tried to set up a RDM socket and associate a sockaddr with it (as >> was introduced with this commit) >> >> https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/net/tipc/socket.c?id=66bc1e8d5d1d156b1e85d8c6925225ad8cbdf523 >> >> >> sendmsg() return -EDESTADDRREQ.. >> >> I dont have any bash code to share yet, but you can reproduce the with >> the TLS demo: >> https://github.com/Hugne/tls_tipc >> > |