History

conntrack: export lsm context rather than internal secid via netlink

The conntrack code can export the internal secid to userspace. These are dynamic, can change on lsm changes, and have no meaning in userspace. We should instead be sending lsm contexts to userspace instead. This patch sends the secctx (rather than secid) to userspace over the netlink socket. We use a new field CTA_SECCTX and stop using the the old CTA_SECMARK field since it did not send particularly useful information.

Eric Paris committed 16 years ago

Commit 1cc63241 parent d5630b92 files · +45 −11Browse files

Showing the changes to include/linux/netfilter (1 of 2 files). Show all

Unified · Split

include/linux/netfilter/nfnetlink_conntrack.h+9−1
@@ -39,8 +39,9 @@ enum ctattr_type { · 38 unmodified lines
3939 CTA_TUPLE_MASTER,
4040 CTA_NAT_SEQ_ADJ_ORIG,
4141 CTA_NAT_SEQ_ADJ_REPLY,
42− CTA_SECMARK,
42+ CTA_SECMARK, /* obsolete */
4343 CTA_ZONE,
44+ CTA_SECCTX,
4445 __CTA_MAX
4546 };
4647 #define CTA_MAX (__CTA_MAX - 1)
@@ -172,4 +173,11 @@ enum ctattr_help { · 125 unmodified lines
172173 };
173174 #define CTA_HELP_MAX (__CTA_HELP_MAX - 1)
174175
176+enum ctattr_secctx {
177+ CTA_SECCTX_UNSPEC,
178+ CTA_SECCTX_NAME,
179+ __CTA_SECCTX_MAX
180+};
181+#define CTA_SECCTX_MAX (__CTA_SECCTX_MAX - 1)
182+
175183 #endif /* _IPCONNTRACK_NETLINK_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t