diff options
author | Richard Alpe <richard.alpe@ericsson.com> | 2016-08-26 11:52:55 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-27 07:38:41 +0300 |
commit | fdb3accc2c15fabc2b687b2819da9167027c61b6 (patch) | |
tree | fa1dd5ee0b2520a8d6746960bece90f26a4f7aef /net/tipc/bearer.c | |
parent | c9b64d492b1fbc732e3a26b284060c949b737bce (diff) | |
download | linux-fdb3accc2c15fabc2b687b2819da9167027c61b6.tar.xz |
tipc: add the ability to get UDP options via netlink
Add UDP bearer options to netlink bearer get message. This is used by
the tipc user space tool to display UDP options.
The UDP bearer information is passed using either a sockaddr_in or
sockaddr_in6 structs. This means the user space receiver should
intermediately store the retrieved data in a large enough struct
(sockaddr_strage) before casting to the proper IP version type.
Signed-off-by: Richard Alpe <richard.alpe@ericsson.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/bearer.c')
-rw-r--r-- | net/tipc/bearer.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index d7b442dd6669..975dbeb60ab0 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c @@ -712,6 +712,14 @@ static int __tipc_nl_add_bearer(struct tipc_nl_msg *msg, goto prop_msg_full; nla_nest_end(msg->skb, prop); + +#ifdef CONFIG_TIPC_MEDIA_UDP + if (bearer->media->type_id == TIPC_MEDIA_TYPE_UDP) { + if (tipc_udp_nl_add_bearer_data(msg, bearer)) + goto attr_msg_full; + } +#endif + nla_nest_end(msg->skb, attrs); genlmsg_end(msg->skb, hdr); |