netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/2] tipc: honor msg2addr return value
@ 2016-06-27 11:34 Richard Alpe
  2016-06-27 11:34 ` [PATCH net-next 2/2] tipc: rename udp_port in struct udp_media_addr Richard Alpe
  2016-06-29  9:18 ` [PATCH net-next 1/2] tipc: honor msg2addr return value David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Richard Alpe @ 2016-06-27 11:34 UTC (permalink / raw)
  To: netdev; +Cc: tipc-discussion

The UDP msg2addr function tipc_udp_msg2addr() can return -EINVAL which
prior to this patch was unhanded in the caller.

Signed-off-by: Richard Alpe <richard.alpe@ericsson.com>
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
---
 net/tipc/discover.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/tipc/discover.c b/net/tipc/discover.c
index ad9d477..6b109a8 100644
--- a/net/tipc/discover.c
+++ b/net/tipc/discover.c
@@ -135,9 +135,12 @@ void tipc_disc_rcv(struct net *net, struct sk_buff *skb,
 	u16 caps = msg_node_capabilities(hdr);
 	bool respond = false;
 	bool dupl_addr = false;
+	int err;
 
-	bearer->media->msg2addr(bearer, &maddr, msg_media_addr(hdr));
+	err = bearer->media->msg2addr(bearer, &maddr, msg_media_addr(hdr));
 	kfree_skb(skb);
+	if (err)
+		return;
 
 	/* Ensure message from node is valid and communication is permitted */
 	if (net_id != tn->net_id)
-- 
2.1.4


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-06-29  9:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-27 11:34 [PATCH net-next 1/2] tipc: honor msg2addr return value Richard Alpe
2016-06-27 11:34 ` [PATCH net-next 2/2] tipc: rename udp_port in struct udp_media_addr Richard Alpe
2016-06-29  9:19   ` David Miller
2016-06-29  9:18 ` [PATCH net-next 1/2] tipc: honor msg2addr return value David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).