diff options
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/Kconfig | 2 | ||||
-rw-r--r-- | net/ipv4/devinet.c | 1 | ||||
-rw-r--r-- | net/ipv4/ip_gre.c | 14 | ||||
-rw-r--r-- | net/ipv4/ipcomp.c | 5 | ||||
-rw-r--r-- | net/ipv4/ipconfig.c | 4 | ||||
-rw-r--r-- | net/ipv4/ipip.c | 14 | ||||
-rw-r--r-- | net/ipv4/route.c | 5 | ||||
-rw-r--r-- | net/ipv4/tcp_bic.c | 5 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 14 |
9 files changed, 40 insertions, 24 deletions
diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig index 19880b086e71..9c7e5ffb223d 100644 --- a/net/ipv4/Kconfig +++ b/net/ipv4/Kconfig | |||
@@ -343,7 +343,7 @@ config INET_ESP | |||
343 | tristate "IP: ESP transformation" | 343 | tristate "IP: ESP transformation" |
344 | select XFRM | 344 | select XFRM |
345 | select CRYPTO | 345 | select CRYPTO |
346 | select CRYPTO_AEAD | 346 | select CRYPTO_AUTHENC |
347 | select CRYPTO_HMAC | 347 | select CRYPTO_HMAC |
348 | select CRYPTO_MD5 | 348 | select CRYPTO_MD5 |
349 | select CRYPTO_CBC | 349 | select CRYPTO_CBC |
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index f282b26f63eb..87490f7bb0f7 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -752,6 +752,7 @@ int devinet_ioctl(unsigned int cmd, void __user *arg) | |||
752 | inet_del_ifa(in_dev, ifap, 0); | 752 | inet_del_ifa(in_dev, ifap, 0); |
753 | ifa->ifa_broadcast = 0; | 753 | ifa->ifa_broadcast = 0; |
754 | ifa->ifa_anycast = 0; | 754 | ifa->ifa_anycast = 0; |
755 | ifa->ifa_scope = 0; | ||
755 | } | 756 | } |
756 | 757 | ||
757 | ifa->ifa_address = ifa->ifa_local = sin->sin_addr.s_addr; | 758 | ifa->ifa_address = ifa->ifa_local = sin->sin_addr.s_addr; |
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 906cb1ada4c3..e7821ba7a9a0 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c | |||
@@ -266,20 +266,24 @@ static struct ip_tunnel * ipgre_tunnel_locate(struct ip_tunnel_parm *parms, int | |||
266 | if (!dev) | 266 | if (!dev) |
267 | return NULL; | 267 | return NULL; |
268 | 268 | ||
269 | if (strchr(name, '%')) { | ||
270 | if (dev_alloc_name(dev, name) < 0) | ||
271 | goto failed_free; | ||
272 | } | ||
273 | |||
269 | dev->init = ipgre_tunnel_init; | 274 | dev->init = ipgre_tunnel_init; |
270 | nt = netdev_priv(dev); | 275 | nt = netdev_priv(dev); |
271 | nt->parms = *parms; | 276 | nt->parms = *parms; |
272 | 277 | ||
273 | if (register_netdevice(dev) < 0) { | 278 | if (register_netdevice(dev) < 0) |
274 | free_netdev(dev); | 279 | goto failed_free; |
275 | goto failed; | ||
276 | } | ||
277 | 280 | ||
278 | dev_hold(dev); | 281 | dev_hold(dev); |
279 | ipgre_tunnel_link(nt); | 282 | ipgre_tunnel_link(nt); |
280 | return nt; | 283 | return nt; |
281 | 284 | ||
282 | failed: | 285 | failed_free: |
286 | free_netdev(dev); | ||
283 | return NULL; | 287 | return NULL; |
284 | } | 288 | } |
285 | 289 | ||
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c index ae1f45fc23b9..58b60b2fb011 100644 --- a/net/ipv4/ipcomp.c +++ b/net/ipv4/ipcomp.c | |||
@@ -108,8 +108,11 @@ static int ipcomp_compress(struct xfrm_state *x, struct sk_buff *skb) | |||
108 | const int cpu = get_cpu(); | 108 | const int cpu = get_cpu(); |
109 | u8 *scratch = *per_cpu_ptr(ipcomp_scratches, cpu); | 109 | u8 *scratch = *per_cpu_ptr(ipcomp_scratches, cpu); |
110 | struct crypto_comp *tfm = *per_cpu_ptr(ipcd->tfms, cpu); | 110 | struct crypto_comp *tfm = *per_cpu_ptr(ipcd->tfms, cpu); |
111 | int err = crypto_comp_compress(tfm, start, plen, scratch, &dlen); | 111 | int err; |
112 | 112 | ||
113 | local_bh_disable(); | ||
114 | err = crypto_comp_compress(tfm, start, plen, scratch, &dlen); | ||
115 | local_bh_enable(); | ||
113 | if (err) | 116 | if (err) |
114 | goto out; | 117 | goto out; |
115 | 118 | ||
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index 10013ccee8dd..5dd938579eeb 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c | |||
@@ -753,9 +753,9 @@ static void __init ic_bootp_send_if(struct ic_device *d, unsigned long jiffies_d | |||
753 | printk("Unknown ARP type 0x%04x for device %s\n", dev->type, dev->name); | 753 | printk("Unknown ARP type 0x%04x for device %s\n", dev->type, dev->name); |
754 | b->htype = dev->type; /* can cause undefined behavior */ | 754 | b->htype = dev->type; /* can cause undefined behavior */ |
755 | } | 755 | } |
756 | |||
757 | /* server_ip and your_ip address are both already zero per RFC2131 */ | ||
756 | b->hlen = dev->addr_len; | 758 | b->hlen = dev->addr_len; |
757 | b->your_ip = NONE; | ||
758 | b->server_ip = NONE; | ||
759 | memcpy(b->hw_addr, dev->dev_addr, dev->addr_len); | 759 | memcpy(b->hw_addr, dev->dev_addr, dev->addr_len); |
760 | b->secs = htons(jiffies_diff / HZ); | 760 | b->secs = htons(jiffies_diff / HZ); |
761 | b->xid = d->xid; | 761 | b->xid = d->xid; |
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index e77e3b855834..dbaed69de06a 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c | |||
@@ -228,20 +228,24 @@ static struct ip_tunnel * ipip_tunnel_locate(struct ip_tunnel_parm *parms, int c | |||
228 | if (dev == NULL) | 228 | if (dev == NULL) |
229 | return NULL; | 229 | return NULL; |
230 | 230 | ||
231 | if (strchr(name, '%')) { | ||
232 | if (dev_alloc_name(dev, name) < 0) | ||
233 | goto failed_free; | ||
234 | } | ||
235 | |||
231 | nt = netdev_priv(dev); | 236 | nt = netdev_priv(dev); |
232 | dev->init = ipip_tunnel_init; | 237 | dev->init = ipip_tunnel_init; |
233 | nt->parms = *parms; | 238 | nt->parms = *parms; |
234 | 239 | ||
235 | if (register_netdevice(dev) < 0) { | 240 | if (register_netdevice(dev) < 0) |
236 | free_netdev(dev); | 241 | goto failed_free; |
237 | goto failed; | ||
238 | } | ||
239 | 242 | ||
240 | dev_hold(dev); | 243 | dev_hold(dev); |
241 | ipip_tunnel_link(nt); | 244 | ipip_tunnel_link(nt); |
242 | return nt; | 245 | return nt; |
243 | 246 | ||
244 | failed: | 247 | failed_free: |
248 | free_netdev(dev); | ||
245 | return NULL; | 249 | return NULL; |
246 | } | 250 | } |
247 | 251 | ||
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 525787b52b72..7b5e8e1d94be 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -542,12 +542,11 @@ static __init int ip_rt_proc_init(struct net *net) | |||
542 | if (!pde) | 542 | if (!pde) |
543 | goto err1; | 543 | goto err1; |
544 | 544 | ||
545 | pde = create_proc_entry("rt_cache", S_IRUGO, net->proc_net_stat); | 545 | pde = proc_create("rt_cache", S_IRUGO, |
546 | net->proc_net_stat, &rt_cpu_seq_fops); | ||
546 | if (!pde) | 547 | if (!pde) |
547 | goto err2; | 548 | goto err2; |
548 | 549 | ||
549 | pde->proc_fops = &rt_cpu_seq_fops; | ||
550 | |||
551 | #ifdef CONFIG_NET_CLS_ROUTE | 550 | #ifdef CONFIG_NET_CLS_ROUTE |
552 | pde = create_proc_read_entry("rt_acct", 0, net->proc_net, | 551 | pde = create_proc_read_entry("rt_acct", 0, net->proc_net, |
553 | ip_rt_acct_read, NULL); | 552 | ip_rt_acct_read, NULL); |
diff --git a/net/ipv4/tcp_bic.c b/net/ipv4/tcp_bic.c index 5212ed9b0c98..7eb7636db0d0 100644 --- a/net/ipv4/tcp_bic.c +++ b/net/ipv4/tcp_bic.c | |||
@@ -1,12 +1,13 @@ | |||
1 | /* | 1 | /* |
2 | * Binary Increase Congestion control for TCP | 2 | * Binary Increase Congestion control for TCP |
3 | * | 3 | * Home page: |
4 | * http://netsrv.csc.ncsu.edu/twiki/bin/view/Main/BIC | ||
4 | * This is from the implementation of BICTCP in | 5 | * This is from the implementation of BICTCP in |
5 | * Lison-Xu, Kahaled Harfoush, and Injong Rhee. | 6 | * Lison-Xu, Kahaled Harfoush, and Injong Rhee. |
6 | * "Binary Increase Congestion Control for Fast, Long Distance | 7 | * "Binary Increase Congestion Control for Fast, Long Distance |
7 | * Networks" in InfoComm 2004 | 8 | * Networks" in InfoComm 2004 |
8 | * Available from: | 9 | * Available from: |
9 | * http://www.csc.ncsu.edu/faculty/rhee/export/bitcp.pdf | 10 | * http://netsrv.csc.ncsu.edu/export/bitcp.pdf |
10 | * | 11 | * |
11 | * Unless BIC is enabled and congestion window is large | 12 | * Unless BIC is enabled and congestion window is large |
12 | * this behaves the same as the original Reno. | 13 | * this behaves the same as the original Reno. |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 19c449f62672..7facdb0f6960 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -1367,7 +1367,7 @@ static struct sk_buff *tcp_sacktag_walk(struct sk_buff *skb, struct sock *sk, | |||
1367 | * a normal way | 1367 | * a normal way |
1368 | */ | 1368 | */ |
1369 | static struct sk_buff *tcp_sacktag_skip(struct sk_buff *skb, struct sock *sk, | 1369 | static struct sk_buff *tcp_sacktag_skip(struct sk_buff *skb, struct sock *sk, |
1370 | u32 skip_to_seq) | 1370 | u32 skip_to_seq, int *fack_count) |
1371 | { | 1371 | { |
1372 | tcp_for_write_queue_from(skb, sk) { | 1372 | tcp_for_write_queue_from(skb, sk) { |
1373 | if (skb == tcp_send_head(sk)) | 1373 | if (skb == tcp_send_head(sk)) |
@@ -1375,6 +1375,8 @@ static struct sk_buff *tcp_sacktag_skip(struct sk_buff *skb, struct sock *sk, | |||
1375 | 1375 | ||
1376 | if (!before(TCP_SKB_CB(skb)->end_seq, skip_to_seq)) | 1376 | if (!before(TCP_SKB_CB(skb)->end_seq, skip_to_seq)) |
1377 | break; | 1377 | break; |
1378 | |||
1379 | *fack_count += tcp_skb_pcount(skb); | ||
1378 | } | 1380 | } |
1379 | return skb; | 1381 | return skb; |
1380 | } | 1382 | } |
@@ -1390,7 +1392,7 @@ static struct sk_buff *tcp_maybe_skipping_dsack(struct sk_buff *skb, | |||
1390 | return skb; | 1392 | return skb; |
1391 | 1393 | ||
1392 | if (before(next_dup->start_seq, skip_to_seq)) { | 1394 | if (before(next_dup->start_seq, skip_to_seq)) { |
1393 | skb = tcp_sacktag_skip(skb, sk, next_dup->start_seq); | 1395 | skb = tcp_sacktag_skip(skb, sk, next_dup->start_seq, fack_count); |
1394 | tcp_sacktag_walk(skb, sk, NULL, | 1396 | tcp_sacktag_walk(skb, sk, NULL, |
1395 | next_dup->start_seq, next_dup->end_seq, | 1397 | next_dup->start_seq, next_dup->end_seq, |
1396 | 1, fack_count, reord, flag); | 1398 | 1, fack_count, reord, flag); |
@@ -1537,7 +1539,8 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, | |||
1537 | 1539 | ||
1538 | /* Head todo? */ | 1540 | /* Head todo? */ |
1539 | if (before(start_seq, cache->start_seq)) { | 1541 | if (before(start_seq, cache->start_seq)) { |
1540 | skb = tcp_sacktag_skip(skb, sk, start_seq); | 1542 | skb = tcp_sacktag_skip(skb, sk, start_seq, |
1543 | &fack_count); | ||
1541 | skb = tcp_sacktag_walk(skb, sk, next_dup, | 1544 | skb = tcp_sacktag_walk(skb, sk, next_dup, |
1542 | start_seq, | 1545 | start_seq, |
1543 | cache->start_seq, | 1546 | cache->start_seq, |
@@ -1565,7 +1568,8 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, | |||
1565 | goto walk; | 1568 | goto walk; |
1566 | } | 1569 | } |
1567 | 1570 | ||
1568 | skb = tcp_sacktag_skip(skb, sk, cache->end_seq); | 1571 | skb = tcp_sacktag_skip(skb, sk, cache->end_seq, |
1572 | &fack_count); | ||
1569 | /* Check overlap against next cached too (past this one already) */ | 1573 | /* Check overlap against next cached too (past this one already) */ |
1570 | cache++; | 1574 | cache++; |
1571 | continue; | 1575 | continue; |
@@ -1577,7 +1581,7 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, | |||
1577 | break; | 1581 | break; |
1578 | fack_count = tp->fackets_out; | 1582 | fack_count = tp->fackets_out; |
1579 | } | 1583 | } |
1580 | skb = tcp_sacktag_skip(skb, sk, start_seq); | 1584 | skb = tcp_sacktag_skip(skb, sk, start_seq, &fack_count); |
1581 | 1585 | ||
1582 | walk: | 1586 | walk: |
1583 | skb = tcp_sacktag_walk(skb, sk, next_dup, start_seq, end_seq, | 1587 | skb = tcp_sacktag_walk(skb, sk, next_dup, start_seq, end_seq, |