diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2011-05-24 09:35:14 +0200 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2011-05-24 09:35:14 +0200 |
commit | b38587400e60e932e6d919444e1faee77f977959 (patch) | |
tree | 9da698b7f7b34d0948998e204f357d9704e54fc8 /lib/session.c | |
parent | 6bce7d2ea2839849bf3d3731ec713a8b41959734 (diff) |
Restore with bitmap:port and list:set types did not work, fixed
Diffstat (limited to 'lib/session.c')
-rw-r--r-- | lib/session.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/session.c b/lib/session.c index bab1846..9a6c98e 100644 --- a/lib/session.c +++ b/lib/session.c @@ -1623,7 +1623,12 @@ build_msg(struct ipset_session *session, bool aggregate) IPSET_ATTR_REVISION, cmd_attrs); D("family: %u, type family %u", ipset_data_family(data), type->family); - ADDATTR(session, nlh, data, IPSET_ATTR_FAMILY, AF_INET, cmd_attrs); + if (ipset_data_test(data, IPSET_OPT_FAMILY)) + ADDATTR(session, nlh, data, IPSET_ATTR_FAMILY, + AF_INET, cmd_attrs); + else + /* bitmap:port and list:set types */ + mnl_attr_put_u8(nlh, IPSET_ATTR_FAMILY, AF_UNSPEC); /* Type-specific create attributes */ D("call open_nested"); |