hash:net,iface supports matching on the bridge port as well,
but userspace currently doesn't handle it correctly as it passes
in 'physdev:eth0' instead of 'eth0'+IPSET_OPT_PHYSDEV.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
{
struct ipset_data *data;
int offset = 0, err = 0;
+ static const char pdev_prefix[]="physdev:";
assert(session);
assert(opt == IPSET_OPT_IFACE);
assert(str);
data = ipset_session_data(session);
- if (STREQ(str, "physdev:")) {
- offset = 8;
+ if (STRNEQ(str, pdev_prefix, strlen(pdev_prefix))) {
+ offset = strlen(pdev_prefix);
err = ipset_data_set(data, IPSET_OPT_PHYSDEV, str);
if (err < 0)
return err;