* [NETFILTER 01/04]: netfilter: xt_u32 bug correction
2007-08-14 16:40 [NETFILTER 00/04]: Netfilter fixes Patrick McHardy
@ 2007-08-14 16:40 ` Patrick McHardy
2007-08-14 17:18 ` Jan Engelhardt
2007-08-14 16:40 ` [NETFILTER 02/04]: nf_conntrack_sip: check sname != NULL before calling strncmp Patrick McHardy
` (3 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Patrick McHardy @ 2007-08-14 16:40 UTC (permalink / raw)
To: davem; +Cc: netfilter-devel, Patrick McHardy
[NETFILTER]: netfilter: xt_u32 bug correction
An extraneous ";" makes xt_u32 match useless
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit 4cbeda3b69e71c535ea820f5a94f4232598e3eea
tree e104d542dfa81fbec1656bce46a32bd0d3cdf10c
parent 39d3520c92cf7a28c07229ca00cc35a1e8026c77
author Eric Dumazet <dada1@cosmosbay.com> Tue, 14 Aug 2007 18:35:02 +0200
committer Patrick McHardy <kaber@trash.net> Tue, 14 Aug 2007 18:35:02 +0200
net/netfilter/xt_u32.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/netfilter/xt_u32.c b/net/netfilter/xt_u32.c
index 74f9b14..bec4279 100644
--- a/net/netfilter/xt_u32.c
+++ b/net/netfilter/xt_u32.c
@@ -36,7 +36,7 @@ static bool u32_match_it(const struct xt_u32 *data,
at = 0;
pos = ct->location[0].number;
- if (skb->len < 4 || pos > skb->len - 4);
+ if (skb->len < 4 || pos > skb->len - 4)
return false;
ret = skb_copy_bits(skb, pos, &n, sizeof(n));
^ permalink raw reply related [flat|nested] 7+ messages in thread* [NETFILTER 02/04]: nf_conntrack_sip: check sname != NULL before calling strncmp
2007-08-14 16:40 [NETFILTER 00/04]: Netfilter fixes Patrick McHardy
2007-08-14 16:40 ` [NETFILTER 01/04]: netfilter: xt_u32 bug correction Patrick McHardy
@ 2007-08-14 16:40 ` Patrick McHardy
2007-08-14 16:40 ` [NETFILTER 03/04]: nf_conntrack_sip: fix SIP-URI parsing Patrick McHardy
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Patrick McHardy @ 2007-08-14 16:40 UTC (permalink / raw)
To: davem; +Cc: netfilter-devel, Patrick McHardy
[NETFILTER]: nf_conntrack_sip: check sname != NULL before calling strncmp
The check got lost during the conversion to nf_conntrack.
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit c58af8c25d20e59644356f78e055eeba9edb8aae
tree c7c95d0ba93d86f6ec33dc2ae12e532dc1ce77ab
parent 4cbeda3b69e71c535ea820f5a94f4232598e3eea
author Patrick McHardy <kaber@trash.net> Tue, 14 Aug 2007 18:37:01 +0200
committer Patrick McHardy <kaber@trash.net> Tue, 14 Aug 2007 18:37:01 +0200
net/netfilter/nf_conntrack_sip.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c
index 1276a44..5cc9636 100644
--- a/net/netfilter/nf_conntrack_sip.c
+++ b/net/netfilter/nf_conntrack_sip.c
@@ -330,7 +330,8 @@ int ct_sip_get_info(struct nf_conn *ct,
while (dptr <= limit) {
if ((strncmp(dptr, hnfo->lname, hnfo->lnlen) != 0) &&
- (strncmp(dptr, hnfo->sname, hnfo->snlen) != 0)) {
+ (hnfo->sname == NULL ||
+ strncmp(dptr, hnfo->sname, hnfo->snlen) != 0)) {
dptr++;
continue;
}
^ permalink raw reply related [flat|nested] 7+ messages in thread* [NETFILTER 03/04]: nf_conntrack_sip: fix SIP-URI parsing
2007-08-14 16:40 [NETFILTER 00/04]: Netfilter fixes Patrick McHardy
2007-08-14 16:40 ` [NETFILTER 01/04]: netfilter: xt_u32 bug correction Patrick McHardy
2007-08-14 16:40 ` [NETFILTER 02/04]: nf_conntrack_sip: check sname != NULL before calling strncmp Patrick McHardy
@ 2007-08-14 16:40 ` Patrick McHardy
2007-08-14 16:40 ` [NETFILTER 04/04]: nf_nat_sip: don't drop short packets Patrick McHardy
2007-08-14 20:15 ` [NETFILTER 00/04]: Netfilter fixes David Miller
4 siblings, 0 replies; 7+ messages in thread
From: Patrick McHardy @ 2007-08-14 16:40 UTC (permalink / raw)
To: davem; +Cc: netfilter-devel, Patrick McHardy
[NETFILTER]: nf_conntrack_sip: fix SIP-URI parsing
The userinfo component of a SIP-URI is optional, continue parsing at the
beginning of the SIP-URI in case its not found.
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit 492d0e43049e7f420c1c64044ab57abf278fbead
tree d5b5da1b2109b78f28fa8748bcb33e573be85e5a
parent c58af8c25d20e59644356f78e055eeba9edb8aae
author Patrick McHardy <kaber@trash.net> Tue, 14 Aug 2007 18:37:25 +0200
committer Patrick McHardy <kaber@trash.net> Tue, 14 Aug 2007 18:37:25 +0200
net/netfilter/nf_conntrack_sip.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c
index 5cc9636..d449fa4 100644
--- a/net/netfilter/nf_conntrack_sip.c
+++ b/net/netfilter/nf_conntrack_sip.c
@@ -295,6 +295,7 @@ static int epaddr_len(struct nf_conn *ct, const char *dptr,
static int skp_epaddr_len(struct nf_conn *ct, const char *dptr,
const char *limit, int *shift)
{
+ const char *start = dptr;
int s = *shift;
/* Search for @, but stop at the end of the line.
@@ -309,8 +310,10 @@ static int skp_epaddr_len(struct nf_conn *ct, const char *dptr,
if (dptr <= limit && *dptr == '@') {
dptr++;
(*shift)++;
- } else
+ } else {
+ dptr = start;
*shift = s;
+ }
return epaddr_len(ct, dptr, limit, shift);
}
^ permalink raw reply related [flat|nested] 7+ messages in thread* [NETFILTER 04/04]: nf_nat_sip: don't drop short packets
2007-08-14 16:40 [NETFILTER 00/04]: Netfilter fixes Patrick McHardy
` (2 preceding siblings ...)
2007-08-14 16:40 ` [NETFILTER 03/04]: nf_conntrack_sip: fix SIP-URI parsing Patrick McHardy
@ 2007-08-14 16:40 ` Patrick McHardy
2007-08-14 20:15 ` [NETFILTER 00/04]: Netfilter fixes David Miller
4 siblings, 0 replies; 7+ messages in thread
From: Patrick McHardy @ 2007-08-14 16:40 UTC (permalink / raw)
To: davem; +Cc: netfilter-devel, Patrick McHardy
[NETFILTER]: nf_nat_sip: don't drop short packets
Don't drop packets shorter than "SIP/2.0", just ignore them. Keep-alives
can validly be shorter for example.
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit 12ad6c49be7b0cb1e9f32750e34cde5d29d40a48
tree 6dc3ff60e52adc58a3a02d725f819cc6811b1664
parent 492d0e43049e7f420c1c64044ab57abf278fbead
author Patrick McHardy <kaber@trash.net> Tue, 14 Aug 2007 18:37:58 +0200
committer Patrick McHardy <kaber@trash.net> Tue, 14 Aug 2007 18:37:58 +0200
net/ipv4/netfilter/nf_nat_sip.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/ipv4/netfilter/nf_nat_sip.c b/net/ipv4/netfilter/nf_nat_sip.c
index a889ec3..e14d419 100644
--- a/net/ipv4/netfilter/nf_nat_sip.c
+++ b/net/ipv4/netfilter/nf_nat_sip.c
@@ -104,7 +104,7 @@ static unsigned int ip_nat_sip(struct sk_buff **pskb,
dataoff = ip_hdrlen(*pskb) + sizeof(struct udphdr);
datalen = (*pskb)->len - dataoff;
if (datalen < sizeof("SIP/2.0") - 1)
- return NF_DROP;
+ return NF_ACCEPT;
addr_map_init(ct, &map);
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [NETFILTER 00/04]: Netfilter fixes
2007-08-14 16:40 [NETFILTER 00/04]: Netfilter fixes Patrick McHardy
` (3 preceding siblings ...)
2007-08-14 16:40 ` [NETFILTER 04/04]: nf_nat_sip: don't drop short packets Patrick McHardy
@ 2007-08-14 20:15 ` David Miller
4 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2007-08-14 20:15 UTC (permalink / raw)
To: kaber; +Cc: netfilter-devel
From: Patrick McHardy <kaber@trash.net>
Date: Tue, 14 Aug 2007 18:40:12 +0200 (MEST)
> Hi Dave,
>
> these patches fix an extraneous ";" in the new u32 match and three minor
> bugs in the SIP conntrack helper. Please apply, thanks.
All applied, thanks Patrick.
^ permalink raw reply [flat|nested] 7+ messages in thread