Commit e9942923 authored by Richard Alpe's avatar Richard Alpe Committed by David S. Miller

tipc: honor msg2addr return value

The UDP msg2addr function tipc_udp_msg2addr() can return -EINVAL which
prior to this patch was unhanded in the caller.
Signed-off-by: default avatarRichard Alpe <richard.alpe@ericsson.com>
Acked-by: default avatarJon Maloy <jon.maloy@ericsson.com>
Acked-by: default avatarYing Xue <ying.xue@windriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8a01ed70
...@@ -135,9 +135,12 @@ void tipc_disc_rcv(struct net *net, struct sk_buff *skb, ...@@ -135,9 +135,12 @@ void tipc_disc_rcv(struct net *net, struct sk_buff *skb,
u16 caps = msg_node_capabilities(hdr); u16 caps = msg_node_capabilities(hdr);
bool respond = false; bool respond = false;
bool dupl_addr = 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); kfree_skb(skb);
if (err)
return;
/* Ensure message from node is valid and communication is permitted */ /* Ensure message from node is valid and communication is permitted */
if (net_id != tn->net_id) if (net_id != tn->net_id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment