Re: nft for bridge.

ratheesh kannoth <[email protected]> Sun, 5 Oct 2025 17:56:06 +0530
Newsgroups gmane.comp.security.firewalls.netfilter.general
Message-ID <CAGZFCEEdS7wjCs7S5_pESdMqsMqVezcMS_qmr=mVoKs_PQfNNg@mail.gmail.com>
On Sun, Oct 5, 2025 at 5:15 PM Florian Westphal <[email protected]> wrote:
> You will need to figure that out yourself.  Most of us a volunteers.
Ok.

>
> > MY nft version : nftables v1.1.5 (Commodore Bullmoose #6)
> > My kernel :   kernel 6.6
> >
> > ADD cookie=18446462603462596360 (00:00:00:00:00:00,
> > 192.168.11.200:30443) to (00:00:00:00:00:00, 192.168.9.100:35091) IPv4
> > TCP
> > ADD cookie=18446462603462596360 (00:00:00:00:00:00,
> > 192.168.11.200:30443) to (00:00:00:00:00:00, 192.168.9.100:35091) IPv4
> > TCP
>
> I don't even know where these messages come from.
Sorry.  THis is a debug print added  in my function  xxxx() to print
flow tuple information.
.ndo_setup_tc()
     |
     |
case TC_SETUP_FT:
   return flow_block_cb_setup_simple(type_data,
                                                  &my_cb_list,
                                                  my_setup_ft_block_ingress_cb,
                                                  priv, priv, true);
              |
              |
              |
 my_setup_ft_block_ingress_cb()  {
    struct flow_cls_offload *cls = type_data;
    switch (cls->command) {
           case FLOW_CLS_REPLACE:
                return xxxx(nic, cls);
}
     |
     |
     |
xxxx() {
  // parsing flow here
 if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ETH_ADDRS)) {
                struct flow_match_eth_addrs match;
                    /// debug prints are here to print MAC address
                flow_rule_match_eth_addrs(rule, &match);
   }
     if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_IPV4_ADDRS)) {
                struct flow_match_ipv4_addrs match;
                  // debug prints are here to print IP address.
                flow_rule_match_ipv4_addrs(rule, &match);
    }

}