From b3c3cbf52235e3dda5b3b4fb7a3a8861c6ee3792 Mon Sep 17 00:00:00 2001 From: Benjamin Hesmans Date: Mon, 12 Jan 2015 16:46:11 +0100 Subject: [PATCH] correct a u32 match for iptable client rule Signed-off-by: Benjamin Hesmans --- src/mpECMPSingleInterfaceConfig.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mpECMPSingleInterfaceConfig.py b/src/mpECMPSingleInterfaceConfig.py index e0c917e..c211152 100644 --- a/src/mpECMPSingleInterfaceConfig.py +++ b/src/mpECMPSingleInterfaceConfig.py @@ -61,8 +61,8 @@ class MpECMPSingleInterfaceConfig(MpConfig): def getIptableRuleTCPPortClient(self, mask, id): s = 'iptables -t mangle -A OUTPUT -m u32 --u32 ' + \ '"6&0xFF=0x6 && ' + \ - '20&0x' + \ - pack('>I',(mask<<16)).encode('hex') + \ + '18&0x' + \ + pack('>I',(mask)).encode('hex') + \ '=0x' + pack('>I',id).encode('hex') + \ '" -j MARK --set-mark ' + str(id + 1) print (s)