diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-24 12:42:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-24 12:42:15 -0400 |
commit | b2510b1696730307e7a388ea04132236ab45ac20 (patch) | |
tree | bfdf9d950f52f1fba9316452b9576e561dca42d3 | |
parent | c8cbee61c9d53ee28473ad33bbb54f6a88f5e3af (diff) | |
parent | 5b5a60da281c767196427ce8144deae6ec46b389 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[NET]: Make skb_seq_read unmap the last fragment
[NET]: Re-enable irqs before pushing pending DMA requests
[TCP] tcp_read_sock: Allow recv_actor() return return negative error value.
[PPP]: Fix osize too small errors when decoding mppe.
[PPP]: Revert 606f585e363527da9feaed79465132c0c661fd9e
[TIPC]: Fix infinite loop in netlink handler
[SKBUFF]: Fix incorrect config #ifdef around skb_copy_secmark
[IPV4]: include sysctl.h from inetdevice.h
[IPV6] NDISC: Fix thinko to control Router Preference support.
[NETFILTER]: nfctnetlink: Don't allow to change helper
[NETFILTER]: nf_conntrack_sip: add missing message types containing RTP info
-rw-r--r-- | drivers/net/ppp_generic.c | 13 | ||||
-rw-r--r-- | drivers/net/ppp_mppe.c | 10 | ||||
-rw-r--r-- | include/linux/inetdevice.h | 1 | ||||
-rw-r--r-- | net/core/dev.c | 2 | ||||
-rw-r--r-- | net/core/skbuff.c | 7 | ||||
-rw-r--r-- | net/ipv4/tcp.c | 8 | ||||
-rw-r--r-- | net/ipv6/ndisc.c | 2 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_netlink.c | 3 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_sip.c | 3 | ||||
-rw-r--r-- | net/tipc/netlink.c | 2 |
10 files changed, 37 insertions, 14 deletions
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index 541168713f1f..3ef0092dc09c 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c | |||
@@ -1708,7 +1708,18 @@ ppp_decompress_frame(struct ppp *ppp, struct sk_buff *skb) | |||
1708 | goto err; | 1708 | goto err; |
1709 | 1709 | ||
1710 | if (proto == PPP_COMP) { | 1710 | if (proto == PPP_COMP) { |
1711 | ns = dev_alloc_skb(ppp->mru + PPP_HDRLEN); | 1711 | int obuff_size; |
1712 | |||
1713 | switch(ppp->rcomp->compress_proto) { | ||
1714 | case CI_MPPE: | ||
1715 | obuff_size = ppp->mru + PPP_HDRLEN + 1; | ||
1716 | break; | ||
1717 | default: | ||
1718 | obuff_size = ppp->mru + PPP_HDRLEN; | ||
1719 | break; | ||
1720 | } | ||
1721 | |||
1722 | ns = dev_alloc_skb(obuff_size); | ||
1712 | if (ns == 0) { | 1723 | if (ns == 0) { |
1713 | printk(KERN_ERR "ppp_decompress_frame: no memory\n"); | 1724 | printk(KERN_ERR "ppp_decompress_frame: no memory\n"); |
1714 | goto err; | 1725 | goto err; |
diff --git a/drivers/net/ppp_mppe.c b/drivers/net/ppp_mppe.c index 5ae80bbe2edc..d5bdd2574659 100644 --- a/drivers/net/ppp_mppe.c +++ b/drivers/net/ppp_mppe.c | |||
@@ -493,14 +493,14 @@ mppe_decompress(void *arg, unsigned char *ibuf, int isize, unsigned char *obuf, | |||
493 | 493 | ||
494 | /* | 494 | /* |
495 | * Make sure we have enough room to decrypt the packet. | 495 | * Make sure we have enough room to decrypt the packet. |
496 | * To account for possible PFC we should only subtract 1 | 496 | * Note that for our test we only subtract 1 byte whereas in |
497 | * byte whereas in mppe_compress() we added 2 bytes (+MPPE_OVHD); | 497 | * mppe_compress() we added 2 bytes (+MPPE_OVHD); |
498 | * However, we assume no PFC, thus subtracting 2 bytes. | 498 | * this is to account for possible PFC. |
499 | */ | 499 | */ |
500 | if (osize < isize - MPPE_OVHD - 2) { | 500 | if (osize < isize - MPPE_OVHD - 1) { |
501 | printk(KERN_DEBUG "mppe_decompress[%d]: osize too small! " | 501 | printk(KERN_DEBUG "mppe_decompress[%d]: osize too small! " |
502 | "(have: %d need: %d)\n", state->unit, | 502 | "(have: %d need: %d)\n", state->unit, |
503 | osize, isize - MPPE_OVHD - 2); | 503 | osize, isize - MPPE_OVHD - 1); |
504 | return DECOMP_ERROR; | 504 | return DECOMP_ERROR; |
505 | } | 505 | } |
506 | osize = isize - MPPE_OVHD - 2; /* assume no PFC */ | 506 | osize = isize - MPPE_OVHD - 2; /* assume no PFC */ |
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index ae04901aa09a..d83fee2dc643 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/netdevice.h> | 8 | #include <linux/netdevice.h> |
9 | #include <linux/rcupdate.h> | 9 | #include <linux/rcupdate.h> |
10 | #include <linux/timer.h> | 10 | #include <linux/timer.h> |
11 | #include <linux/sysctl.h> | ||
11 | 12 | ||
12 | struct ipv4_devconf | 13 | struct ipv4_devconf |
13 | { | 14 | { |
diff --git a/net/core/dev.c b/net/core/dev.c index 26090621ea6b..ee051bb398a0 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2009,6 +2009,7 @@ static void net_rx_action(struct softirq_action *h) | |||
2009 | } | 2009 | } |
2010 | } | 2010 | } |
2011 | out: | 2011 | out: |
2012 | local_irq_enable(); | ||
2012 | #ifdef CONFIG_NET_DMA | 2013 | #ifdef CONFIG_NET_DMA |
2013 | /* | 2014 | /* |
2014 | * There may not be any more sk_buffs coming right now, so push | 2015 | * There may not be any more sk_buffs coming right now, so push |
@@ -2022,7 +2023,6 @@ out: | |||
2022 | rcu_read_unlock(); | 2023 | rcu_read_unlock(); |
2023 | } | 2024 | } |
2024 | #endif | 2025 | #endif |
2025 | local_irq_enable(); | ||
2026 | return; | 2026 | return; |
2027 | 2027 | ||
2028 | softnet_break: | 2028 | softnet_break: |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 7c6a34e21eee..27cfe5fe4bb9 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -434,8 +434,8 @@ struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask) | |||
434 | n->tc_verd = CLR_TC_MUNGED(n->tc_verd); | 434 | n->tc_verd = CLR_TC_MUNGED(n->tc_verd); |
435 | C(iif); | 435 | C(iif); |
436 | #endif | 436 | #endif |
437 | skb_copy_secmark(n, skb); | ||
438 | #endif | 437 | #endif |
438 | skb_copy_secmark(n, skb); | ||
439 | C(truesize); | 439 | C(truesize); |
440 | atomic_set(&n->users, 1); | 440 | atomic_set(&n->users, 1); |
441 | C(head); | 441 | C(head); |
@@ -1706,6 +1706,11 @@ next_skb: | |||
1706 | st->stepped_offset += frag->size; | 1706 | st->stepped_offset += frag->size; |
1707 | } | 1707 | } |
1708 | 1708 | ||
1709 | if (st->frag_data) { | ||
1710 | kunmap_skb_frag(st->frag_data); | ||
1711 | st->frag_data = NULL; | ||
1712 | } | ||
1713 | |||
1709 | if (st->cur_skb->next) { | 1714 | if (st->cur_skb->next) { |
1710 | st->cur_skb = st->cur_skb->next; | 1715 | st->cur_skb = st->cur_skb->next; |
1711 | st->frag_idx = 0; | 1716 | st->frag_idx = 0; |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index cd3c7e95de9e..450f44bb2c8e 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -1064,7 +1064,11 @@ int tcp_read_sock(struct sock *sk, read_descriptor_t *desc, | |||
1064 | break; | 1064 | break; |
1065 | } | 1065 | } |
1066 | used = recv_actor(desc, skb, offset, len); | 1066 | used = recv_actor(desc, skb, offset, len); |
1067 | if (used <= len) { | 1067 | if (used < 0) { |
1068 | if (!copied) | ||
1069 | copied = used; | ||
1070 | break; | ||
1071 | } else if (used <= len) { | ||
1068 | seq += used; | 1072 | seq += used; |
1069 | copied += used; | 1073 | copied += used; |
1070 | offset += used; | 1074 | offset += used; |
@@ -1086,7 +1090,7 @@ int tcp_read_sock(struct sock *sk, read_descriptor_t *desc, | |||
1086 | tcp_rcv_space_adjust(sk); | 1090 | tcp_rcv_space_adjust(sk); |
1087 | 1091 | ||
1088 | /* Clean up data we have read: This will do ACK frames. */ | 1092 | /* Clean up data we have read: This will do ACK frames. */ |
1089 | if (copied) | 1093 | if (copied > 0) |
1090 | tcp_cleanup_rbuf(sk, copied); | 1094 | tcp_cleanup_rbuf(sk, copied); |
1091 | return copied; | 1095 | return copied; |
1092 | } | 1096 | } |
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index d8b36451bada..0358e6066a4e 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -1062,7 +1062,7 @@ static void ndisc_router_discovery(struct sk_buff *skb) | |||
1062 | pref = ra_msg->icmph.icmp6_router_pref; | 1062 | pref = ra_msg->icmph.icmp6_router_pref; |
1063 | /* 10b is handled as if it were 00b (medium) */ | 1063 | /* 10b is handled as if it were 00b (medium) */ |
1064 | if (pref == ICMPV6_ROUTER_PREF_INVALID || | 1064 | if (pref == ICMPV6_ROUTER_PREF_INVALID || |
1065 | in6_dev->cnf.accept_ra_rtr_pref) | 1065 | !in6_dev->cnf.accept_ra_rtr_pref) |
1066 | pref = ICMPV6_ROUTER_PREF_MEDIUM; | 1066 | pref = ICMPV6_ROUTER_PREF_MEDIUM; |
1067 | #endif | 1067 | #endif |
1068 | 1068 | ||
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 3f73327794ab..d0fe3d769828 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
@@ -869,8 +869,7 @@ ctnetlink_change_helper(struct nf_conn *ct, struct nfattr *cda[]) | |||
869 | return 0; | 869 | return 0; |
870 | 870 | ||
871 | if (help->helper) | 871 | if (help->helper) |
872 | /* we had a helper before ... */ | 872 | return -EBUSY; |
873 | nf_ct_remove_expectations(ct); | ||
874 | 873 | ||
875 | /* need to zero data of old helper */ | 874 | /* need to zero data of old helper */ |
876 | memset(&help->help, 0, sizeof(help->help)); | 875 | memset(&help->help, 0, sizeof(help->help)); |
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c index 7aaa8c91b293..1b5c6c1055f7 100644 --- a/net/netfilter/nf_conntrack_sip.c +++ b/net/netfilter/nf_conntrack_sip.c | |||
@@ -442,6 +442,9 @@ static int sip_help(struct sk_buff **pskb, | |||
442 | 442 | ||
443 | /* RTP info only in some SDP pkts */ | 443 | /* RTP info only in some SDP pkts */ |
444 | if (memcmp(dptr, "INVITE", sizeof("INVITE") - 1) != 0 && | 444 | if (memcmp(dptr, "INVITE", sizeof("INVITE") - 1) != 0 && |
445 | memcmp(dptr, "UPDATE", sizeof("UPDATE") - 1) != 0 && | ||
446 | memcmp(dptr, "SIP/2.0 180", sizeof("SIP/2.0 180") - 1) != 0 && | ||
447 | memcmp(dptr, "SIP/2.0 183", sizeof("SIP/2.0 183") - 1) != 0 && | ||
445 | memcmp(dptr, "SIP/2.0 200", sizeof("SIP/2.0 200") - 1) != 0) { | 448 | memcmp(dptr, "SIP/2.0 200", sizeof("SIP/2.0 200") - 1) != 0) { |
446 | goto out; | 449 | goto out; |
447 | } | 450 | } |
diff --git a/net/tipc/netlink.c b/net/tipc/netlink.c index 4cdafa2d1d4d..6a7f7b4c2595 100644 --- a/net/tipc/netlink.c +++ b/net/tipc/netlink.c | |||
@@ -60,7 +60,7 @@ static int handle_cmd(struct sk_buff *skb, struct genl_info *info) | |||
60 | rep_nlh = nlmsg_hdr(rep_buf); | 60 | rep_nlh = nlmsg_hdr(rep_buf); |
61 | memcpy(rep_nlh, req_nlh, hdr_space); | 61 | memcpy(rep_nlh, req_nlh, hdr_space); |
62 | rep_nlh->nlmsg_len = rep_buf->len; | 62 | rep_nlh->nlmsg_len = rep_buf->len; |
63 | genlmsg_unicast(rep_buf, req_nlh->nlmsg_pid); | 63 | genlmsg_unicast(rep_buf, NETLINK_CB(skb).pid); |
64 | } | 64 | } |
65 | 65 | ||
66 | return 0; | 66 | return 0; |