Commit 3a6db779 authored by Jussi Laakkonen's avatar Jussi Laakkonen

[connman] Introduce IPv6 support for firewall. Contributes to JB#42674

This commit adds IPv6 support to firewall.c. Two new functions are added
to connman.h which allow to add and remove rules using IPv6
functionality that was added to iptables.c. This commit does not change
functionality of firewall.c, new functions are:
 - __connman_firewall_add_ipv6_rule()
 - __connman_firewall_remove_ipv6_rule()

The firewall functions operate on higher level than the iptables.c
functions so a clear separation of rule adding and removal is decided to
be implemented for IPv4 and IPv6. This abstracts the use of iptables and
for internal functionality this kind of separation of concerns here is
clarifying things instead of having to give a specific type for each
firewall function call.
parent 01d9e260
......@@ -1058,7 +1058,12 @@ int __connman_firewall_add_rule(struct firewall_context *ctx,
const char *table,
const char *chain,
const char *rule_fmt, ...);
int __connman_firewall_add_ipv6_rule(struct firewall_context *ctx,
const char *table,
const char *chain,
const char *rule_fmt, ...);
int __connman_firewall_remove_rule(struct firewall_context *ctx, int id);
int __connman_firewall_remove_ipv6_rule(struct firewall_context *ctx, int id);
int __connman_firewall_enable_rule(struct firewall_context *ctx, int id);
int __connman_firewall_disable_rule(struct firewall_context *ctx, int id);
int __connman_firewall_enable(struct firewall_context *ctx);
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment