Subject: Re: [PATCH 02/02] add mask options to fwmark masking code

From: Patrick McHardy <[email-masked]>
Date: Mon, 20 Feb 2006 17:57:11 +0100

Michael Richardson wrote:
> [PATCH] This patch introduces a mask to the fwmark test cases in the advanced
> routing. This let's one test individual bits of the fwmark to determine
> how things should be routed (pick a routing table). This patch retains
> compatibility with tests that do not set the mask by assuming a mask
> of 0 is equivalent to a mask of 0xffffffff.

> bcdda64a16d4dfda6d95452bbf8541999121831a
> diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
> index 27fd17e..a5b55c2 100644
> --- a/include/linux/rtnetlink.h
> +++ b/include/linux/rtnetlink.h
> @@ -266,6 +266,7 @@ enum rtattr_type_t
>  };
>  
>  #define RTA_FWMARK      RTA_PROTOINFO
> +#define RTA_FWMARK_MASK RTA_CACHEINFO

Please introduce a new attribute for this instead of overloading
RTA_CACHEINFO.

> diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
> index de327b3..69eed89 100644
> --- a/net/ipv4/fib_rules.c
> +++ b/net/ipv4/fib_rules.c
> @@ -68,6 +68,7 @@ struct fib_rule
>  	u8		r_tos;
>  #ifdef CONFIG_IP_ROUTE_FWMARK
>  	u32		r_fwmark;
> +        u32             r_fwmark_mask;

Both patches have whitespace issues. You should also change decnet,
which also supports routing by fwmark. Other than that the patch
looks fine, in fact its nearly identical to a patch I wanted to
send soon which does the same :)