projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a01ed7
)
tipc: honor msg2addr return value
author
Richard Alpe
<
[email protected]
>
Mon, 27 Jun 2016 11:34:06 +0000
(13:34 +0200)
committer
David S. Miller
<
[email protected]
>
Wed, 29 Jun 2016 09:17:37 +0000
(
05:17
-0400)
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 <
[email protected]
>
Acked-by: Jon Maloy <
[email protected]
>
Acked-by: Ying Xue <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/tipc/discover.c
patch
|
blob
|
history
diff --git
a/net/tipc/discover.c
b/net/tipc/discover.c
index ad9d477cc2428a5835fcff849815050bda571299..6b109a808d4c5f43677ff25bd5450d5e8c1dd920 100644
(file)
--- 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)