Merge tag 'platform-drivers-x86-v4.9-2' of git://git.infradead.org/users/dvhart/linux...
[cascardo/linux.git] / net / netfilter / nf_conntrack_sip.c
index 7d77217..621b81c 100644 (file)
@@ -83,9 +83,10 @@ static int digits_len(const struct nf_conn *ct, const char *dptr,
 static int iswordc(const char c)
 {
        if (isalnum(c) || c == '!' || c == '"' || c == '%' ||
-           (c >= '(' && c <= '/') || c == ':' || c == '<' || c == '>' ||
+           (c >= '(' && c <= '+') || c == ':' || c == '<' || c == '>' ||
            c == '?' || (c >= '[' && c <= ']') || c == '_' || c == '`' ||
-           c == '{' || c == '}' || c == '~')
+           c == '{' || c == '}' || c == '~' || (c >= '-' && c <= '/') ||
+           c == '\'')
                return 1;
        return 0;
 }
@@ -329,13 +330,12 @@ static const char *sip_follow_continuation(const char *dptr, const char *limit)
 static const char *sip_skip_whitespace(const char *dptr, const char *limit)
 {
        for (; dptr < limit; dptr++) {
-               if (*dptr == ' ')
+               if (*dptr == ' ' || *dptr == '\t')
                        continue;
                if (*dptr != '\r' && *dptr != '\n')
                        break;
                dptr = sip_follow_continuation(dptr, limit);
-               if (dptr == NULL)
-                       return NULL;
+               break;
        }
        return dptr;
 }