diff options
Diffstat (limited to 'net/ipv4/ip_sockglue.c')
-rw-r--r-- | net/ipv4/ip_sockglue.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index 4f2d87257309..add019c746f8 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c | |||
@@ -29,8 +29,7 @@ | |||
29 | #include <net/sock.h> | 29 | #include <net/sock.h> |
30 | #include <net/ip.h> | 30 | #include <net/ip.h> |
31 | #include <net/icmp.h> | 31 | #include <net/icmp.h> |
32 | #include <net/tcp.h> | 32 | #include <net/tcp_states.h> |
33 | #include <linux/tcp.h> | ||
34 | #include <linux/udp.h> | 33 | #include <linux/udp.h> |
35 | #include <linux/igmp.h> | 34 | #include <linux/igmp.h> |
36 | #include <linux/netfilter.h> | 35 | #include <linux/netfilter.h> |
@@ -427,8 +426,8 @@ int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval, | |||
427 | err = ip_options_get_from_user(&opt, optval, optlen); | 426 | err = ip_options_get_from_user(&opt, optval, optlen); |
428 | if (err) | 427 | if (err) |
429 | break; | 428 | break; |
430 | if (sk->sk_type == SOCK_STREAM) { | 429 | if (inet->is_icsk) { |
431 | struct tcp_sock *tp = tcp_sk(sk); | 430 | struct inet_connection_sock *icsk = inet_csk(sk); |
432 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 431 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
433 | if (sk->sk_family == PF_INET || | 432 | if (sk->sk_family == PF_INET || |
434 | (!((1 << sk->sk_state) & | 433 | (!((1 << sk->sk_state) & |
@@ -436,10 +435,10 @@ int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval, | |||
436 | inet->daddr != LOOPBACK4_IPV6)) { | 435 | inet->daddr != LOOPBACK4_IPV6)) { |
437 | #endif | 436 | #endif |
438 | if (inet->opt) | 437 | if (inet->opt) |
439 | tp->ext_header_len -= inet->opt->optlen; | 438 | icsk->icsk_ext_hdr_len -= inet->opt->optlen; |
440 | if (opt) | 439 | if (opt) |
441 | tp->ext_header_len += opt->optlen; | 440 | icsk->icsk_ext_hdr_len += opt->optlen; |
442 | tcp_sync_mss(sk, tp->pmtu_cookie); | 441 | icsk->icsk_sync_mss(sk, icsk->icsk_pmtu_cookie); |
443 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 442 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
444 | } | 443 | } |
445 | #endif | 444 | #endif |