Skip to contentSkip to conversation

ipset 6.x - bitmap:ip,mac not working

DISCUSSION Vlado Drzik 2 participants 3 messages Jan 15, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello All,

Would like to ask whether someone is actually using IP sets in recent kernel version with bitmap:ip,mac match.
I've updated from ipsets 4.x to ipset 6.10 and kernel 3.1.8 and I've noticed that bitmap:ip,mac never match.
I've tested also bitmap:ip and that one is working fine.

Test setup:

ipset create ipmac_test bitmap:ip,mac range 172.16.0.0/16 ipset add ipmac_test 172.16.1.254,00:11:22:33:44:55

iptables -I INPUT -i eth0 -m set --match-set ipmac_test src

And after I'm running some communication from host 172.16.1.254 with source MAC 00:11:22:33:44:55.

But there are not packets matched by the rule in iptables. Using just bitmap:ip it is working fine. Also previous version 4.x was working fine with macipmap.

Many thanks.
Regards,
Vladimir Drzik

#1 lore raw
Quoted 6 lines · Vlado Drzik

Would like to ask whether someone is actually using IP sets in recent kernel version with bitmap:ip,mac match.
I've updated from ipsets 4.x to ipset 6.10 and kernel 3.1.8 and I've noticed that bitmap:ip,mac never match.
I've tested also bitmap:ip and that one is working fine.

Quoted 6 lines

Test setup:

ipset create ipmac_test bitmap:ip,mac range 172.16.0.0/16 ipset add ipmac_test 172.16.1.254,00:11:22:33:44:55

iptables -I INPUT -i eth0 -m set --match-set ipmac_test src

That's a wrong rule: bitmap:ip,mac is a two dimensional set and therefore it requires two directional parameters:

iptables -I INPUT -i eth0 -m set --match-set ipmac_test src,src

Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences

          H-1525 Budapest 114, POB. 49, Hungary
#2 lore raw

Many Thanks Jozsef, That was quick.
Indeed it works now.

I haven't noticed that syntax has changed.

Regads,
Vladimir

Quoted 9 lines · Jozsef Kadlecsik
Quoted 2 lines

iptables -I INPUT -i eth0 -m set --match-set ipmac_test src

That's a wrong rule: bitmap:ip,mac is a two dimensional set and therefore it requires two directional parameters:

iptables -I INPUT -i eth0 -m set --match-set ipmac_test src,src

Best regards,
Jozsef