Skip to contentSkip to conversation

ipv4options patch

DISCUSSION Henrik Ehlig Petersen 1 participant 1 message Oct 31, 2005 netfilter

lore
Share & tools
lore

Henrik Ehlig Petersen

author Applied
#0 lore raw

Hi,

I have applied the ipv4options patch to the iptables/netfilter function, and have some questions:

How is the srr flag/register used in iptables? It is defined as a char, but how are the bits used? An example in the code makes a binary AND between the srr and a "boolean" (the is_strictroute). Is it because bit 0 in the srr register contains the relevant info? Or how should I understand the example below:

else if ((info->options & IPT_IPV4OPTION_MATCH_LSRR) ==

IPT_IPV4OPTION_MATCH_LSRR) {
		if (!((opt->srr) & (!opt->is_strictroute)))
			return 0;
	}

Hope you can help me, thanks!!

Signature · 2 lines
BR
Henrik