Re: [PATCH 6/8 v2] netfilter: fix string extension for case insensitive pattern matching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Joonwoo Park wrote:
netfilter: fix string extension for case insensitive pattern matching

The flag XT_STRING_FLAG_IGNORECASE indicates case insensitive string
matching.
netfilter can find cmd.exe, Cmd.exe, cMd.exe and etc easily.

Also this patch won't break compatibility since we have 2 bytes space
between invert and config, due to config was 8 bytes aligned.
So we can put a new value 'flags' in xt_string_info between invert and
config safely.
If previous version of iptables interact with this kernel, to kernel
side, flags will be set to zero and to user side, flags will be ignored.

This makes it hard for userspace to know whether insensitive
search is supported or not, similar for possible future flag
additions.

Please

- add a new revision for userspace to know whether flags are
  supported at all. You don't need to duplicate the checkentry
  function for this since the structure layout didn't change,
  you can simply parse flags dependant on match->revision.
  Userspace can use the existance of the new revision as
  indication that flags are supported.

- check for unknown flags and return an error

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux