Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36e2a1b0 authored by Patrick McHardy's avatar Patrick McHardy
Browse files

[NETFILTER]: {ip,ip6}t_LOG: print MARK value in log output



Dump the mark value in log messages similar to nfnetlink_log. This
is useful for debugging complex setups where marks are used for
routing or traffic classification.

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent b916f7d4
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -344,6 +344,10 @@ static void dump_packet(const struct nf_loginfo *info,
		read_unlock_bh(&skb->sk->sk_callback_lock);
	}

	/* Max length: 16 "MARK=0xFFFFFFFF " */
	if (!iphoff && skb->mark)
		printk("MARK=0x%x ", skb->mark);

	/* Proto    Max log string length */
	/* IP:      40+46+6+11+127 = 230 */
	/* TCP:     10+max(25,20+30+13+9+32+11+127) = 252 */
+5 −1
Original line number Diff line number Diff line
@@ -368,6 +368,10 @@ static void dump_packet(const struct nf_loginfo *info,
				skb->sk->sk_socket->file->f_gid);
		read_unlock_bh(&skb->sk->sk_callback_lock);
	}

	/* Max length: 16 "MARK=0xFFFFFFFF " */
	if (!recurse && skb->mark)
		printk("MARK=0x%x ", skb->mark);
}

static struct nf_loginfo default_loginfo = {