Skip to content

Commit

Permalink
session: Interface to query session->mark value
Browse files Browse the repository at this point in the history
Will return the session mark (without needing to expose the complete
struct connman_session).

(cherry picked from commit 4b62e36)
  • Loading branch information
Bjoern Thorwirth authored and LaakkonenJussi committed Jun 10, 2024
1 parent 8685c2a commit 9310723
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions connman/include/session.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#ifndef __CONNMAN_SESSION_H
#define __CONNMAN_SESSION_H

#include <stdint.h>
#include <connman/service.h>

#ifdef __cplusplus
Expand Down Expand Up @@ -97,6 +98,7 @@ struct connman_session_policy {
GSList* services);
};

uint32_t connman_session_firewall_get_fwmark(struct connman_session *session);
int connman_session_policy_register(struct connman_session_policy *config);
void connman_session_policy_unregister(struct connman_session_policy *config);

Expand Down
5 changes: 5 additions & 0 deletions connman/src/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,11 @@ static void add_nat_rules(struct connman_session *session)
g_free(ifname);
}

uint32_t connman_session_firewall_get_fwmark(struct connman_session *session)
{
return session->mark;
}

static void cleanup_routing_table(struct connman_session *session)
{
DBG("");
Expand Down

0 comments on commit 9310723

Please sign in to comment.