summaryrefslogtreecommitdiffstats
path: root/src/ct.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2014-02-17 14:06:44 +0000
committerPatrick McHardy <kaber@trash.net>2014-02-17 17:17:18 +0000
commit0545e0c13b3b7dff4dd53c8a68d8d1066c2829c0 (patch)
treea2047b0a0d7dd68919a7f5c08e99150534457d41 /src/ct.c
parent4a11511e936b5d38837137c9d04f047d4dab2c8f (diff)
netlink: fix prefix expression handling
The prefix expression handling is full of bugs: - netlink_gen_data() is used to construct the prefix mask from the full prefix expression. This is both conceptually wrong, the prefix expression is *not* data, and buggy, it only assumes network masks and thus only handles big endian types. - Prefix expression reconstruction doesn't check whether the mask is a valid prefix and reconstructs crap otherwise. It doesn't reconstruct prefixes for anything but network addresses. On top of that its needlessly complicated, using the mpz values directly its a simple matter of finding the sequence of 1's that extend up to the full width. - Unnecessary cloning of expressions where a simple refcount increase would suffice. Rewrite that code properly. Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'src/ct.c')
0 files changed, 0 insertions, 0 deletions