Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1385098
| From | Jiri Slaby <jslaby@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3.12 23/78] udp6: fix UDP/IPv6 encap resubmit path |
| Date | 2016-04-22 13:40 +0200 |
| Message-ID | <rqHBh-1eF-65@gated-at.bofh.it> (permalink) |
| References | <rqH8d-ZP-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Bill Sommerfeld <wsommerfeld@google.com> 3.12-stable review patch. If anyone has any objections, please let me know. =============== [ Upstream commit 59dca1d8a6725a121dae6c452de0b2611d5865dc ] IPv4 interprets a negative return value from a protocol handler as a request to redispatch to a new protocol. In contrast, IPv6 interprets a negative value as an error, and interprets a positive value as a request for redispatch. UDP for IPv6 was unaware of this difference. Change __udp6_lib_rcv() to return a positive value for redispatch. Note that the socket's encap_rcv hook still needs to return a negative value to request dispatch, and in the case of IPv6 packets, adjust IP6CB(skb)->nhoff to identify the byte containing the next protocol. Signed-off-by: Bill Sommerfeld <wsommerfeld@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jiri Slaby <jslaby@suse.cz> --- net/ipv6/udp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 94ca4172b38e..26e1648ca228 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -848,11 +848,9 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, ret = udpv6_queue_rcv_skb(sk, skb); sock_put(sk); - /* a return value > 0 means to resubmit the input, but - * it wants the return to be -protocol, or 0 - */ + /* a return value > 0 means to resubmit the input */ if (ret > 0) - return -ret; + return ret; return 0; } -- 2.8.1
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 3.12 01/78] tunnel: Clear IPCB(skb)->opt before dst_link_failure called Jiri Slaby <jslaby@suse.cz> - 2016-04-22 13:40 +0200 [PATCH 3.12 12/78] qmi_wwan: add Sierra Wireless MC74xx/EM74xx Jiri Slaby <jslaby@suse.cz> - 2016-04-22 13:40 +0200 [PATCH 3.12 25/78] macvtap: always pass ethernet header in linear Jiri Slaby <jslaby@suse.cz> - 2016-04-22 13:40 +0200 [PATCH 3.12 24/78] sh_eth: fix NULL pointer dereference in sh_eth_ring_format() Jiri Slaby <jslaby@suse.cz> - 2016-04-22 13:40 +0200 [PATCH 3.12 09/78] qmi_wwan: Add support for Dell Wireless 5809e 4G Modem Jiri Slaby <jslaby@suse.cz> - 2016-04-22 13:40 +0200 [PATCH 3.12 15/78] net: qmi_wwan: Add SIMCom 7230E Jiri Slaby <jslaby@suse.cz> - 2016-04-22 13:40 +0200 [PATCH 3.12 05/78] net: qmi_wwan: add Netgear AirCard 341U Jiri Slaby <jslaby@suse.cz> - 2016-04-22 13:40 +0200 [PATCH 3.12 14/78] net: qmi_wwan: Add WeTelecom-WPD600N Jiri Slaby <jslaby@suse.cz> - 2016-04-22 13:40 +0200 [PATCH 3.12 16/78] Add Dell Wireless 5809e Gobi 4G HSPA+ Mobile Broadband Card (rev3) to qmi_wwan Jiri Slaby <jslaby@suse.cz> - 2016-04-22 13:40 +0200 [PATCH 3.12 10/78] net: qmi_wwan: add HP lt4111 LTE/EV-DO/HSPA+ Gobi 4G Module Jiri Slaby <jslaby@suse.cz> - 2016-04-22 13:40 +0200 [PATCH 3.12 08/78] qmi_wwan: add the second QMI/network interface for Sierra Wireless MC7305/MC7355 Jiri Slaby <jslaby@suse.cz> - 2016-04-22 13:40 +0200 [PATCH 3.12 13/78] net: qmi_wwan: remove 1199:9070 device id Jiri Slaby <jslaby@suse.cz> - 2016-04-22 13:40 +0200 [PATCH 3.12 07/78] net: qmi_wwan: interface #11 in Sierra Wireless MC73xx is not QMI Jiri Slaby <jslaby@suse.cz> - 2016-04-22 13:40 +0200 [PATCH 3.12 23/78] udp6: fix UDP/IPv6 encap resubmit path Jiri Slaby <jslaby@suse.cz> - 2016-04-22 13:40 +0200
csiph-web