Skip to contentSkip to conversation

nf_mark use in sk_buff

DISCUSSION shah hemal 2 participants 4 messages Feb 11, 2007 – Feb 13, 2007 netfilter

lore
Share & tools
lore

shah hemal

author
#0 lore raw

Hi,

What is nfmark field of sk_buff? For what
purpose it can be use?

its written in sk_buff structure description:
nfmark

Can be used for communication between hooks .

thanks in advance.
hemal

#1 lore raw

From: shah hemal <[email protected]>
Date: Sun, 11 Feb 2007 00:20:25 -0800 (PST)

Quoted 9 lines

Hi,

What is nfmark field of sk_buff? For what
purpose it can be use?

its written in sk_buff structure description:
nfmark

Can be used for communication between hooks .

You can set the mark one rule, then match on the mark using other rules.

author
#2 lore raw

Dear sir,

thanks for reply.I have register netfilter hook
NF_IP_FORWARD and wrote the handler function

i want to forward the packet from my local buffer
where i have cached it. i saw one field in skbuff structure. i.e. nfmark.

Is it possible to pass the mark value to module and then use it to point skbuff->nfmark?this mark can be any integer value ??

thanks in advance.
hemal

Quoted 18 lines · --- David Miller

From: shah hemal <[email protected]>
Date: Sun, 11 Feb 2007 00:20:25 -0800 (PST)

Quoted 3 lines

Hi,

What is nfmark field of sk_buff? For

what

Quoted 6 lines

purpose it can be use?

its written in sk_buff structure description:
nfmark

Can be used for communication between hooks .

You can set the mark one rule, then match on the
mark using other
rules.

author
#3 lore raw
In reply to David Miller

Dear sir,

thanks for reply.I have register netfilter hook
NF_IP_FORWARD and wrote the handler function

i want to forward the packet from my local buffer
where i have cached it. i saw one field in skbuff structure. i.e. nfmark.

Is it possible to pass the mark value to module and then use it to point skbuff->nfmark?this mark can be any integer value ??

thanks in advance.
hemal

Quoted 18 lines · --- David Miller

From: shah hemal <[email protected]>
Date: Sun, 11 Feb 2007 00:20:25 -0800 (PST)

Quoted 3 lines

Hi,

What is nfmark field of sk_buff? For

what

Quoted 6 lines

purpose it can be use?

its written in sk_buff structure description:
nfmark

Can be used for communication between hooks .

You can set the mark one rule, then match on the
mark using other
rules.