diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2011-05-04 16:41:13 +0200 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2011-05-09 00:45:12 +0200 |
commit | d7282413763b0ba85d512c1cd49174b762ff449c (patch) | |
tree | 01affe674bb821abea74a8113af4d90ff49fdeaf /extensions/libxt_TPROXY.c | |
parent | 51a746e6b1d66ca546fd2f8a1f7809868174e637 (diff) |
libxtables: do not overlay addr and mask parts, and cleanup
XTTYPE_HOSTMASK will require that what has now become haddr,
hmask/hlen are not overlays of another. Thus relax the structure and
always set all members of the {haddr, hmask, hlen} triplet now for all
types that touch any of the members.
Add some more comments and clean out ONEHOST.
Diffstat (limited to 'extensions/libxt_TPROXY.c')
-rw-r--r-- | extensions/libxt_TPROXY.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/extensions/libxt_TPROXY.c b/extensions/libxt_TPROXY.c index 5264ea7d..61646c93 100644 --- a/extensions/libxt_TPROXY.c +++ b/extensions/libxt_TPROXY.c @@ -22,7 +22,7 @@ enum { static const struct xt_option_entry tproxy_tg0_opts[] = { {.name = "on-port", .id = P_PORT, .type = XTTYPE_PORT_NE, .flags = XTOPT_MAND | XTOPT_PUT, XTOPT_POINTER(s, lport)}, - {.name = "on-ip", .id = P_ADDR, .type = XTTYPE_ONEHOST}, + {.name = "on-ip", .id = P_ADDR, .type = XTTYPE_HOST}, {.name = "tproxy-mark", .id = P_MARK, .type = XTTYPE_MARKMASK32}, XTOPT_TABLEEND, }; @@ -31,7 +31,7 @@ static const struct xt_option_entry tproxy_tg0_opts[] = { static const struct xt_option_entry tproxy_tg1_opts[] = { {.name = "on-port", .id = P_PORT, .type = XTTYPE_PORT_NE, .flags = XTOPT_MAND | XTOPT_PUT, XTOPT_POINTER(s, lport)}, - {.name = "on-ip", .id = P_ADDR, .type = XTTYPE_ONEHOST, + {.name = "on-ip", .id = P_ADDR, .type = XTTYPE_HOST, .flags = XTOPT_PUT, XTOPT_POINTER(s, laddr)}, {.name = "tproxy-mark", .id = P_MARK, .type = XTTYPE_MARKMASK32}, XTOPT_TABLEEND, @@ -129,7 +129,7 @@ static void tproxy_tg0_parse(struct xt_option_call *cb) info->mark_mask = cb->val.mask; break; case P_ADDR: - info->laddr = cb->val.inetaddr.ip; + info->laddr = cb->val.haddr.ip; break; } } |