diff options
Diffstat (limited to 'net/l2tp/l2tp_netlink.c')
-rw-r--r-- | net/l2tp/l2tp_netlink.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/l2tp/l2tp_netlink.c b/net/l2tp/l2tp_netlink.c index bd7387adea9e..0ac907adb2f4 100644 --- a/net/l2tp/l2tp_netlink.c +++ b/net/l2tp/l2tp_netlink.c | |||
@@ -161,6 +161,13 @@ static int l2tp_nl_cmd_tunnel_create(struct sk_buff *skb, struct genl_info *info | |||
161 | cfg.peer_udp_port = nla_get_u16(info->attrs[L2TP_ATTR_UDP_DPORT]); | 161 | cfg.peer_udp_port = nla_get_u16(info->attrs[L2TP_ATTR_UDP_DPORT]); |
162 | if (info->attrs[L2TP_ATTR_UDP_CSUM]) | 162 | if (info->attrs[L2TP_ATTR_UDP_CSUM]) |
163 | cfg.use_udp_checksums = nla_get_flag(info->attrs[L2TP_ATTR_UDP_CSUM]); | 163 | cfg.use_udp_checksums = nla_get_flag(info->attrs[L2TP_ATTR_UDP_CSUM]); |
164 | |||
165 | #if IS_ENABLED(CONFIG_IPV6) | ||
166 | if (info->attrs[L2TP_ATTR_UDP_ZERO_CSUM6_TX]) | ||
167 | cfg.udp6_zero_tx_checksums = nla_get_flag(info->attrs[L2TP_ATTR_UDP_ZERO_CSUM6_TX]); | ||
168 | if (info->attrs[L2TP_ATTR_UDP_ZERO_CSUM6_RX]) | ||
169 | cfg.udp6_zero_rx_checksums = nla_get_flag(info->attrs[L2TP_ATTR_UDP_ZERO_CSUM6_RX]); | ||
170 | #endif | ||
164 | } | 171 | } |
165 | 172 | ||
166 | if (info->attrs[L2TP_ATTR_DEBUG]) | 173 | if (info->attrs[L2TP_ATTR_DEBUG]) |
@@ -297,8 +304,7 @@ static int l2tp_nl_tunnel_send(struct sk_buff *skb, u32 portid, u32 seq, int fla | |||
297 | case L2TP_ENCAPTYPE_UDP: | 304 | case L2TP_ENCAPTYPE_UDP: |
298 | if (nla_put_u16(skb, L2TP_ATTR_UDP_SPORT, ntohs(inet->inet_sport)) || | 305 | if (nla_put_u16(skb, L2TP_ATTR_UDP_SPORT, ntohs(inet->inet_sport)) || |
299 | nla_put_u16(skb, L2TP_ATTR_UDP_DPORT, ntohs(inet->inet_dport)) || | 306 | nla_put_u16(skb, L2TP_ATTR_UDP_DPORT, ntohs(inet->inet_dport)) || |
300 | nla_put_u8(skb, L2TP_ATTR_UDP_CSUM, | 307 | nla_put_u8(skb, L2TP_ATTR_UDP_CSUM, !sk->sk_no_check_tx)) |
301 | (sk->sk_no_check != UDP_CSUM_NOXMIT))) | ||
302 | goto nla_put_failure; | 308 | goto nla_put_failure; |
303 | /* NOBREAK */ | 309 | /* NOBREAK */ |
304 | case L2TP_ENCAPTYPE_IP: | 310 | case L2TP_ENCAPTYPE_IP: |