Issue with specifying interface/NIC name with drop packets rule

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

 



Hi ,
 I am using iptables library 1.4.15 on my linux machine and building
it to define and add the iptables rules. And I have multiple NIC
cards("eth0" and "eth1") on my machine and i need to add the rules
specific to some of these NICs. Allow and drop rules are working fine
as long as the NIC is not specified, but when I add rule with the
specific NIC name like "eth0" to drop packets,
i see it is droping packets for all the interfaces. Is there any known
issue with specifying NIC name.

the invocation path is like this:
   addMyRule(srcIp, srcIpNetmask, destIp, destIpNetmask,nicName,
proto, sport_min,sport_max, dport_min, dport_max,precedence, action,
0) -> iptc_insert_entry
   Invocation with the values:  addMyRule(inaddr_any, 0, inaddr_any,
0,"eth0", 0, 0, 65535,80,80,2,0,0)
In the implementation of addMyRule, ipt_entry is instantiated and NIC
name is copied to "iniface" attribute of the "ipt_ip" in "ipt_entry"
e = (struct ipt_entry *)malloc(total_length);
    if (nicName)
    {
        strcpy(e->ip.iniface, nicName)
     }

 I searched in the net for the known issues, but I could not find any
related. Any help in this regard would be highly appreciated.

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




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux