Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 340505
b: refs/heads/master
c: 92eec78
h: refs/heads/master
i:
  340503: ca20e36
v: v3
  • Loading branch information
Jesper Dangaard Brouer authored and Simon Horman committed Sep 28, 2012
1 parent 676709b commit f8a45d3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d4383f04d145cce8b855c463f40020639ef83ea0
refs/heads/master: 92eec78d25aee6bbc9bd295f51c022ddfa80cdd9
16 changes: 12 additions & 4 deletions trunk/net/netfilter/ipvs/ip_vs_pe_sip.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ static int get_callid(const char *dptr, unsigned int dataoff,
static int
ip_vs_sip_fill_param(struct ip_vs_conn_param *p, struct sk_buff *skb)
{
struct sk_buff *reasm = skb_nfct_reasm(skb);
struct ip_vs_iphdr iph;
unsigned int dataoff, datalen, matchoff, matchlen;
const char *dptr;
Expand All @@ -78,13 +79,20 @@ ip_vs_sip_fill_param(struct ip_vs_conn_param *p, struct sk_buff *skb)
/* Only useful with UDP */
if (iph.protocol != IPPROTO_UDP)
return -EINVAL;
/* todo: IPv6 fragments:
* I think this only should be done for the first fragment. /HS
*/
if (reasm) {
skb = reasm;
dataoff = iph.thoff_reasm + sizeof(struct udphdr);
} else
dataoff = iph.len + sizeof(struct udphdr);

/* No Data ? */
dataoff = iph.len + sizeof(struct udphdr);
if (dataoff >= skb->len)
return -EINVAL;

if ((retc=skb_linearize(skb)) < 0)
/* todo: Check if this will mess-up the reasm skb !!! /HS */
retc = skb_linearize(skb);
if (retc < 0)
return retc;
dptr = skb->data + dataoff;
datalen = skb->len - dataoff;
Expand Down

0 comments on commit f8a45d3

Please sign in to comment.