aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/arp.c4
-rw-r--r--net/ipv4/devinet.c2
-rw-r--r--net/ipv4/fib_frontend.c10
-rw-r--r--net/ipv4/inet_connection_sock.c3
-rw-r--r--net/ipv4/inet_timewait_sock.c2
-rw-r--r--net/ipv4/ip_options.c2
-rw-r--r--net/ipv4/ip_sockglue.c4
-rw-r--r--net/ipv4/ipconfig.c2
-rw-r--r--net/ipv4/netfilter.c2
-rw-r--r--net/ipv4/netfilter/arp_tables.c2
-rw-r--r--net/ipv4/netfilter/ip_tables.c2
-rw-r--r--net/ipv4/netfilter/nf_nat_sip.c2
-rw-r--r--net/ipv4/ping.c8
-rw-r--r--net/ipv4/route.c20
-rw-r--r--net/ipv4/sysctl_net_ipv4.c2
-rw-r--r--net/ipv4/tcp.c8
-rw-r--r--net/ipv4/tcp_input.c2
-rw-r--r--net/ipv4/tcp_output.c24
-rw-r--r--net/ipv4/tcp_probe.c2
-rw-r--r--net/ipv4/udp.c2
20 files changed, 54 insertions, 51 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 18d9b81ecb1a..373b56bf8f49 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -1059,7 +1059,7 @@ static int arp_req_set(struct net *net, struct arpreq *r,
1059 neigh = __neigh_lookup_errno(&arp_tbl, &ip, dev); 1059 neigh = __neigh_lookup_errno(&arp_tbl, &ip, dev);
1060 err = PTR_ERR(neigh); 1060 err = PTR_ERR(neigh);
1061 if (!IS_ERR(neigh)) { 1061 if (!IS_ERR(neigh)) {
1062 unsigned state = NUD_STALE; 1062 unsigned int state = NUD_STALE;
1063 if (r->arp_flags & ATF_PERM) 1063 if (r->arp_flags & ATF_PERM)
1064 state = NUD_PERMANENT; 1064 state = NUD_PERMANENT;
1065 err = neigh_update(neigh, (r->arp_flags & ATF_COM) ? 1065 err = neigh_update(neigh, (r->arp_flags & ATF_COM) ?
@@ -1071,7 +1071,7 @@ static int arp_req_set(struct net *net, struct arpreq *r,
1071 return err; 1071 return err;
1072} 1072}
1073 1073
1074static unsigned arp_state_to_flags(struct neighbour *neigh) 1074static unsigned int arp_state_to_flags(struct neighbour *neigh)
1075{ 1075{
1076 if (neigh->nud_state&NUD_PERMANENT) 1076 if (neigh->nud_state&NUD_PERMANENT)
1077 return ATF_PERM | ATF_COM; 1077 return ATF_PERM | ATF_COM;
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 7ba2196e4377..8a01bfb7c873 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1125,7 +1125,7 @@ skip:
1125 } 1125 }
1126} 1126}
1127 1127
1128static inline bool inetdev_valid_mtu(unsigned mtu) 1128static inline bool inetdev_valid_mtu(unsigned int mtu)
1129{ 1129{
1130 return mtu >= 68; 1130 return mtu >= 68;
1131} 1131}
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index cbe3a68507cf..3854411fa37c 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -136,13 +136,13 @@ static void fib_flush(struct net *net)
136 * Find address type as if only "dev" was present in the system. If 136 * Find address type as if only "dev" was present in the system. If
137 * on_dev is NULL then all interfaces are taken into consideration. 137 * on_dev is NULL then all interfaces are taken into consideration.
138 */ 138 */
139static inline unsigned __inet_dev_addr_type(struct net *net, 139static inline unsigned int __inet_dev_addr_type(struct net *net,
140 const struct net_device *dev, 140 const struct net_device *dev,
141 __be32 addr) 141 __be32 addr)
142{ 142{
143 struct flowi4 fl4 = { .daddr = addr }; 143 struct flowi4 fl4 = { .daddr = addr };
144 struct fib_result res; 144 struct fib_result res;
145 unsigned ret = RTN_BROADCAST; 145 unsigned int ret = RTN_BROADCAST;
146 struct fib_table *local_table; 146 struct fib_table *local_table;
147 147
148 if (ipv4_is_zeronet(addr) || ipv4_is_lbcast(addr)) 148 if (ipv4_is_zeronet(addr) || ipv4_is_lbcast(addr))
@@ -740,7 +740,7 @@ void fib_del_ifaddr(struct in_ifaddr *ifa, struct in_ifaddr *iprim)
740#define BRD_OK 2 740#define BRD_OK 2
741#define BRD0_OK 4 741#define BRD0_OK 4
742#define BRD1_OK 8 742#define BRD1_OK 8
743 unsigned ok = 0; 743 unsigned int ok = 0;
744 int subnet = 0; /* Primary network */ 744 int subnet = 0; /* Primary network */
745 int gone = 1; /* Address is missing */ 745 int gone = 1; /* Address is missing */
746 int same_prefsrc = 0; /* Another primary with same IP */ 746 int same_prefsrc = 0; /* Another primary with same IP */
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index 14409f111bc2..7d972f650a61 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -42,7 +42,8 @@ EXPORT_SYMBOL(sysctl_local_reserved_ports);
42 42
43void inet_get_local_port_range(int *low, int *high) 43void inet_get_local_port_range(int *low, int *high)
44{ 44{
45 unsigned seq; 45 unsigned int seq;
46
46 do { 47 do {
47 seq = read_seqbegin(&sysctl_local_ports.lock); 48 seq = read_seqbegin(&sysctl_local_ports.lock);
48 49
diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c
index 89168c6351ff..543ef6225458 100644
--- a/net/ipv4/inet_timewait_sock.c
+++ b/net/ipv4/inet_timewait_sock.c
@@ -263,7 +263,7 @@ rescan:
263void inet_twdr_hangman(unsigned long data) 263void inet_twdr_hangman(unsigned long data)
264{ 264{
265 struct inet_timewait_death_row *twdr; 265 struct inet_timewait_death_row *twdr;
266 int unsigned need_timer; 266 unsigned int need_timer;
267 267
268 twdr = (struct inet_timewait_death_row *)data; 268 twdr = (struct inet_timewait_death_row *)data;
269 spin_lock(&twdr->death_lock); 269 spin_lock(&twdr->death_lock);
diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c
index 1372c4586edc..95722ed0e5bb 100644
--- a/net/ipv4/ip_options.c
+++ b/net/ipv4/ip_options.c
@@ -413,7 +413,7 @@ int ip_options_compile(struct net *net,
413 opt->is_changed = 1; 413 opt->is_changed = 1;
414 } 414 }
415 } else { 415 } else {
416 unsigned overflow = optptr[3]>>4; 416 unsigned int overflow = optptr[3]>>4;
417 if (overflow == 15) { 417 if (overflow == 15) {
418 pp_ptr = optptr + 3; 418 pp_ptr = optptr + 3;
419 goto error; 419 goto error;
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index 0a87e1fc0ce5..51c6c672c8aa 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/net/ipv4/ip_sockglue.c
@@ -147,7 +147,7 @@ static void ip_cmsg_recv_dstaddr(struct msghdr *msg, struct sk_buff *skb)
147void ip_cmsg_recv(struct msghdr *msg, struct sk_buff *skb) 147void ip_cmsg_recv(struct msghdr *msg, struct sk_buff *skb)
148{ 148{
149 struct inet_sock *inet = inet_sk(skb->sk); 149 struct inet_sock *inet = inet_sk(skb->sk);
150 unsigned flags = inet->cmsg_flags; 150 unsigned int flags = inet->cmsg_flags;
151 151
152 /* Ordered by supposed usage frequency */ 152 /* Ordered by supposed usage frequency */
153 if (flags & 1) 153 if (flags & 1)
@@ -1094,7 +1094,7 @@ EXPORT_SYMBOL(compat_ip_setsockopt);
1094 */ 1094 */
1095 1095
1096static int do_ip_getsockopt(struct sock *sk, int level, int optname, 1096static int do_ip_getsockopt(struct sock *sk, int level, int optname,
1097 char __user *optval, int __user *optlen, unsigned flags) 1097 char __user *optval, int __user *optlen, unsigned int flags)
1098{ 1098{
1099 struct inet_sock *inet = inet_sk(sk); 1099 struct inet_sock *inet = inet_sk(sk);
1100 int val; 1100 int val;
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 92ac7e7363a0..f267280d8709 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -1198,7 +1198,7 @@ static int __init ic_dynamic(void)
1198 d = ic_first_dev; 1198 d = ic_first_dev;
1199 retries = CONF_SEND_RETRIES; 1199 retries = CONF_SEND_RETRIES;
1200 get_random_bytes(&timeout, sizeof(timeout)); 1200 get_random_bytes(&timeout, sizeof(timeout));
1201 timeout = CONF_BASE_TIMEOUT + (timeout % (unsigned) CONF_TIMEOUT_RANDOM); 1201 timeout = CONF_BASE_TIMEOUT + (timeout % (unsigned int) CONF_TIMEOUT_RANDOM);
1202 for (;;) { 1202 for (;;) {
1203 /* Track the device we are configuring */ 1203 /* Track the device we are configuring */
1204 ic_dev_xid = d->xid; 1204 ic_dev_xid = d->xid;
diff --git a/net/ipv4/netfilter.c b/net/ipv4/netfilter.c
index 4f47e064e262..3cd8c586741a 100644
--- a/net/ipv4/netfilter.c
+++ b/net/ipv4/netfilter.c
@@ -12,7 +12,7 @@
12#include <net/netfilter/nf_queue.h> 12#include <net/netfilter/nf_queue.h>
13 13
14/* route_me_harder function, used by iptable_nat, iptable_mangle + ip_queue */ 14/* route_me_harder function, used by iptable_nat, iptable_mangle + ip_queue */
15int ip_route_me_harder(struct sk_buff *skb, unsigned addr_type) 15int ip_route_me_harder(struct sk_buff *skb, unsigned int addr_type)
16{ 16{
17 struct net *net = dev_net(skb_dst(skb)->dev); 17 struct net *net = dev_net(skb_dst(skb)->dev);
18 const struct iphdr *iph = ip_hdr(skb); 18 const struct iphdr *iph = ip_hdr(skb);
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
index fd7a3f68917f..a3935273869f 100644
--- a/net/ipv4/netfilter/arp_tables.c
+++ b/net/ipv4/netfilter/arp_tables.c
@@ -303,7 +303,7 @@ unsigned int arpt_do_table(struct sk_buff *skb,
303 if (v < 0) { 303 if (v < 0) {
304 /* Pop from stack? */ 304 /* Pop from stack? */
305 if (v != XT_RETURN) { 305 if (v != XT_RETURN) {
306 verdict = (unsigned)(-v) - 1; 306 verdict = (unsigned int)(-v) - 1;
307 break; 307 break;
308 } 308 }
309 e = back; 309 e = back;
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index 24e556e83a3b..585b80f3cc68 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -377,7 +377,7 @@ ipt_do_table(struct sk_buff *skb,
377 if (v < 0) { 377 if (v < 0) {
378 /* Pop from stack? */ 378 /* Pop from stack? */
379 if (v != XT_RETURN) { 379 if (v != XT_RETURN) {
380 verdict = (unsigned)(-v) - 1; 380 verdict = (unsigned int)(-v) - 1;
381 break; 381 break;
382 } 382 }
383 if (*stackptr <= origptr) { 383 if (*stackptr <= origptr) {
diff --git a/net/ipv4/netfilter/nf_nat_sip.c b/net/ipv4/netfilter/nf_nat_sip.c
index 57932c43960e..ea4a23813d26 100644
--- a/net/ipv4/netfilter/nf_nat_sip.c
+++ b/net/ipv4/netfilter/nf_nat_sip.c
@@ -283,7 +283,7 @@ static unsigned int ip_nat_sip_expect(struct sk_buff *skb, unsigned int dataoff,
283 __be32 newip; 283 __be32 newip;
284 u_int16_t port; 284 u_int16_t port;
285 char buffer[sizeof("nnn.nnn.nnn.nnn:nnnnn")]; 285 char buffer[sizeof("nnn.nnn.nnn.nnn:nnnnn")];
286 unsigned buflen; 286 unsigned int buflen;
287 287
288 /* Connection will come from reply */ 288 /* Connection will come from reply */
289 if (ct->tuplehash[dir].tuple.src.u3.ip == ct->tuplehash[!dir].tuple.dst.u3.ip) 289 if (ct->tuplehash[dir].tuple.src.u3.ip == ct->tuplehash[!dir].tuple.dst.u3.ip)
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
index 9f380ace22ee..6e930c7174dd 100644
--- a/net/ipv4/ping.c
+++ b/net/ipv4/ping.c
@@ -51,15 +51,16 @@ static struct ping_table ping_table;
51 51
52static u16 ping_port_rover; 52static u16 ping_port_rover;
53 53
54static inline int ping_hashfn(struct net *net, unsigned num, unsigned mask) 54static inline int ping_hashfn(struct net *net, unsigned int num, unsigned int mask)
55{ 55{
56 int res = (num + net_hash_mix(net)) & mask; 56 int res = (num + net_hash_mix(net)) & mask;
57
57 pr_debug("hash(%d) = %d\n", num, res); 58 pr_debug("hash(%d) = %d\n", num, res);
58 return res; 59 return res;
59} 60}
60 61
61static inline struct hlist_nulls_head *ping_hashslot(struct ping_table *table, 62static inline struct hlist_nulls_head *ping_hashslot(struct ping_table *table,
62 struct net *net, unsigned num) 63 struct net *net, unsigned int num)
63{ 64{
64 return &table->hash[ping_hashfn(net, num, PING_HTABLE_MASK)]; 65 return &table->hash[ping_hashfn(net, num, PING_HTABLE_MASK)];
65} 66}
@@ -188,7 +189,8 @@ static void inet_get_ping_group_range_net(struct net *net, gid_t *low,
188 gid_t *high) 189 gid_t *high)
189{ 190{
190 gid_t *data = net->ipv4.sysctl_ping_group_range; 191 gid_t *data = net->ipv4.sysctl_ping_group_range;
191 unsigned seq; 192 unsigned int seq;
193
192 do { 194 do {
193 seq = read_seqbegin(&sysctl_local_ports.lock); 195 seq = read_seqbegin(&sysctl_local_ports.lock);
194 196
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index a13ce2364ed2..ac4d6b3fa9c9 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -296,7 +296,7 @@ static inline void rt_hash_lock_init(void)
296#endif 296#endif
297 297
298static struct rt_hash_bucket *rt_hash_table __read_mostly; 298static struct rt_hash_bucket *rt_hash_table __read_mostly;
299static unsigned rt_hash_mask __read_mostly; 299static unsigned int rt_hash_mask __read_mostly;
300static unsigned int rt_hash_log __read_mostly; 300static unsigned int rt_hash_log __read_mostly;
301 301
302static DEFINE_PER_CPU(struct rt_cache_stat, rt_cache_stat); 302static DEFINE_PER_CPU(struct rt_cache_stat, rt_cache_stat);
@@ -1143,7 +1143,7 @@ static int rt_bind_neighbour(struct rtable *rt)
1143 return 0; 1143 return 0;
1144} 1144}
1145 1145
1146static struct rtable *rt_intern_hash(unsigned hash, struct rtable *rt, 1146static struct rtable *rt_intern_hash(unsigned int hash, struct rtable *rt,
1147 struct sk_buff *skb, int ifindex) 1147 struct sk_buff *skb, int ifindex)
1148{ 1148{
1149 struct rtable *rth, *cand; 1149 struct rtable *rth, *cand;
@@ -1384,7 +1384,7 @@ void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more)
1384} 1384}
1385EXPORT_SYMBOL(__ip_select_ident); 1385EXPORT_SYMBOL(__ip_select_ident);
1386 1386
1387static void rt_del(unsigned hash, struct rtable *rt) 1387static void rt_del(unsigned int hash, struct rtable *rt)
1388{ 1388{
1389 struct rtable __rcu **rthp; 1389 struct rtable __rcu **rthp;
1390 struct rtable *aux; 1390 struct rtable *aux;
@@ -1538,7 +1538,7 @@ static struct dst_entry *ipv4_negative_advice(struct dst_entry *dst)
1538 ip_rt_put(rt); 1538 ip_rt_put(rt);
1539 ret = NULL; 1539 ret = NULL;
1540 } else if (rt->rt_flags & RTCF_REDIRECTED) { 1540 } else if (rt->rt_flags & RTCF_REDIRECTED) {
1541 unsigned hash = rt_hash(rt->rt_key_dst, rt->rt_key_src, 1541 unsigned int hash = rt_hash(rt->rt_key_dst, rt->rt_key_src,
1542 rt->rt_oif, 1542 rt->rt_oif,
1543 rt_genid(dev_net(dst->dev))); 1543 rt_genid(dev_net(dst->dev)));
1544 rt_del(hash, rt); 1544 rt_del(hash, rt);
@@ -2217,7 +2217,7 @@ static int ip_mkroute_input(struct sk_buff *skb,
2217{ 2217{
2218 struct rtable *rth = NULL; 2218 struct rtable *rth = NULL;
2219 int err; 2219 int err;
2220 unsigned hash; 2220 unsigned int hash;
2221 2221
2222#ifdef CONFIG_IP_ROUTE_MULTIPATH 2222#ifdef CONFIG_IP_ROUTE_MULTIPATH
2223 if (res->fi && res->fi->fib_nhs > 1) 2223 if (res->fi && res->fi->fib_nhs > 1)
@@ -2255,10 +2255,10 @@ static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr,
2255 struct fib_result res; 2255 struct fib_result res;
2256 struct in_device *in_dev = __in_dev_get_rcu(dev); 2256 struct in_device *in_dev = __in_dev_get_rcu(dev);
2257 struct flowi4 fl4; 2257 struct flowi4 fl4;
2258 unsigned flags = 0; 2258 unsigned int flags = 0;
2259 u32 itag = 0; 2259 u32 itag = 0;
2260 struct rtable *rth; 2260 struct rtable *rth;
2261 unsigned hash; 2261 unsigned int hash;
2262 __be32 spec_dst; 2262 __be32 spec_dst;
2263 int err = -EINVAL; 2263 int err = -EINVAL;
2264 struct net *net = dev_net(dev); 2264 struct net *net = dev_net(dev);
@@ -2433,8 +2433,8 @@ martian_source_keep_err:
2433int ip_route_input_common(struct sk_buff *skb, __be32 daddr, __be32 saddr, 2433int ip_route_input_common(struct sk_buff *skb, __be32 daddr, __be32 saddr,
2434 u8 tos, struct net_device *dev, bool noref) 2434 u8 tos, struct net_device *dev, bool noref)
2435{ 2435{
2436 struct rtable *rth; 2436 struct rtable *rth;
2437 unsigned hash; 2437 unsigned int hash;
2438 int iif = dev->ifindex; 2438 int iif = dev->ifindex;
2439 struct net *net; 2439 struct net *net;
2440 int res; 2440 int res;
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 7a7724da9bff..34a628625d9c 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -78,7 +78,7 @@ static int ipv4_local_port_range(ctl_table *table, int write,
78static void inet_get_ping_group_range_table(struct ctl_table *table, gid_t *low, gid_t *high) 78static void inet_get_ping_group_range_table(struct ctl_table *table, gid_t *low, gid_t *high)
79{ 79{
80 gid_t *data = table->data; 80 gid_t *data = table->data;
81 unsigned seq; 81 unsigned int seq;
82 do { 82 do {
83 seq = read_seqbegin(&sysctl_local_ports.lock); 83 seq = read_seqbegin(&sysctl_local_ports.lock);
84 84
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 8bb6adeb62c0..c53e8a827f55 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2675,7 +2675,7 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb,
2675{ 2675{
2676 struct sk_buff *segs = ERR_PTR(-EINVAL); 2676 struct sk_buff *segs = ERR_PTR(-EINVAL);
2677 struct tcphdr *th; 2677 struct tcphdr *th;
2678 unsigned thlen; 2678 unsigned int thlen;
2679 unsigned int seq; 2679 unsigned int seq;
2680 __be32 delta; 2680 __be32 delta;
2681 unsigned int oldlen; 2681 unsigned int oldlen;
@@ -3033,9 +3033,9 @@ int tcp_md5_hash_skb_data(struct tcp_md5sig_pool *hp,
3033 struct scatterlist sg; 3033 struct scatterlist sg;
3034 const struct tcphdr *tp = tcp_hdr(skb); 3034 const struct tcphdr *tp = tcp_hdr(skb);
3035 struct hash_desc *desc = &hp->md5_desc; 3035 struct hash_desc *desc = &hp->md5_desc;
3036 unsigned i; 3036 unsigned int i;
3037 const unsigned head_data_len = skb_headlen(skb) > header_len ? 3037 const unsigned int head_data_len = skb_headlen(skb) > header_len ?
3038 skb_headlen(skb) - header_len : 0; 3038 skb_headlen(skb) - header_len : 0;
3039 const struct skb_shared_info *shi = skb_shinfo(skb); 3039 const struct skb_shared_info *shi = skb_shinfo(skb);
3040 struct sk_buff *frag_iter; 3040 struct sk_buff *frag_iter;
3041 3041
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 3dc94febc9ee..99448f06a42a 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -175,7 +175,7 @@ static void tcp_measure_rcv_mss(struct sock *sk, const struct sk_buff *skb)
175static void tcp_incr_quickack(struct sock *sk) 175static void tcp_incr_quickack(struct sock *sk)
176{ 176{
177 struct inet_connection_sock *icsk = inet_csk(sk); 177 struct inet_connection_sock *icsk = inet_csk(sk);
178 unsigned quickacks = tcp_sk(sk)->rcv_wnd / (2 * icsk->icsk_ack.rcv_mss); 178 unsigned int quickacks = tcp_sk(sk)->rcv_wnd / (2 * icsk->icsk_ack.rcv_mss);
179 179
180 if (quickacks == 0) 180 if (quickacks == 0)
181 quickacks = 2; 181 quickacks = 2;
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 376b2cfbb685..de8790ced946 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -563,13 +563,13 @@ static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp,
563/* Compute TCP options for SYN packets. This is not the final 563/* Compute TCP options for SYN packets. This is not the final
564 * network wire format yet. 564 * network wire format yet.
565 */ 565 */
566static unsigned tcp_syn_options(struct sock *sk, struct sk_buff *skb, 566static unsigned int tcp_syn_options(struct sock *sk, struct sk_buff *skb,
567 struct tcp_out_options *opts, 567 struct tcp_out_options *opts,
568 struct tcp_md5sig_key **md5) 568 struct tcp_md5sig_key **md5)
569{ 569{
570 struct tcp_sock *tp = tcp_sk(sk); 570 struct tcp_sock *tp = tcp_sk(sk);
571 struct tcp_cookie_values *cvp = tp->cookie_values; 571 struct tcp_cookie_values *cvp = tp->cookie_values;
572 unsigned remaining = MAX_TCP_OPTION_SPACE; 572 unsigned int remaining = MAX_TCP_OPTION_SPACE;
573 u8 cookie_size = (!tp->rx_opt.cookie_out_never && cvp != NULL) ? 573 u8 cookie_size = (!tp->rx_opt.cookie_out_never && cvp != NULL) ?
574 tcp_cookie_size_check(cvp->cookie_desired) : 574 tcp_cookie_size_check(cvp->cookie_desired) :
575 0; 575 0;
@@ -663,15 +663,15 @@ static unsigned tcp_syn_options(struct sock *sk, struct sk_buff *skb,
663} 663}
664 664
665/* Set up TCP options for SYN-ACKs. */ 665/* Set up TCP options for SYN-ACKs. */
666static unsigned tcp_synack_options(struct sock *sk, 666static unsigned int tcp_synack_options(struct sock *sk,
667 struct request_sock *req, 667 struct request_sock *req,
668 unsigned mss, struct sk_buff *skb, 668 unsigned int mss, struct sk_buff *skb,
669 struct tcp_out_options *opts, 669 struct tcp_out_options *opts,
670 struct tcp_md5sig_key **md5, 670 struct tcp_md5sig_key **md5,
671 struct tcp_extend_values *xvp) 671 struct tcp_extend_values *xvp)
672{ 672{
673 struct inet_request_sock *ireq = inet_rsk(req); 673 struct inet_request_sock *ireq = inet_rsk(req);
674 unsigned remaining = MAX_TCP_OPTION_SPACE; 674 unsigned int remaining = MAX_TCP_OPTION_SPACE;
675 u8 cookie_plus = (xvp != NULL && !xvp->cookie_out_never) ? 675 u8 cookie_plus = (xvp != NULL && !xvp->cookie_out_never) ?
676 xvp->cookie_plus : 676 xvp->cookie_plus :
677 0; 677 0;
@@ -742,13 +742,13 @@ static unsigned tcp_synack_options(struct sock *sk,
742/* Compute TCP options for ESTABLISHED sockets. This is not the 742/* Compute TCP options for ESTABLISHED sockets. This is not the
743 * final wire format yet. 743 * final wire format yet.
744 */ 744 */
745static unsigned tcp_established_options(struct sock *sk, struct sk_buff *skb, 745static unsigned int tcp_established_options(struct sock *sk, struct sk_buff *skb,
746 struct tcp_out_options *opts, 746 struct tcp_out_options *opts,
747 struct tcp_md5sig_key **md5) 747 struct tcp_md5sig_key **md5)
748{ 748{
749 struct tcp_skb_cb *tcb = skb ? TCP_SKB_CB(skb) : NULL; 749 struct tcp_skb_cb *tcb = skb ? TCP_SKB_CB(skb) : NULL;
750 struct tcp_sock *tp = tcp_sk(sk); 750 struct tcp_sock *tp = tcp_sk(sk);
751 unsigned size = 0; 751 unsigned int size = 0;
752 unsigned int eff_sacks; 752 unsigned int eff_sacks;
753 753
754#ifdef CONFIG_TCP_MD5SIG 754#ifdef CONFIG_TCP_MD5SIG
@@ -770,9 +770,9 @@ static unsigned tcp_established_options(struct sock *sk, struct sk_buff *skb,
770 770
771 eff_sacks = tp->rx_opt.num_sacks + tp->rx_opt.dsack; 771 eff_sacks = tp->rx_opt.num_sacks + tp->rx_opt.dsack;
772 if (unlikely(eff_sacks)) { 772 if (unlikely(eff_sacks)) {
773 const unsigned remaining = MAX_TCP_OPTION_SPACE - size; 773 const unsigned int remaining = MAX_TCP_OPTION_SPACE - size;
774 opts->num_sack_blocks = 774 opts->num_sack_blocks =
775 min_t(unsigned, eff_sacks, 775 min_t(unsigned int, eff_sacks,
776 (remaining - TCPOLEN_SACK_BASE_ALIGNED) / 776 (remaining - TCPOLEN_SACK_BASE_ALIGNED) /
777 TCPOLEN_SACK_PERBLOCK); 777 TCPOLEN_SACK_PERBLOCK);
778 size += TCPOLEN_SACK_BASE_ALIGNED + 778 size += TCPOLEN_SACK_BASE_ALIGNED +
@@ -801,7 +801,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
801 struct tcp_sock *tp; 801 struct tcp_sock *tp;
802 struct tcp_skb_cb *tcb; 802 struct tcp_skb_cb *tcb;
803 struct tcp_out_options opts; 803 struct tcp_out_options opts;
804 unsigned tcp_options_size, tcp_header_size; 804 unsigned int tcp_options_size, tcp_header_size;
805 struct tcp_md5sig_key *md5; 805 struct tcp_md5sig_key *md5;
806 struct tcphdr *th; 806 struct tcphdr *th;
807 int err; 807 int err;
@@ -1258,7 +1258,7 @@ unsigned int tcp_current_mss(struct sock *sk)
1258 const struct tcp_sock *tp = tcp_sk(sk); 1258 const struct tcp_sock *tp = tcp_sk(sk);
1259 const struct dst_entry *dst = __sk_dst_get(sk); 1259 const struct dst_entry *dst = __sk_dst_get(sk);
1260 u32 mss_now; 1260 u32 mss_now;
1261 unsigned header_len; 1261 unsigned int header_len;
1262 struct tcp_out_options opts; 1262 struct tcp_out_options opts;
1263 struct tcp_md5sig_key *md5; 1263 struct tcp_md5sig_key *md5;
1264 1264
@@ -1389,7 +1389,7 @@ static inline int tcp_minshall_check(const struct tcp_sock *tp)
1389 */ 1389 */
1390static inline int tcp_nagle_check(const struct tcp_sock *tp, 1390static inline int tcp_nagle_check(const struct tcp_sock *tp,
1391 const struct sk_buff *skb, 1391 const struct sk_buff *skb,
1392 unsigned mss_now, int nonagle) 1392 unsigned int mss_now, int nonagle)
1393{ 1393{
1394 return skb->len < mss_now && 1394 return skb->len < mss_now &&
1395 ((nonagle & TCP_NAGLE_CORK) || 1395 ((nonagle & TCP_NAGLE_CORK) ||
diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c
index a8df7052e0b6..4526fe68e60e 100644
--- a/net/ipv4/tcp_probe.c
+++ b/net/ipv4/tcp_probe.c
@@ -91,7 +91,7 @@ static inline int tcp_probe_avail(void)
91 * Note: arguments must match tcp_rcv_established()! 91 * Note: arguments must match tcp_rcv_established()!
92 */ 92 */
93static int jtcp_rcv_established(struct sock *sk, struct sk_buff *skb, 93static int jtcp_rcv_established(struct sock *sk, struct sk_buff *skb,
94 struct tcphdr *th, unsigned len) 94 struct tcphdr *th, unsigned int len)
95{ 95{
96 const struct tcp_sock *tp = tcp_sk(sk); 96 const struct tcp_sock *tp = tcp_sk(sk);
97 const struct inet_sock *inet = inet_sk(sk); 97 const struct inet_sock *inet = inet_sk(sk);
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 381ea5115142..3430e8fc18de 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -207,7 +207,7 @@ int udp_lib_get_port(struct sock *sk, unsigned short snum,
207 207
208 if (!snum) { 208 if (!snum) {
209 int low, high, remaining; 209 int low, high, remaining;
210 unsigned rand; 210 unsigned int rand;
211 unsigned short first, last; 211 unsigned short first, last;
212 DECLARE_BITMAP(bitmap, PORTS_PER_CHAIN); 212 DECLARE_BITMAP(bitmap, PORTS_PER_CHAIN);
213 213