Re: [PATCH nf-next 3/6] netfilter: nf_tables: disable old tracing if listener is present

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

 



Patrick McHardy <kaber@xxxxxxxxx> wrote:
> On 25.11, Florian Westphal wrote:
> > I could also get rid of all formatting of course, i.e. remove the
> > libnftnl_trace_*printf functions, so libnftnl would just provide
> > the nftnl_trace struct to nftables frontend and the internal translation
> > of netlink messages to that struct.
> 
> I think having some printing is useful to trace/debug netlink communication
> itself, IOW the basic data. Just the full header decoding seems rather
> unnecessary.

Okay.

> > Yes, this DEV_TYPE attribute is only included for NFPROTO_NETDEV where L2
> > could be anything ...
> 
> I actually changed that in my local version to include it whenever we have
> pkt->in so we can decode ARP using dev_proto_desc(). I'm also including the
> LL header whenever present so its now also used for f.i. incoming IPv4/v6
> packets:
> 
> trace id 847cdc00 ip packet: iif ens3 ether daddr c9:4b:a9:00:54:52 ether saddr 63:f6:4b:00:54:52 ip hdrlength 4 ip version 5 ip tos 16 ip length 60 ip id 44588 ip frag-off 16384 ip ttl 64 ip checksum 5849 ip saddr 192.168.122.1 ip daddr 192.168.122.84 tcp sport 43178 tcp dport 10000
> 
> I've attached that change to the mail. At least the DEV_TYPE part is needed
> to make sense out of the ARP ll header in a generic way.

I see, thanks!

> +	if (pkt->in &&
> +	    nla_put_be16(nlskb, NFTA_TRACE_DEV_TYPE, htons(pkt->in->type)))
> +		return false;

Yes, much better.  Thanks Patrick!
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux