From: Andreas Schultz <hidden> Date: 2015-10-08 16:08:57
All users of iptunnel_xmit expect the return value to be the packet
length on success (>0), negative for a tx error and zero for a tx
dropped error. In cset 0e6fbc5b6c6218987c93b8c7ca60cf786062899d the
negative return case was lost.
This bug was introduced when the ip_tunnel_core code was refactored.
Fixes: 0e6fbc5b6c6218987c93b8c7ca60cf786062899d
Signed-off-by: Andreas Schultz <redacted>
---
Change in v2:
- remove unused variable pkt_len
Change in v3:
- reworked based on comment from Jiri Benc
---
net/ipv4/ip_tunnel_core.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
From: Andreas Schultz <hidden> Date: 2015-10-08 16:08:57
udp_tunnel_xmit_skb() will free the skb and release the rt->dst
reference in the error case. There is no need (and it would actully
trigger a warning) when we did.
This problem was not visible before, as udp_tunnel_xmit_skb() would
never return a value < 0
---
net/tipc/udp_media.c | 4 ----
1 file changed, 4 deletions(-)
On Thu, 8 Oct 2015 18:08:49 +0200, Andreas Schultz wrote:
All users of iptunnel_xmit expect the return value to be the packet
length on success (>0), negative for a tx error and zero for a tx
dropped error. In cset 0e6fbc5b6c6218987c93b8c7ca60cf786062899d the
negative return case was lost.
This bug was introduced when the ip_tunnel_core code was refactored.
Fixes: 0e6fbc5b6c6218987c93b8c7ca60cf786062899d
Signed-off-by: Andreas Schultz <redacted>
On Thu, 8 Oct 2015 18:08:50 +0200, Andreas Schultz wrote:
udp_tunnel_xmit_skb() will free the skb and release the rt->dst
reference in the error case. There is no need (and it would actully
trigger a warning) when we did.
This problem was not visible before, as udp_tunnel_xmit_skb() would
never return a value < 0
@@ -181,10 +181,6 @@ static int tipc_udp_send_msg(struct net *net, struct sk_buff *skb,dst->ipv4.s_addr,0,ttl,0,src->udp_port,dst->udp_port,false,true);-if(err<0){-ip_rt_put(rt);-gototx_error;-}#if IS_ENABLED(CONFIG_IPV6)}else{structdst_entry*ndst;
Not sure what the intended return value of struct tipc_media->send_msg
is but it seems to be completely ignored anyway.
Acked-by: Jiri Benc <redacted>
--
Jiri Benc
On Thu, Oct 8, 2015 at 9:08 AM, Andreas Schultz [off-list ref] wrote:
All users of iptunnel_xmit expect the return value to be the packet
length on success (>0), negative for a tx error and zero for a tx
dropped error. In cset 0e6fbc5b6c6218987c93b8c7ca60cf786062899d the
negative return case was lost.
This bug was introduced when the ip_tunnel_core code was refactored.
Fixes: 0e6fbc5b6c6218987c93b8c7ca60cf786062899d
Signed-off-by: Andreas Schultz <redacted>
Thanks for the fix.
Acked-by: Pravin B Shelar <redacted>