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
This commit is contained in:
commit
b2510b1696
@ -1708,7 +1708,18 @@ ppp_decompress_frame(struct ppp *ppp, struct sk_buff *skb)
|
|||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
if (proto == PPP_COMP) {
|
if (proto == PPP_COMP) {
|
||||||
ns = dev_alloc_skb(ppp->mru + PPP_HDRLEN);
|
int obuff_size;
|
||||||
|
|
||||||
|
switch(ppp->rcomp->compress_proto) {
|
||||||
|
case CI_MPPE:
|
||||||
|
obuff_size = ppp->mru + PPP_HDRLEN + 1;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
obuff_size = ppp->mru + PPP_HDRLEN;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
ns = dev_alloc_skb(obuff_size);
|
||||||
if (ns == 0) {
|
if (ns == 0) {
|
||||||
printk(KERN_ERR "ppp_decompress_frame: no memory\n");
|
printk(KERN_ERR "ppp_decompress_frame: no memory\n");
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -493,14 +493,14 @@ mppe_decompress(void *arg, unsigned char *ibuf, int isize, unsigned char *obuf,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Make sure we have enough room to decrypt the packet.
|
* Make sure we have enough room to decrypt the packet.
|
||||||
* To account for possible PFC we should only subtract 1
|
* Note that for our test we only subtract 1 byte whereas in
|
||||||
* byte whereas in mppe_compress() we added 2 bytes (+MPPE_OVHD);
|
* mppe_compress() we added 2 bytes (+MPPE_OVHD);
|
||||||
* However, we assume no PFC, thus subtracting 2 bytes.
|
* this is to account for possible PFC.
|
||||||
*/
|
*/
|
||||||
if (osize < isize - MPPE_OVHD - 2) {
|
if (osize < isize - MPPE_OVHD - 1) {
|
||||||
printk(KERN_DEBUG "mppe_decompress[%d]: osize too small! "
|
printk(KERN_DEBUG "mppe_decompress[%d]: osize too small! "
|
||||||
"(have: %d need: %d)\n", state->unit,
|
"(have: %d need: %d)\n", state->unit,
|
||||||
osize, isize - MPPE_OVHD - 2);
|
osize, isize - MPPE_OVHD - 1);
|
||||||
return DECOMP_ERROR;
|
return DECOMP_ERROR;
|
||||||
}
|
}
|
||||||
osize = isize - MPPE_OVHD - 2; /* assume no PFC */
|
osize = isize - MPPE_OVHD - 2; /* assume no PFC */
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include <linux/netdevice.h>
|
#include <linux/netdevice.h>
|
||||||
#include <linux/rcupdate.h>
|
#include <linux/rcupdate.h>
|
||||||
#include <linux/timer.h>
|
#include <linux/timer.h>
|
||||||
|
#include <linux/sysctl.h>
|
||||||
|
|
||||||
struct ipv4_devconf
|
struct ipv4_devconf
|
||||||
{
|
{
|
||||||
|
@ -2009,6 +2009,7 @@ static void net_rx_action(struct softirq_action *h)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
|
local_irq_enable();
|
||||||
#ifdef CONFIG_NET_DMA
|
#ifdef CONFIG_NET_DMA
|
||||||
/*
|
/*
|
||||||
* There may not be any more sk_buffs coming right now, so push
|
* There may not be any more sk_buffs coming right now, so push
|
||||||
@ -2022,7 +2023,6 @@ out:
|
|||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
local_irq_enable();
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
softnet_break:
|
softnet_break:
|
||||||
|
@ -434,8 +434,8 @@ struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask)
|
|||||||
n->tc_verd = CLR_TC_MUNGED(n->tc_verd);
|
n->tc_verd = CLR_TC_MUNGED(n->tc_verd);
|
||||||
C(iif);
|
C(iif);
|
||||||
#endif
|
#endif
|
||||||
skb_copy_secmark(n, skb);
|
|
||||||
#endif
|
#endif
|
||||||
|
skb_copy_secmark(n, skb);
|
||||||
C(truesize);
|
C(truesize);
|
||||||
atomic_set(&n->users, 1);
|
atomic_set(&n->users, 1);
|
||||||
C(head);
|
C(head);
|
||||||
@ -1706,6 +1706,11 @@ next_skb:
|
|||||||
st->stepped_offset += frag->size;
|
st->stepped_offset += frag->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (st->frag_data) {
|
||||||
|
kunmap_skb_frag(st->frag_data);
|
||||||
|
st->frag_data = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (st->cur_skb->next) {
|
if (st->cur_skb->next) {
|
||||||
st->cur_skb = st->cur_skb->next;
|
st->cur_skb = st->cur_skb->next;
|
||||||
st->frag_idx = 0;
|
st->frag_idx = 0;
|
||||||
|
@ -1064,7 +1064,11 @@ int tcp_read_sock(struct sock *sk, read_descriptor_t *desc,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
used = recv_actor(desc, skb, offset, len);
|
used = recv_actor(desc, skb, offset, len);
|
||||||
if (used <= len) {
|
if (used < 0) {
|
||||||
|
if (!copied)
|
||||||
|
copied = used;
|
||||||
|
break;
|
||||||
|
} else if (used <= len) {
|
||||||
seq += used;
|
seq += used;
|
||||||
copied += used;
|
copied += used;
|
||||||
offset += used;
|
offset += used;
|
||||||
@ -1086,7 +1090,7 @@ int tcp_read_sock(struct sock *sk, read_descriptor_t *desc,
|
|||||||
tcp_rcv_space_adjust(sk);
|
tcp_rcv_space_adjust(sk);
|
||||||
|
|
||||||
/* Clean up data we have read: This will do ACK frames. */
|
/* Clean up data we have read: This will do ACK frames. */
|
||||||
if (copied)
|
if (copied > 0)
|
||||||
tcp_cleanup_rbuf(sk, copied);
|
tcp_cleanup_rbuf(sk, copied);
|
||||||
return copied;
|
return copied;
|
||||||
}
|
}
|
||||||
|
@ -1062,7 +1062,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
|
|||||||
pref = ra_msg->icmph.icmp6_router_pref;
|
pref = ra_msg->icmph.icmp6_router_pref;
|
||||||
/* 10b is handled as if it were 00b (medium) */
|
/* 10b is handled as if it were 00b (medium) */
|
||||||
if (pref == ICMPV6_ROUTER_PREF_INVALID ||
|
if (pref == ICMPV6_ROUTER_PREF_INVALID ||
|
||||||
in6_dev->cnf.accept_ra_rtr_pref)
|
!in6_dev->cnf.accept_ra_rtr_pref)
|
||||||
pref = ICMPV6_ROUTER_PREF_MEDIUM;
|
pref = ICMPV6_ROUTER_PREF_MEDIUM;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -869,8 +869,7 @@ ctnetlink_change_helper(struct nf_conn *ct, struct nfattr *cda[])
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (help->helper)
|
if (help->helper)
|
||||||
/* we had a helper before ... */
|
return -EBUSY;
|
||||||
nf_ct_remove_expectations(ct);
|
|
||||||
|
|
||||||
/* need to zero data of old helper */
|
/* need to zero data of old helper */
|
||||||
memset(&help->help, 0, sizeof(help->help));
|
memset(&help->help, 0, sizeof(help->help));
|
||||||
|
@ -442,6 +442,9 @@ static int sip_help(struct sk_buff **pskb,
|
|||||||
|
|
||||||
/* RTP info only in some SDP pkts */
|
/* RTP info only in some SDP pkts */
|
||||||
if (memcmp(dptr, "INVITE", sizeof("INVITE") - 1) != 0 &&
|
if (memcmp(dptr, "INVITE", sizeof("INVITE") - 1) != 0 &&
|
||||||
|
memcmp(dptr, "UPDATE", sizeof("UPDATE") - 1) != 0 &&
|
||||||
|
memcmp(dptr, "SIP/2.0 180", sizeof("SIP/2.0 180") - 1) != 0 &&
|
||||||
|
memcmp(dptr, "SIP/2.0 183", sizeof("SIP/2.0 183") - 1) != 0 &&
|
||||||
memcmp(dptr, "SIP/2.0 200", sizeof("SIP/2.0 200") - 1) != 0) {
|
memcmp(dptr, "SIP/2.0 200", sizeof("SIP/2.0 200") - 1) != 0) {
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ static int handle_cmd(struct sk_buff *skb, struct genl_info *info)
|
|||||||
rep_nlh = nlmsg_hdr(rep_buf);
|
rep_nlh = nlmsg_hdr(rep_buf);
|
||||||
memcpy(rep_nlh, req_nlh, hdr_space);
|
memcpy(rep_nlh, req_nlh, hdr_space);
|
||||||
rep_nlh->nlmsg_len = rep_buf->len;
|
rep_nlh->nlmsg_len = rep_buf->len;
|
||||||
genlmsg_unicast(rep_buf, req_nlh->nlmsg_pid);
|
genlmsg_unicast(rep_buf, NETLINK_CB(skb).pid);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user