Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=558585aad0c0ef83d3d14a1c7576b1e404ca1fbc
Commit:     558585aad0c0ef83d3d14a1c7576b1e404ca1fbc
Parent:     067b207b281db5e3f03f8d244286c20f61aa2343
Author:     Jing Min Zhao <[EMAIL PROTECTED]>
AuthorDate: Sat Jul 7 22:13:17 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Tue Jul 10 22:16:54 2007 -0700

    [NETFILTER]: nf_conntrack_h323: check range first in sequence extension
    
    Check range before checking STOP flag. This optimization may save a
    nanosecond or less :)
    
    Signed-off-by: Jing Min Zhao <[EMAIL PROTECTED]>
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/netfilter/nf_conntrack_h323_asn1.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/net/netfilter/nf_conntrack_h323_asn1.c 
b/net/netfilter/nf_conntrack_h323_asn1.c
index 6b7eaa0..a869403 100644
--- a/net/netfilter/nf_conntrack_h323_asn1.c
+++ b/net/netfilter/nf_conntrack_h323_asn1.c
@@ -555,15 +555,6 @@ int decode_seq(bitstr_t * bs, field_t * f, char *base, int 
level)
 
        /* Decode the extension components */
        for (opt = 0; opt < bmp2_len; opt++, i++, son++) {
-               if (i < f->ub && son->attr & STOP) {
-                       PRINT("%*.s%s\n", (level + 1) * TAB_SIZE, " ",
-                             son->name);
-                       return H323_ERROR_STOP;
-               }
-
-               if (!((0x80000000 >> opt) & bmp2))      /* Not present */
-                       continue;
-
                /* Check Range */
                if (i >= f->ub) {       /* Newer Version? */
                        CHECK_BOUND(bs, 2);
@@ -573,6 +564,15 @@ int decode_seq(bitstr_t * bs, field_t * f, char *base, int 
level)
                        continue;
                }
 
+               if (son->attr & STOP) {
+                       PRINT("%*.s%s\n", (level + 1) * TAB_SIZE, " ",
+                             son->name);
+                       return H323_ERROR_STOP;
+               }
+
+               if (!((0x80000000 >> opt) & bmp2))      /* Not present */
+                       continue;
+
                CHECK_BOUND(bs, 2);
                len = get_len(bs);
                CHECK_BOUND(bs, len);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to