Re: shift by n bits while performing '--restore-mark'

2018-02-20 Thread Florian Westphal
Jack Ma wrote: > Hi Florian, > > I attached two 'draft' patches in this email :) > > Thanks, > Jack > From 6d811e63c9c777ed4287bc4547134c99e939b49d Mon Sep 17 00:00:00 2001 > From: Jack Ma > Date: Mon, 12 Feb 2018 13:41:29 +1300 > Subject: [PATCH] libxt_CONNMARK: Support bit-shifting for --res

Re: shift by n bits while performing '--restore-mark'

2018-02-19 Thread Jack Ma
Hi Florian, Do these patches looks acceptable for the mainline stream? Any code comments will be appreciated ! Regards, Jack-- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kern

Re: shift by n bits while performing '--restore-mark'

2018-02-14 Thread Jack Ma
Hi Florian, I attached two 'draft' patches in this email :) Thanks, JackFrom 6d811e63c9c777ed4287bc4547134c99e939b49d Mon Sep 17 00:00:00 2001 From: Jack Ma Date: Mon, 12 Feb 2018 13:41:29 +1300 Subject: [PATCH] libxt_CONNMARK: Support bit-shifting for --restore,set and save-mark Added bit-shi

Re: shift by n bits while performing '--restore-mark'

2018-02-06 Thread Florian Westphal
Jack Ma wrote: > Our current condition is: > > 1) only 0xfff0 (three F available in skb->mark), but 0xf000 (five F > available in ct->mark) > > We wish to copy either 0xfff0 or 0x00fff000 from ct->mark into skb->mark, > > > What about '-j CONNMARK --restore-mark --mask 0xf000

shift by n bits while performing '--restore-mark'

2018-02-06 Thread Jack Ma
Hi Florian, Our current condition is: 1) only 0xfff0 (three F available in skb->mark), but 0xf000 (five F available in ct->mark) We wish to copy either 0xfff0 or 0x00fff000 from ct->mark into skb->mark, What about '-j CONNMARK --restore-mark --mask 0xf000 << 8 ( left shift 2