[PATCH iproute2 1/2] tipc: introduce bearer add for remoteip

2016-08-30 Thread Richard Alpe
for TIPC UDP bearers to work in environments where IP multicast is disabled. Signed-off-by: Richard Alpe Reviewed-by: Parthasarathy Bhuvaragan Acked-by: Jon Maloy --- man/man8/tipc-bearer.8 | 24 ++ tipc/bearer.c | 125 +

[PATCH iproute2 2/2] tipc: add the ability to get UDP bearer options

2016-08-30 Thread Richard Alpe
it (replicast) we handle the TIPC_NLA_UDP_MULTI_REMOTEIP flag and send a TIPC_NL_UDP_GET_REMOTEIP query transparently to the user. Signed-off-by: Richard Alpe Reviewed-by: Parthasarathy Bhuvaragan Acked-by: Jon Maloy --- man/man8/tipc-bearer.8 | 5 +- tipc/bearer.c | 272

[PATCH net-next 4/7] tipc: introduce UDP replicast

2016-08-26 Thread Richard Alpe
costly as we have to copy each skb and send the copies individually. Signed-off-by: Richard Alpe Reviewed-by: Jon Maloy --- include/uapi/linux/tipc_netlink.h | 1 + net/tipc/bearer.c | 44 ++ net/tipc/bearer.h | 1 + net/tipc/netlink.c

[PATCH net-next 3/7] tipc: refactor multicast ip check

2016-08-26 Thread Richard Alpe
Add a function to check if a tipc UDP media address is a multicast address or not. This is a purely cosmetic change. Signed-off-by: Richard Alpe Reviewed-by: Jon Maloy --- net/tipc/udp_media.c | 34 +++--- 1 file changed, 19 insertions(+), 15 deletions(-) diff

[PATCH net-next 1/7] tipc: split UDP nl address parsing

2016-08-26 Thread Richard Alpe
Split the UDP netlink parse function so that it only parses one netlink attribute at the time. This makes the parse function more generic and allow future UDP API functions to use it for parsing. Signed-off-by: Richard Alpe Reviewed-by: Jon Maloy Acked-by: Ying Xue --- net/tipc/udp_media.c

[PATCH net-next 0/7] tipc: introduce UDP replicast

2016-08-26 Thread Richard Alpe
add remote addresses to the replicast list. Richard Alpe (7): tipc: split UDP nl address parsing tipc: split UDP send function tipc: refactor multicast ip check tipc: introduce UDP replicast tipc: add replicast peer discovery tipc: add the ability to get UDP options via netlink tipc

[PATCH net-next 6/7] tipc: add the ability to get UDP options via netlink

2016-08-26 Thread Richard Alpe
large enough struct (sockaddr_strage) before casting to the proper IP version type. Signed-off-by: Richard Alpe Reviewed-by: Jon Maloy Acked-by: Ying Xue --- include/uapi/linux/tipc_netlink.h | 2 ++ net/tipc/bearer.c | 8 + net/tipc/udp_media.c | 61

[PATCH net-next 2/7] tipc: split UDP send function

2016-08-26 Thread Richard Alpe
Split the UDP send function into two. One callback that prepares the skb and one transmit function that sends the skb. This will come in handy in later patches, when we introduce UDP replicast. Signed-off-by: Richard Alpe Reviewed-by: Jon Maloy Acked-by: Ying Xue --- net/tipc/udp_media.c | 50

[PATCH net-next 7/7] tipc: add UDP remoteip dump to netlink API

2016-08-26 Thread Richard Alpe
e. To handle this we introduce the new netlink command TIPC_NL_UDP_GET_REMOTEIP. This command is intended to be called when the bearer data message has the TIPC_NLA_UDP_MULTI_REMOTEIP flag set, indicating there are more than one remote ip (replicast). Signed-off-by: Richard Alpe Reviewed-by: Jon

[PATCH net-next 5/7] tipc: add replicast peer discovery

2016-08-26 Thread Richard Alpe
discovery messages sent using replicast which the node cannot "reply" to using mutlicast, leaving the link FSM in a limbo state. Signed-off-by: Richard Alpe Reviewed-by: Jon Maloy --- net/tipc/udp_media.c | 83 ++-- 1 file changed, 80

[PATCH iproute2] tipc: add peer remove functionality

2016-08-22 Thread Richard Alpe
This enables a user to remove an offline peer from the kernel data structures. This could for example be useful when deliberately scaling in peer nodes in a cloud environment. This functionality was first merged in: f9dec657e4 (Richard Alpe tipc: add peer remove functionality) And later backed

[PATCH net-next v3] tipc: add peer removal functionality

2016-08-18 Thread Richard Alpe
Add TIPC_NL_PEER_REMOVE netlink command. This command can remove an offline peer node from the internal data structures. This will be supported by the tipc user space tool in iproute2. Signed-off-by: Richard Alpe Reviewed-by: Jon Maloy Acked-by: Ying Xue --- include/uapi/linux/tipc_netlink.h

[PATCH iproute2 v2 1/2] tipc: fix UDP bearer synopsis

2016-08-15 Thread Richard Alpe
Local ip is not required to identify a UDP bearer and shouldn't be passed to bearer disable, set or get. In this patch we remove the localip entry from the synopsis of these functions. Signed-off-by: Richard Alpe --- man/man8/tipc-bearer.8 | 14 -- 1 file changed, 4 inser

[PATCH iproute2 v2 2/2] tipc: refactor bearer identification

2016-08-15 Thread Richard Alpe
Introduce a generic function (nl_add_bearer_name()) that identifies a bearer and adds it to an existing netlink message. This reduces code complexity and makes the code a little bit easier to maintain. Signed-off-by: Richard Alpe --- tipc/bearer.c | 313

[PATCH iproute2 1/2] tipc: fix UDP bearer synopsis

2016-08-09 Thread Richard Alpe
Local ip is not required to identify a UDP bearer and shouldn't be passed to bearer disable, set or get. In this patch we remove the localip entry from the synopsis of these functions. Signed-off-by: Richard Alpe --- man/man8/tipc-bearer.8 | 14 -- 1 file changed, 4 inser

[PATCH iproute2 2/2] tipc: refactor bearer identification

2016-08-09 Thread Richard Alpe
Introduce a generic function (nl_add_bearer_name()) that identifies a bearer and adds it to an existing netlink message. This reduces code complexity and makes the code a little bit easier to maintain. Signed-off-by: Richard Alpe --- tipc/bearer.c | 312

[PATCH net-next] tipc: fix nl compat regression for link statistics

2016-07-01 Thread Richard Alpe
an infoleak in tipc_nl_compat_link_dump) Signed-off-by: Richard Alpe --- net/tipc/netlink_compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c index 3ad9fab..1fd4647 100644 --- a/net/tipc/netlink_compat.c +++ b/net/tipc/netlink_com

[PATCH net-next 2/2] tipc: rename udp_port in struct udp_media_addr

2016-06-27 Thread Richard Alpe
Context implies that port in struct "udp_media_addr" is referring to a UDP port. Signed-off-by: Richard Alpe Acked-by: Jon Maloy Acked-by: Ying Xue --- net/tipc/udp_media.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/net/tipc/udp

[PATCH net-next 1/2] tipc: honor msg2addr return value

2016-06-27 Thread Richard Alpe
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 Acked-by: Jon Maloy Acked-by: Ying Xue --- net/tipc/discover.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/tipc

[PATCH net] tipc: fix nametable publication field in nl compat

2016-05-17 Thread Richard Alpe
The publication field of the old netlink API should contain the publication key and not the publication reference. Fixes: 44a8ae94fd55 (tipc: convert legacy nl name table dump to nl compat) Signed-off-by: Richard Alpe Acked-by: Jon Maloy --- net/tipc/netlink_compat.c | 2 +- 1 file changed, 1

[PATCH net-next] tipc: check nl sock before parsing nested attributes

2016-05-16 Thread Richard Alpe
Make sure the socket for which the user is listing publication exists before parsing the socket netlink attributes. Prior to this patch a call without any socket caused a NULL pointer dereference in tipc_nl_publ_dump(). Tested-and-reported-by: Baozeng Ding Signed-off-by: Richard Alpe --- net

[PATCH net-next v1] tipc: make sure IPv6 header fits in skb headroom

2016-03-14 Thread Richard Alpe
Expand headroom further in order to be able to fit the larger IPv6 header. Prior to this patch this caused a skb under panic for certain tipc packets when using IPv6 UDP bearer(s). Signed-off-by: Richard Alpe Acked-by: Jon Maloy --- net/tipc/udp_media.c | 2 +- 1 file changed, 1 insertion

[PATCH net-next v2] tipc: move netlink policies to netlink.c

2016-03-04 Thread Richard Alpe
Make the c files less cluttered and enable netlink attributes to be shared between files. Signed-off-by: Richard Alpe Reviewed-by: Jon Maloy Acked-by: Parthasarathy Bhuvaragan --- net/tipc/bearer.c | 18 +- net/tipc/link.c | 8 -- net/tipc/name_table.c | 6

[PATCH net-next v1 3/4] tipc: safely copy UDP netlink data from user

2016-03-03 Thread Richard Alpe
ed-by: Daniel Borkmann Reported-by: Julia Lawall Signed-off-by: Richard Alpe Acked-by: Jon Maloy Reviewed-by: Erik Hugne --- net/tipc/udp_media.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c index f22

[PATCH net-next v1 4/4] tipc: make sure required IPv6 addresses are scoped

2016-03-03 Thread Richard Alpe
Make sure the user has provided a scope for multicast and link local addresses used locally by a UDP bearer. Signed-off-by: Richard Alpe Acked-by: Jon Maloy Reviewed-by: Erik Hugne --- net/tipc/udp_media.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/tipc/udp_media.c b/net

[PATCH net-next v1 2/4] tipc: don't check link reset on non existing link

2016-03-03 Thread Richard Alpe
Make sure we have a link before checking if it has been reset or not. Prior to this patch tipc_link_is_reset() could be called with a non existing link, resulting in a null pointer dereference. Signed-off-by: Richard Alpe Acked-by: Jon Maloy Reviewed-by: Erik Hugne --- net/tipc/node.c | 2

[PATCH net-next v1 1/4] tipc: add net device to skb before UDP xmit

2016-03-03 Thread Richard Alpe
stats update to iptunnel_xmit()) Signed-off-by: Richard Alpe Acked-by: Jon Maloy Reviewed-by: Erik Hugne --- net/tipc/udp_media.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c index d63a911..f22a5bb1 100644 --- a/net/tipc/udp_media.c +++ b/net

[PATCH net-next v1] tipc: refactor node xmit and fix memory leaks

2016-02-11 Thread Richard Alpe
Refactor tipc_node_xmit() to fail fast and fail early. Fix several potential memory leaks in unexpected error paths. Reported-by: Dmitry Vyukov Reviewed-by: Jon Maloy Signed-off-by: Richard Alpe --- net/tipc/link.c | 8 ++-- net/tipc/node.c | 54

[PATCH net-next v1 2/2] tipc: fix link priority propagation

2016-01-31 Thread Richard Alpe
Currently link priority changes isn't handled for active links. In this patch we resolve this by changing our priority if the peer passes a valid priority in a state message. Reviewed-by: Jon Maloy Signed-off-by: Richard Alpe --- net/tipc/link.c | 6 ++ 1 file changed, 6 inser

[PATCH net-next v1 1/2] tipc: fix link attribute propagation bug

2016-01-31 Thread Richard Alpe
Reported-by: Jason Hu Signed-off-by: Richard Alpe --- net/tipc/link.c | 31 ++- net/tipc/link.h | 6 -- net/tipc/node.c | 9 ++--- 3 files changed, 16 insertions(+), 30 deletions(-) diff --git a/net/tipc/link.c b/net/tipc/link.c index 0c2944f..f156353

Re: [PATCH net-next v1 1/2] tipc: move netlink policies to netlink.h

2016-01-07 Thread Richard Alpe
On 2016-01-05 22:47, David Miller wrote: > From: Richard Alpe > Date: Tue, 5 Jan 2016 10:56:16 +0100 > >> Make the c files less cluttered and enable netlink attributes to be >> shared between files. This will prove useful in a future patch where a >> node message wi

[PATCH iproute2 2/2] tipc: add peer remove functionality

2016-01-05 Thread Richard Alpe
This enables a user to remove an offline peer from the kernel data structures. This could for example be useful when deliberately scaling in peer nodes in a cloud environment. Signed-off-by: Richard Alpe Reviewed-by: Jon Maloy Reviewed-by: Ying Xue --- include/linux/tipc_netlink.h | 1 + man

[PATCH iproute2 1/2] tipc: fix help text spelling error in node.c

2016-01-05 Thread Richard Alpe
--- tipc/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tipc/node.c b/tipc/node.c index 163fb74..201fe1a 100644 --- a/tipc/node.c +++ b/tipc/node.c @@ -245,7 +245,7 @@ static int cmd_node_get(struct nlmsghdr *nlh, const struct cmd *cmd, void cmd_node_help(struct cmdl

[PATCH net-next v1 2/2] tipc: add peer removal functionality

2016-01-05 Thread Richard Alpe
Add TIPC_NL_PEER_REMOVE netlink command. This command can remove an offline peer node from the internal data structures. This will be supported by the tipc user space tool in iproute2. Signed-off-by: Richard Alpe Reviewed-by: Jon Maloy Acked-by: Ying Xue --- include/uapi/linux/tipc_netlink.h

[PATCH net-next v1 1/2] tipc: move netlink policies to netlink.h

2016-01-05 Thread Richard Alpe
Make the c files less cluttered and enable netlink attributes to be shared between files. This will prove useful in a future patch where a node message will contain a nested network. Signed-off-by: Richard Alpe Acked-by: Jon Maloy --- net/tipc/bearer.c | 19 +--- net/tipc/link.c

Re: [PATCH net-next v2] net: Initialize table in fib result

2015-09-17 Thread Richard Alpe
to fix >> the oops, but rather to fix a related problem where a valid lookup should >> be invalidated before creating the rth entry. >> >> Fixes: b7503e0cdb5d ("net: Add FIB table id to rtable") >> Reported-by: Sergey Senozhatsky >> Reported-by: Richard A

Re: [linux-next] oops in ip_route_input_noref

2015-09-16 Thread Richard Alpe
On 2015-09-16 15:57, David Ahern wrote: > On 9/16/15 7:53 AM, Richard Alpe wrote: >>>> I to get an Oops in ip_route_input_noref(). It happens occasionally during >>>> bootup. >>>> KVM environment using virtio driver. Let me know if you need any >>>

Re: [linux-next] oops in ip_route_input_noref

2015-09-16 Thread Richard Alpe
On 2015-09-16 15:53, Richard Alpe wrote: > On 2015-09-16 15:07, David Ahern wrote: >> On 9/16/15 5:50 AM, Richard Alpe wrote: >>> On 2015-09-16 11:24, Sergey Senozhatsky wrote: >>>> Hi, >>>> >>>> 4.3.0-rc1-next-20150916 >>>> >

Re: [linux-next] oops in ip_route_input_noref

2015-09-16 Thread Richard Alpe
On 2015-09-16 15:07, David Ahern wrote: > On 9/16/15 5:50 AM, Richard Alpe wrote: >> On 2015-09-16 11:24, Sergey Senozhatsky wrote: >>> Hi, >>> >>> 4.3.0-rc1-next-20150916 >>> >>> oops after removal of rndis usb device > > Hi Sergey: &g

Re: [linux-next] oops in ip_route_input_noref

2015-09-16 Thread Richard Alpe
On 2015-09-16 11:24, Sergey Senozhatsky wrote: > Hi, > > 4.3.0-rc1-next-20150916 > > oops after removal of rndis usb device > > ... > 8146c052: 00 > 8146c053: 0f b6 55 8a movzbl -0x76(%rbp),%edx > 8146c057: 49 8b bf e8 01 00 00mov0x1

Re: [PATCH iproute2] tipc: introduce TIPC configuration tool

2015-06-04 Thread Richard Alpe
On 2015-06-04 12:23, Pavel Simerda wrote: > - Original Message - >> From: "Stephen Hemminger" >> To: "richard alpe" >> Cc: netdev@vger.kernel.org, tipc-discuss...@lists.sourceforge.net >> Sent: Thursday, May 21, 2015 11:43:40 PM >&g