Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1515469
| From | Asbjoern Sloth Toennesen <asbjorn@asbjorn.st> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH net-next 3/5] net: l2tp: netlink: l2tp_nl_tunnel_send: set UDP6 checksum flags |
| Date | 2016-11-05 00:00 +0100 |
| Message-ID | <szVCO-7Wf-29@gated-at.bofh.it> (permalink) |
| References | <szVCN-7Wf-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This patch causes the proper attribute flags to be set, in the case that IPv6 UDP checksums are disabled, so that userspace ie. `ip l2tp show tunnel` knows about it. Signed-off-by: Asbjoern Sloth Toennesen <asbjorn@asbjorn.st> --- net/l2tp/l2tp_netlink.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/net/l2tp/l2tp_netlink.c b/net/l2tp/l2tp_netlink.c index e45c5409..1b3fcde 100644 --- a/net/l2tp/l2tp_netlink.c +++ b/net/l2tp/l2tp_netlink.c @@ -385,6 +385,16 @@ static int l2tp_nl_tunnel_send(struct sk_buff *skb, u32 portid, u32 seq, int fla nla_put_flag(skb, L2TP_ATTR_UDP_CSUM)) goto nla_put_failure; break; +#if IS_ENABLED(CONFIG_IPV6) + case AF_INET6: + if (udp_get_no_check6_tx(sk) && + nla_put_flag(skb, L2TP_ATTR_UDP_ZERO_CSUM6_TX)) + goto nla_put_failure; + if (udp_get_no_check6_rx(sk) && + nla_put_flag(skb, L2TP_ATTR_UDP_ZERO_CSUM6_RX)) + goto nla_put_failure; + break; +#endif } if (nla_put_u16(skb, L2TP_ATTR_UDP_SPORT, ntohs(inet->inet_sport)) || nla_put_u16(skb, L2TP_ATTR_UDP_DPORT, ntohs(inet->inet_dport))) -- 2.10.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH net-next 1/5] net: l2tp: fix L2TP_ATTR_UDP_CSUM attribute type Asbjoern Sloth Toennesen <asbjorn@asbjorn.st> - 2016-11-05 00:00 +0100
[PATCH net-next 4/5] net: l2tp: cleanup: remove redundant condition Asbjoern Sloth Toennesen <asbjorn@asbjorn.st> - 2016-11-05 00:00 +0100
[PATCH net-next 3/5] net: l2tp: netlink: l2tp_nl_tunnel_send: set UDP6 checksum flags Asbjoern Sloth Toennesen <asbjorn@asbjorn.st> - 2016-11-05 00:00 +0100
Re: [PATCH net-next 1/5] net: l2tp: fix L2TP_ATTR_UDP_CSUM attribute type David Miller <davem@davemloft.net> - 2016-11-07 19:10 +0100
Re: [PATCH net-next 1/5] net: l2tp: fix L2TP_ATTR_UDP_CSUM attribute type Asbjørn Sloth Tønnesen <asbjorn@asbjorn.st> - 2016-11-07 22:10 +0100
csiph-web