• Taehee Yoo's avatar
    netfilter: ipt_CLUSTERIP: check MAC address when duplicate config is set · 06aa151a
    Taehee Yoo authored
    If same destination IP address config is already existing, that config is
    just used. MAC address also should be same.
    However, there is no MAC address checking routine.
    So that MAC address checking routine is added.
    
    test commands:
       %iptables -A INPUT -p tcp -i lo -d 192.168.0.5 --dport 80 \
    	   -j CLUSTERIP --new --hashmode sourceip \
    	   --clustermac 01:00:5e:00:00:20 --total-nodes 2 --local-node 1
       %iptables -A INPUT -p tcp -i lo -d 192.168.0.5 --dport 80 \
    	   -j CLUSTERIP --new --hashmode sourceip \
    	   --clustermac 01:00:5e:00:00:21 --total-nodes 2 --local-node 1
    
    After this patch, above commands are disallowed.
    Signed-off-by: default avatarTaehee Yoo <ap420073@gmail.com>
    Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
    06aa151a
ipt_CLUSTERIP.c 22.1 KB