Skip to content

Commit

Permalink
tipc: honor msg2addr return value
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Richard Alpe authored and David S. Miller committed Jun 29, 2016
1 parent 8a01ed7 commit e994292
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/tipc/discover.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e994292

Please sign in to comment.