Skip to contentSkip to conversation

xtables-addons compile error (DNETMAP)

DISCUSSION Dash Four 1 participant 2 messages Apr 18, 2013 – Apr 19, 2013 netfilter

lore
Share & tools
lore

Dash Four

author
#0 lore raw

During build I get the following error:

xt_DNETMAP.c: In function 'dnetmap_tg_check':
xt_DNETMAP.c:331: error: incompatible types when assigning to type 'kuid_t' from type 'unsigned int' xt_DNETMAP.c:332: error: incompatible types when assigning to type 'kgid_t' from type 'unsigned int' xt_DNETMAP.c:344: error: incompatible types when assigning to type 'kuid_t' from type 'unsigned int' xt_DNETMAP.c:345: error: incompatible types when assigning to type 'kgid_t' from type 'unsigned int'

The target kernel is 3.8.7. Any idea what could cause this?

author
#1 lore raw
Quoted 9 lines · Dash Four

During build I get the following error:

xt_DNETMAP.c: In function 'dnetmap_tg_check':
xt_DNETMAP.c:331: error: incompatible types when assigning to type 'kuid_t' from type 'unsigned int' xt_DNETMAP.c:332: error: incompatible types when assigning to type 'kgid_t' from type 'unsigned int' xt_DNETMAP.c:344: error: incompatible types when assigning to type 'kuid_t' from type 'unsigned int' xt_DNETMAP.c:345: error: incompatible types when assigning to type 'kgid_t' from type 'unsigned int'

The target kernel is 3.8.7. Any idea what could cause this?

The above error (and this is not confined to just DNETMAP) seems to be caused by CONFIG_UIDGID_STRICT_TYPE_CHECKS. When this is set, together with CONFIG_PROC_FS also being enabled in the kernel, the uid and gid fields of proc_dir_entry (proc_fs.h) are no longer "unsigned int", but a struct types, so they should be accessed/set with uid.val and gid.val instead - at least that is how I managed to get it work. I'll attach a patch if there is interest in fixing this bug - just let me know.